diff --git a/dist/phaser-arcade-physics.js b/dist/phaser-arcade-physics.js index ce25cd167..2c258c6e2 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 = 1453); +/******/ return __webpack_require__(__webpack_require__.s = 1433); /******/ }) /************************************************************************/ /******/ ([ @@ -432,6 +432,7 @@ module.exports = GetFastValue; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); +var FuzzyEqual = __webpack_require__(106); /** * @classdesc @@ -611,6 +612,22 @@ var Vector2 = new Class({ return ((this.x === v.x) && (this.y === v.y)); }, + /** + * Check whether this Vector is approximately equal to a given Vector. + * + * @method Phaser.Math.Vector2#fuzzyEquals + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {number} [epsilon=0.0001] - The tolerance value. + * + * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`. + */ + fuzzyEquals: function (v, epsilon) + { + return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon)); + }, + /** * Calculate the angle between this Vector and the positive x-axis, in radians. * @@ -633,6 +650,21 @@ var Vector2 = new Class({ return angle; }, + /** + * Set the angle of this Vector. + * + * @method Phaser.Math.Vector2#setAngle + * @since 3.23.0 + * + * @param {number} angle - The angle, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setAngle: function (angle) + { + return this.setToPolar(angle, this.length()); + }, + /** * Add a given Vector to this Vector. Addition is component-wise. * @@ -803,6 +835,21 @@ var Vector2 = new Class({ return Math.sqrt(x * x + y * y); }, + /** + * Set the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#setLength + * @since 3.23.0 + * + * @param {number} length + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setLength: function (length) + { + return this.normalize().scale(length); + }, + /** * Calculate the length of this Vector squared. * @@ -847,7 +894,7 @@ var Vector2 = new Class({ }, /** - * Right-hand normalize (make unit length) this Vector. + * Rotate this Vector to its perpendicular, in the positive direction. * * @method Phaser.Math.Vector2#normalizeRightHand * @since 3.0.0 @@ -864,6 +911,24 @@ var Vector2 = new Class({ return this; }, + /** + * Rotate this Vector to its perpendicular, in the negative direction. + * + * @method Phaser.Math.Vector2#normalizeLeftHand + * @since 3.23.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalizeLeftHand: function () + { + var x = this.x; + + this.x = this.y; + this.y = x * -1; + + return this; + }, + /** * Calculate the dot product of this Vector and the given Vector. * @@ -978,13 +1043,85 @@ var Vector2 = new Class({ this.y = 0; return this; + }, + + /** + * Limit the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#limit + * @since 3.23.0 + * + * @param {number} max - The maximum length. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + limit: function (max) + { + var len = this.length(); + + if (len && len > max) + { + this.scale(max / len); + } + + return this; + }, + + /** + * Reflect this Vector off a line defined by a normal. + * + * @method Phaser.Math.Vector2#reflect + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reflect: function (normal) + { + normal = normal.clone().normalize(); + + return this.subtract(normal.scale(2 * this.dot(normal))); + }, + + /** + * Reflect this Vector across another. + * + * @method Phaser.Math.Vector2#mirror + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} axis - A vector to reflect across. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + mirror: function (axis) + { + return this.reflect(axis).negate(); + }, + + /** + * Rotate this Vector by an angle amount. + * + * @method Phaser.Math.Vector2#rotate + * @since 3.23.0 + * + * @param {number} delta - The angle to rotate by, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + rotate: function (delta) + { + var cos = Math.cos(delta); + var sin = Math.sin(delta); + + return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); } }); /** * A static zero Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -996,7 +1133,7 @@ Vector2.ZERO = new Vector2(); /** * A static right Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1008,7 +1145,7 @@ Vector2.RIGHT = new Vector2(1, 0); /** * A static left Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1020,7 +1157,7 @@ Vector2.LEFT = new Vector2(-1, 0); /** * A static up Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1032,7 +1169,7 @@ Vector2.UP = new Vector2(0, -1); /** * A static down Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1044,7 +1181,7 @@ Vector2.DOWN = new Vector2(0, 1); /** * A static one Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1068,7 +1205,7 @@ module.exports = Vector2; */ var Class = __webpack_require__(0); -var GEOM_CONST = __webpack_require__(46); +var GEOM_CONST = __webpack_require__(47); /** * @classdesc @@ -1132,7 +1269,7 @@ var Point = new Class({ * @param {number} [x=0] - The x coordinate of this Point. * @param {number} [y=x] - The y coordinate of this Point. * - * @return {Phaser.Geom.Point} This Point object. + * @return {this} This Point object. */ setTo: function (x, y) { @@ -1162,7 +1299,7 @@ module.exports = Point; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -1566,6 +1703,141 @@ module.exports = FileTypesManager; /***/ }), /* 9 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Renderer.WebGL.Utils + * @since 3.0.0 + */ +module.exports = { + + /** + * Packs four floats on a range from 0.0 to 1.0 into a single Uint32 + * + * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats + * @since 3.0.0 + * + * @param {number} r - Red component in a range from 0.0 to 1.0 + * @param {number} g - Green component in a range from 0.0 to 1.0 + * @param {number} b - Blue component in a range from 0.0 to 1.0 + * @param {number} a - Alpha component in a range from 0.0 to 1.0 + * + * @return {number} The packed RGBA values as a Uint32. + */ + getTintFromFloats: function (r, g, b, a) + { + var ur = ((r * 255.0)|0) & 0xFF; + var ug = ((g * 255.0)|0) & 0xFF; + var ub = ((b * 255.0)|0) & 0xFF; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; + }, + + /** + * Packs a Uint24, representing RGB components, with a Float32, representing + * the alpha component, with a range between 0.0 and 1.0 and return a Uint32 + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha + * @since 3.0.0 + * + * @param {number} rgb - Uint24 representing RGB components + * @param {number} a - Float32 representing Alpha component + * + * @return {number} Packed RGBA as Uint32 + */ + getTintAppendFloatAlpha: function (rgb, a) + { + var ua = ((a * 255.0)|0) & 0xFF; + return ((ua << 24) | rgb) >>> 0; + }, + + /** + * Packs a Uint24, representing RGB components, with a Float32, representing + * the alpha component, with a range between 0.0 and 1.0 and return a + * swizzled Uint32 + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap + * @since 3.0.0 + * + * @param {number} rgb - Uint24 representing RGB components + * @param {number} a - Float32 representing Alpha component + * + * @return {number} Packed RGBA as Uint32 + */ + getTintAppendFloatAlphaAndSwap: function (rgb, a) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; + }, + + /** + * Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0 + * + * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB + * @since 3.0.0 + * + * @param {number} rgb - RGB packed as a Uint24 + * + * @return {array} Array of floats representing each component as a float + */ + getFloatsFromUintRGB: function (rgb) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + + return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; + }, + + /** + * Counts how many attributes of 32 bits a vertex has + * + * @function Phaser.Renderer.WebGL.Utils.getComponentCount + * @since 3.0.0 + * + * @param {array} attributes - Array of attributes + * @param {WebGLRenderingContext} glContext - WebGLContext used for check types + * + * @return {number} Count of 32 bit attributes in vertex + */ + getComponentCount: function (attributes, glContext) + { + var count = 0; + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + + if (element.type === glContext.FLOAT) + { + count += element.size; + } + else + { + count += 1; // We'll force any other type to be 32 bit. for now + } + } + + return count; + } + +}; + + +/***/ }), +/* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1907,141 +2179,6 @@ if (true) { } -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Renderer.WebGL.Utils - * @since 3.0.0 - */ -module.exports = { - - /** - * Packs four floats on a range from 0.0 to 1.0 into a single Uint32 - * - * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats - * @since 3.0.0 - * - * @param {number} r - Red component in a range from 0.0 to 1.0 - * @param {number} g - Green component in a range from 0.0 to 1.0 - * @param {number} b - Blue component in a range from 0.0 to 1.0 - * @param {number} a - Alpha component in a range from 0.0 to 1.0 - * - * @return {number} [description] - */ - getTintFromFloats: function (r, g, b, a) - { - var ur = ((r * 255.0)|0) & 0xFF; - var ug = ((g * 255.0)|0) & 0xFF; - var ub = ((b * 255.0)|0) & 0xFF; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; - }, - - /** - * Packs a Uint24, representing RGB components, with a Float32, representing - * the alpha component, with a range between 0.0 and 1.0 and return a Uint32 - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha - * @since 3.0.0 - * - * @param {number} rgb - Uint24 representing RGB components - * @param {number} a - Float32 representing Alpha component - * - * @return {number} Packed RGBA as Uint32 - */ - getTintAppendFloatAlpha: function (rgb, a) - { - var ua = ((a * 255.0)|0) & 0xFF; - return ((ua << 24) | rgb) >>> 0; - }, - - /** - * Packs a Uint24, representing RGB components, with a Float32, representing - * the alpha component, with a range between 0.0 and 1.0 and return a - * swizzled Uint32 - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap - * @since 3.0.0 - * - * @param {number} rgb - Uint24 representing RGB components - * @param {number} a - Float32 representing Alpha component - * - * @return {number} Packed RGBA as Uint32 - */ - getTintAppendFloatAlphaAndSwap: function (rgb, a) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; - }, - - /** - * Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0 - * - * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB - * @since 3.0.0 - * - * @param {number} rgb - RGB packed as a Uint24 - * - * @return {array} Array of floats representing each component as a float - */ - getFloatsFromUintRGB: function (rgb) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - - return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; - }, - - /** - * Counts how many attributes of 32 bits a vertex has - * - * @function Phaser.Renderer.WebGL.Utils.getComponentCount - * @since 3.0.0 - * - * @param {array} attributes - Array of attributes - * @param {WebGLRenderingContext} glContext - WebGLContext used for check types - * - * @return {number} Count of 32 bit attributes in vertex - */ - getComponentCount: function (attributes, glContext) - { - var count = 0; - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - - if (element.type === glContext.FLOAT) - { - count += element.size; - } - else - { - count += 1; // We'll force any other type to be 32 bit. for now - } - } - - return count; - } - -}; - - /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { @@ -2053,12 +2190,12 @@ module.exports = { */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(47); -var GetPoint = __webpack_require__(149); -var GetPoints = __webpack_require__(271); -var GEOM_CONST = __webpack_require__(46); +var Contains = __webpack_require__(48); +var GetPoint = __webpack_require__(152); +var GetPoints = __webpack_require__(274); +var GEOM_CONST = __webpack_require__(47); var Line = __webpack_require__(56); -var Random = __webpack_require__(152); +var Random = __webpack_require__(155); /** * @classdesc @@ -2222,7 +2359,7 @@ var Rectangle = new Class({ * @param {number} width - The width of the Rectangle. * @param {number} height - The height of the Rectangle. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setTo: function (x, y, width, height) { @@ -2240,7 +2377,7 @@ var Rectangle = new Class({ * @method Phaser.Geom.Rectangle#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setEmpty: function () { @@ -2256,7 +2393,7 @@ var Rectangle = new Class({ * @param {number} x - The X coordinate of the top left corner of the Rectangle. * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setPosition: function (x, y) { @@ -2277,7 +2414,7 @@ var Rectangle = new Class({ * @param {number} width - The width to set the Rectangle to. * @param {number} [height=width] - The height to set the Rectangle to. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setSize: function (width, height) { @@ -2569,126 +2706,34 @@ module.exports = Rectangle; module.exports = { - 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__(280) + Alpha: __webpack_require__(532), + AlphaSingle: __webpack_require__(269), + Animation: __webpack_require__(503), + BlendMode: __webpack_require__(272), + ComputedSize: __webpack_require__(551), + Crop: __webpack_require__(552), + Depth: __webpack_require__(273), + Flip: __webpack_require__(553), + GetBounds: __webpack_require__(554), + Mask: __webpack_require__(277), + Origin: __webpack_require__(571), + PathFollower: __webpack_require__(572), + Pipeline: __webpack_require__(156), + ScrollFactor: __webpack_require__(280), + Size: __webpack_require__(573), + Texture: __webpack_require__(574), + TextureCrop: __webpack_require__(575), + Tint: __webpack_require__(576), + ToJSON: __webpack_require__(281), + Transform: __webpack_require__(282), + TransformMatrix: __webpack_require__(29), + Visible: __webpack_require__(283) }; /***/ }), /* 13 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = { - - /** - * The value of PI * 2. - * - * @name Phaser.Math.PI2 - * @type {number} - * @since 3.0.0 - */ - PI2: Math.PI * 2, - - /** - * The value of PI * 0.5. - * - * @name Phaser.Math.TAU - * @type {number} - * @since 3.0.0 - */ - TAU: Math.PI * 0.5, - - /** - * An epsilon value (1.0e-6) - * - * @name Phaser.Math.EPSILON - * @type {number} - * @since 3.0.0 - */ - EPSILON: 1.0e-6, - - /** - * For converting degrees to radians (PI / 180) - * - * @name Phaser.Math.DEG_TO_RAD - * @type {number} - * @since 3.0.0 - */ - DEG_TO_RAD: Math.PI / 180, - - /** - * For converting radians to degrees (180 / PI) - * - * @name Phaser.Math.RAD_TO_DEG - * @type {number} - * @since 3.0.0 - */ - RAD_TO_DEG: 180 / Math.PI, - - /** - * An instance of the Random Number Generator. - * This is not set until the Game boots. - * - * @name Phaser.Math.RND - * @type {Phaser.Math.RandomDataGenerator} - * @since 3.0.0 - */ - RND: null, - - /** - * The minimum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MIN_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, - - /** - * The maximum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MAX_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 - -}; - -module.exports = MATH_CONST; - - -/***/ }), -/* 14 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2698,9 +2743,9 @@ module.exports = MATH_CONST; */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(278); +var ComponentsToJSON = __webpack_require__(281); var DataManager = __webpack_require__(113); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(90); /** @@ -2859,10 +2904,10 @@ var GameObject = new Class({ this.input = null; /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. * * @name Phaser.GameObjects.GameObject#body - * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)} + * @type {?(object|Phaser.Physics.Arcade.Body|MatterJS.BodyType)} * @default null * @since 3.0.0 */ @@ -3023,6 +3068,65 @@ var GameObject = new Class({ return this; }, + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * 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. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * 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. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + /** * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. * @@ -3329,7 +3433,7 @@ module.exports = GameObject; /***/ }), -/* 15 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3338,7 +3442,7 @@ module.exports = GameObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(168); +var MATH = __webpack_require__(170); var GetValue = __webpack_require__(6); /** @@ -3415,6 +3519,98 @@ var GetAdvancedValue = function (source, key, defaultValue) module.exports = GetAdvancedValue; +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = { + + /** + * The value of PI * 2. + * + * @name Phaser.Math.PI2 + * @type {number} + * @since 3.0.0 + */ + PI2: Math.PI * 2, + + /** + * The value of PI * 0.5. + * + * @name Phaser.Math.TAU + * @type {number} + * @since 3.0.0 + */ + TAU: Math.PI * 0.5, + + /** + * An epsilon value (1.0e-6) + * + * @name Phaser.Math.EPSILON + * @type {number} + * @since 3.0.0 + */ + EPSILON: 1.0e-6, + + /** + * For converting degrees to radians (PI / 180) + * + * @name Phaser.Math.DEG_TO_RAD + * @type {number} + * @since 3.0.0 + */ + DEG_TO_RAD: Math.PI / 180, + + /** + * For converting radians to degrees (180 / PI) + * + * @name Phaser.Math.RAD_TO_DEG + * @type {number} + * @since 3.0.0 + */ + RAD_TO_DEG: 180 / Math.PI, + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + * + * @name Phaser.Math.RND + * @type {Phaser.Math.RandomDataGenerator} + * @since 3.0.0 + */ + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 + +}; + +module.exports = MATH_CONST; + + /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { @@ -3427,7 +3623,7 @@ module.exports = GetAdvancedValue; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -3585,180 +3781,6 @@ module.exports = GameObjectCreator; /***/ }), /* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var IsPlainObject = __webpack_require__(7); - -// @param {boolean} deep - Perform a deep copy? -// @param {object} target - The target object to copy to. -// @return {object} The extended object. - -/** - * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ - * - * @function Phaser.Utils.Objects.Extend - * @since 3.0.0 - * - * @return {object} The extended object. - */ -var Extend = function () -{ - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if (typeof target === 'boolean') - { - deep = target; - target = arguments[1] || {}; - - // skip the boolean and the target - i = 2; - } - - // extend Phaser if only one argument is passed - if (length === i) - { - target = this; - --i; - } - - for (; i < length; i++) - { - // Only deal with non-null/undefined values - if ((options = arguments[i]) != null) - { - // Extend the base object - for (name in options) - { - src = target[name]; - copy = options[name]; - - // Prevent never-ending loop - if (target === copy) - { - continue; - } - - // Recurse if we're merging plain objects or arrays - if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) - { - if (copyIsArray) - { - copyIsArray = false; - clone = src && Array.isArray(src) ? src : []; - } - else - { - clone = src && IsPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[name] = Extend(deep, clone, copy); - - // Don't bring in undefined values - } - else if (copy !== undefined) - { - target[name] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -module.exports = Extend; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Core.Events - */ - -module.exports = { - - 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) { /** @@ -3909,6 +3931,173 @@ var FILE_CONST = { module.exports = FILE_CONST; +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(7); + +// @param {boolean} deep - Perform a deep copy? +// @param {object} target - The target object to copy to. +// @return {object} The extended object. + +/** + * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ + * + * @function Phaser.Utils.Objects.Extend + * @since 3.0.0 + * + * @param {...*} [args] - The objects that will be mixed. + * + * @return {object} The extended object. + */ +var Extend = function () +{ + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') + { + deep = target; + target = arguments[1] || {}; + + // skip the boolean and the target + i = 2; + } + + // extend Phaser if only one argument is passed + if (length === i) + { + target = this; + --i; + } + + for (; i < length; i++) + { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) + { + // Extend the base object + for (name in options) + { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) + { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) + { + if (copyIsArray) + { + copyIsArray = false; + clone = src && Array.isArray(src) ? src : []; + } + else + { + clone = src && IsPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = Extend(deep, clone, copy); + + // Don't bring in undefined values + } + else if (copy !== undefined) + { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +module.exports = Extend; + + +/***/ }), +/* 19 */ +/***/ (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; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(555), + BOOT: __webpack_require__(556), + CONTEXT_LOST: __webpack_require__(557), + CONTEXT_RESTORED: __webpack_require__(558), + DESTROY: __webpack_require__(559), + FOCUS: __webpack_require__(560), + HIDDEN: __webpack_require__(561), + PAUSE: __webpack_require__(562), + POST_RENDER: __webpack_require__(563), + POST_STEP: __webpack_require__(564), + PRE_RENDER: __webpack_require__(565), + PRE_STEP: __webpack_require__(566), + READY: __webpack_require__(567), + RESUME: __webpack_require__(568), + STEP: __webpack_require__(569), + VISIBLE: __webpack_require__(570) + +}; + + /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { @@ -3920,13 +4109,13 @@ module.exports = FILE_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); -var Events = __webpack_require__(81); +var CONST = __webpack_require__(17); +var Events = __webpack_require__(82); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(134); -var MergeXHRSettings = __webpack_require__(212); -var XHRLoader = __webpack_require__(447); -var XHRSettings = __webpack_require__(135); +var GetURL = __webpack_require__(138); +var MergeXHRSettings = __webpack_require__(215); +var XHRLoader = __webpack_require__(454); +var XHRSettings = __webpack_require__(139); /** * @classdesc @@ -4009,7 +4198,7 @@ var File = new Class({ { this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof(this.url) !== 'function') + else if (typeof(this.url) !== 'function' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0) { this.url = loader.path + this.url; } @@ -4452,7 +4641,7 @@ module.exports = File; /***/ }), /* 22 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -4461,23 +4650,32 @@ module.exports = File; */ /** - * 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. + * @namespace Phaser.Scenes.Events */ -var Clamp = function (value, min, max) -{ - return Math.max(min, Math.min(max, value)); -}; -module.exports = Clamp; +module.exports = { + + BOOT: __webpack_require__(708), + CREATE: __webpack_require__(709), + DESTROY: __webpack_require__(710), + PAUSE: __webpack_require__(711), + POST_UPDATE: __webpack_require__(712), + PRE_UPDATE: __webpack_require__(713), + READY: __webpack_require__(714), + RENDER: __webpack_require__(715), + RESUME: __webpack_require__(716), + SHUTDOWN: __webpack_require__(717), + SLEEP: __webpack_require__(718), + START: __webpack_require__(719), + TRANSITION_COMPLETE: __webpack_require__(720), + TRANSITION_INIT: __webpack_require__(721), + TRANSITION_OUT: __webpack_require__(722), + TRANSITION_START: __webpack_require__(723), + TRANSITION_WAKE: __webpack_require__(724), + UPDATE: __webpack_require__(725), + WAKE: __webpack_require__(726) + +}; /***/ }), @@ -4850,8 +5048,8 @@ module.exports = PropertyValueSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(29); -var Smoothing = __webpack_require__(164); +var CONST = __webpack_require__(33); +var Smoothing = __webpack_require__(167); // The pool into which the canvas elements are placed. var pool = []; @@ -5103,94 +5301,6 @@ module.exports = CanvasPool(); /***/ }), /* 27 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix - * and then performs the following steps: - * - * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts. - * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given. - * 3. Sets the blend mode of the context to be that used by the Game Object. - * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera. - * 5. Saves the context state. - * 6. Sets the final matrix values into the context via setTransform. - * 7. If Renderer.antialias, or the frame.source.scaleMode is set, then imageSmoothingEnabled is set. - * - * This function is only meant to be used internally. Most of the Canvas Renderer classes use it. - * - * @function Phaser.Renderer.Canvas.SetTransform - * @since 3.12.0 - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on. - * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering. - * - * @return {boolean} `true` if the Game Object context was set, otherwise `false`. - */ -var SetTransform = function (renderer, ctx, src, camera, parentMatrix) -{ - var alpha = camera.alpha * src.alpha; - - if (alpha <= 0) - { - // Nothing to see, so don't waste time calculating stuff - return false; - } - - var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix); - var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - var calcMatrix = renderer._tempMatrix3; - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - gameObjectMatrix.e = src.x; - gameObjectMatrix.f = src.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(gameObjectMatrix, calcMatrix); - } - else - { - gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX; - gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(gameObjectMatrix, calcMatrix); - } - - // Blend Mode - ctx.globalCompositeOperation = renderer.blendModes[src.blendMode]; - - // Alpha - ctx.globalAlpha = alpha; - - ctx.save(); - - calcMatrix.setToContext(ctx); - - ctx.imageSmoothingEnabled = !(!renderer.antialias || (src.frame && src.frame.source.scaleMode)); - - return true; -}; - -module.exports = SetTransform; - - -/***/ }), -/* 28 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5200,7 +5310,7 @@ module.exports = SetTransform; */ var BlendModes = __webpack_require__(52); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Builds a Game Object using the provided configuration object. @@ -5318,445 +5428,7 @@ module.exports = BuildGameObject; /***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Global constants. - * - * @ignore - */ - -var CONST = { - - /** - * Phaser Release Version - * - * @name Phaser.VERSION - * @const - * @type {string} - * @since 3.0.0 - */ - VERSION: '3.22.0', - - BlendModes: __webpack_require__(52), - - ScaleModes: __webpack_require__(231), - - /** - * AUTO Detect Renderer. - * - * @name Phaser.AUTO - * @const - * @type {integer} - * @since 3.0.0 - */ - AUTO: 0, - - /** - * Canvas Renderer. - * - * @name Phaser.CANVAS - * @const - * @type {integer} - * @since 3.0.0 - */ - CANVAS: 1, - - /** - * WebGL Renderer. - * - * @name Phaser.WEBGL - * @const - * @type {integer} - * @since 3.0.0 - */ - WEBGL: 2, - - /** - * Headless Renderer. - * - * @name Phaser.HEADLESS - * @const - * @type {integer} - * @since 3.0.0 - */ - HEADLESS: 3, - - /** - * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead - * to help you remember what the value is doing in your code. - * - * @name Phaser.FOREVER - * @const - * @type {integer} - * @since 3.0.0 - */ - FOREVER: -1, - - /** - * Direction constant. - * - * @name Phaser.NONE - * @const - * @type {integer} - * @since 3.0.0 - */ - NONE: 4, - - /** - * Direction constant. - * - * @name Phaser.UP - * @const - * @type {integer} - * @since 3.0.0 - */ - UP: 5, - - /** - * Direction constant. - * - * @name Phaser.DOWN - * @const - * @type {integer} - * @since 3.0.0 - */ - DOWN: 6, - - /** - * Direction constant. - * - * @name Phaser.LEFT - * @const - * @type {integer} - * @since 3.0.0 - */ - LEFT: 7, - - /** - * Direction constant. - * - * @name Phaser.RIGHT - * @const - * @type {integer} - * @since 3.0.0 - */ - RIGHT: 8 - -}; - -module.exports = CONST; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @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__(56); - -/** - * @classdesc - * 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 - * @memberof Phaser.GameObjects - * @constructor - * @since 3.13.0 - * - * @extends Phaser.GameObjects.Components.AlphaSingle - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.ComputedSize - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @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 {string} [type] - The internal type of the Shape. - * @param {any} [data] - The data of the source shape geometry, if any. - */ -var Shape = new Class({ - - Extends: GameObject, - - Mixins: [ - Components.AlphaSingle, - Components.BlendMode, - Components.ComputedSize, - Components.Depth, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Transform, - Components.Visible - ], - - initialize: - - function Shape (scene, type, data) - { - if (type === undefined) { type = 'Shape'; } - - GameObject.call(this, scene, type); - - /** - * The source Shape data. Typically a geometry object. - * You should not manipulate this directly. - * - * @name Phaser.GameObjects.Shape#data - * @type {any} - * @readonly - * @since 3.13.0 - */ - this.geom = data; - - /** - * Holds the polygon path data for filled rendering. - * - * @name Phaser.GameObjects.Shape#pathData - * @type {number[]} - * @readonly - * @since 3.13.0 - */ - this.pathData = []; - - /** - * Holds the earcut polygon path index data for filled rendering. - * - * @name Phaser.GameObjects.Shape#pathIndexes - * @type {integer[]} - * @readonly - * @since 3.13.0 - */ - this.pathIndexes = []; - - /** - * The fill color used by this Shape. - * - * @name Phaser.GameObjects.Shape#fillColor - * @type {number} - * @since 3.13.0 - */ - this.fillColor = 0xffffff; - - /** - * The fill alpha value used by this Shape. - * - * @name Phaser.GameObjects.Shape#fillAlpha - * @type {number} - * @since 3.13.0 - */ - this.fillAlpha = 1; - - /** - * The stroke color used by this Shape. - * - * @name Phaser.GameObjects.Shape#strokeColor - * @type {number} - * @since 3.13.0 - */ - this.strokeColor = 0xffffff; - - /** - * The stroke alpha value used by this Shape. - * - * @name Phaser.GameObjects.Shape#strokeAlpha - * @type {number} - * @since 3.13.0 - */ - this.strokeAlpha = 1; - - /** - * The stroke line width used by this Shape. - * - * @name Phaser.GameObjects.Shape#lineWidth - * @type {number} - * @since 3.13.0 - */ - this.lineWidth = 1; - - /** - * Controls if this Shape is filled or not. - * Note that some Shapes do not support being filled (such as Line shapes) - * - * @name Phaser.GameObjects.Shape#isFilled - * @type {boolean} - * @since 3.13.0 - */ - this.isFilled = false; - - /** - * Controls if this Shape is stroked or not. - * Note that some Shapes do not support being stroked (such as Iso Box shapes) - * - * @name Phaser.GameObjects.Shape#isStroked - * @type {boolean} - * @since 3.13.0 - */ - this.isStroked = false; - - /** - * Controls if this Shape path is closed during rendering when stroked. - * Note that some Shapes are always closed when stroked (such as Ellipse shapes) - * - * @name Phaser.GameObjects.Shape#closePath - * @type {boolean} - * @since 3.13.0 - */ - this.closePath = true; - - /** - * Private internal value. - * A Line used when parsing internal path data to avoid constant object re-creation. - * - * @name Phaser.GameObjects.Curve#_tempLine - * @type {Phaser.Geom.Line} - * @private - * @since 3.13.0 - */ - this._tempLine = new Line(); - - this.initPipeline(); - }, - - /** - * 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. - * - * @method Phaser.GameObjects.Shape#setFillStyle - * @since 3.13.0 - * - * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled. - * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given. - * - * @return {this} This Game Object instance. - */ - setFillStyle: function (color, alpha) - { - if (alpha === undefined) { alpha = 1; } - - if (color === undefined) - { - this.isFilled = false; - } - else - { - this.fillColor = color; - this.fillAlpha = alpha; - this.isFilled = true; - } - - return 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. - * - * @method Phaser.GameObjects.Shape#setStrokeStyle - * @since 3.13.0 - * - * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked. - * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked. - * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given. - * - * @return {this} This Game Object instance. - */ - setStrokeStyle: function (lineWidth, color, alpha) - { - if (alpha === undefined) { alpha = 1; } - - if (lineWidth === undefined) - { - this.isStroked = false; - } - else - { - this.lineWidth = lineWidth; - this.strokeColor = color; - this.strokeAlpha = alpha; - this.isStroked = true; - } - - return 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. - * - * @method Phaser.GameObjects.Shape#setClosePath - * @since 3.13.0 - * - * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`. - * - * @return {this} This Game Object instance. - */ - setClosePath: function (value) - { - this.closePath = value; - - return this; - }, - - /** - * Internal destroy handler, called as part of the destroy process. - * - * @method Phaser.GameObjects.Shape#preDestroy - * @protected - * @since 3.13.0 - */ - preDestroy: function () - { - this.geom = null; - this._tempLine = null; - this.pathData = []; - this.pathIndexes = []; - } - -}); - -module.exports = Shape; - - -/***/ }), -/* 31 */ +/* 28 */ /***/ (function(module, exports) { /** @@ -5766,52 +5438,85 @@ module.exports = Shape; */ /** - * @namespace Phaser.Tilemaps.Formats + * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix + * and then performs the following steps: + * + * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts. + * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given. + * 3. Sets the blend mode of the context to be that used by the Game Object. + * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera. + * 5. Saves the context state. + * 6. Sets the final matrix values into the context via setTransform. + * 7. If Renderer.antialias, or the frame.source.scaleMode is set, then imageSmoothingEnabled is set. + * + * This function is only meant to be used internally. Most of the Canvas Renderer classes use it. + * + * @function Phaser.Renderer.Canvas.SetTransform + * @since 3.12.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on. + * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering. + * + * @return {boolean} `true` if the Game Object context was set, otherwise `false`. */ +var SetTransform = function (renderer, ctx, src, camera, parentMatrix) +{ + var alpha = camera.alpha * src.alpha; -module.exports = { + if (alpha <= 0) + { + // Nothing to see, so don't waste time calculating stuff + return false; + } - /** - * CSV Map Type - * - * @name Phaser.Tilemaps.Formats.CSV - * @type {number} - * @since 3.0.0 - */ - CSV: 0, + var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix); + var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + var calcMatrix = renderer._tempMatrix3; - /** - * Tiled JSON Map Type - * - * @name Phaser.Tilemaps.Formats.TILED_JSON - * @type {number} - * @since 3.0.0 - */ - TILED_JSON: 1, + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - /** - * 2D Array Map Type - * - * @name Phaser.Tilemaps.Formats.ARRAY_2D - * @type {number} - * @since 3.0.0 - */ - ARRAY_2D: 2, + // Undo the camera scroll + gameObjectMatrix.e = src.x; + gameObjectMatrix.f = src.y; - /** - * Weltmeister (Impact.js) Map Type - * - * @name Phaser.Tilemaps.Formats.WELTMEISTER - * @type {number} - * @since 3.0.0 - */ - WELTMEISTER: 3 + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(gameObjectMatrix, calcMatrix); + } + else + { + gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX; + gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY; + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(gameObjectMatrix, calcMatrix); + } + + // Blend Mode + ctx.globalCompositeOperation = renderer.blendModes[src.blendMode]; + + // Alpha + ctx.globalAlpha = alpha; + + ctx.save(); + + calcMatrix.setToContext(ctx); + + ctx.imageSmoothingEnabled = !(!renderer.antialias || (src.frame && src.frame.source.scaleMode)); + + return true; }; +module.exports = SetTransform; + /***/ }), -/* 32 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5821,7 +5526,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Vector2 = __webpack_require__(3); /** @@ -6254,7 +5959,7 @@ var TransformMatrix = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. * - * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. */ multiply: function (rhs, out) { @@ -6779,7 +6484,7 @@ module.exports = TransformMatrix; /***/ }), -/* 33 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6789,10 +6494,310 @@ module.exports = TransformMatrix; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(162); -var GetColor32 = __webpack_require__(292); -var HSVToRGB = __webpack_require__(163); -var RGBToHSV = __webpack_require__(293); +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var Line = __webpack_require__(56); + +/** + * @classdesc + * 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 + * @memberof Phaser.GameObjects + * @constructor + * @since 3.13.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @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 {string} [type] - The internal type of the Shape. + * @param {any} [data] - The data of the source shape geometry, if any. + */ +var Shape = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.AlphaSingle, + Components.BlendMode, + Components.ComputedSize, + Components.Depth, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Transform, + Components.Visible + ], + + initialize: + + function Shape (scene, type, data) + { + if (type === undefined) { type = 'Shape'; } + + GameObject.call(this, scene, type); + + /** + * The source Shape data. Typically a geometry object. + * You should not manipulate this directly. + * + * @name Phaser.GameObjects.Shape#data + * @type {any} + * @readonly + * @since 3.13.0 + */ + this.geom = data; + + /** + * Holds the polygon path data for filled rendering. + * + * @name Phaser.GameObjects.Shape#pathData + * @type {number[]} + * @readonly + * @since 3.13.0 + */ + this.pathData = []; + + /** + * Holds the earcut polygon path index data for filled rendering. + * + * @name Phaser.GameObjects.Shape#pathIndexes + * @type {integer[]} + * @readonly + * @since 3.13.0 + */ + this.pathIndexes = []; + + /** + * The fill color used by this Shape. + * + * @name Phaser.GameObjects.Shape#fillColor + * @type {number} + * @since 3.13.0 + */ + this.fillColor = 0xffffff; + + /** + * The fill alpha value used by this Shape. + * + * @name Phaser.GameObjects.Shape#fillAlpha + * @type {number} + * @since 3.13.0 + */ + this.fillAlpha = 1; + + /** + * The stroke color used by this Shape. + * + * @name Phaser.GameObjects.Shape#strokeColor + * @type {number} + * @since 3.13.0 + */ + this.strokeColor = 0xffffff; + + /** + * The stroke alpha value used by this Shape. + * + * @name Phaser.GameObjects.Shape#strokeAlpha + * @type {number} + * @since 3.13.0 + */ + this.strokeAlpha = 1; + + /** + * The stroke line width used by this Shape. + * + * @name Phaser.GameObjects.Shape#lineWidth + * @type {number} + * @since 3.13.0 + */ + this.lineWidth = 1; + + /** + * Controls if this Shape is filled or not. + * Note that some Shapes do not support being filled (such as Line shapes) + * + * @name Phaser.GameObjects.Shape#isFilled + * @type {boolean} + * @since 3.13.0 + */ + this.isFilled = false; + + /** + * Controls if this Shape is stroked or not. + * Note that some Shapes do not support being stroked (such as Iso Box shapes) + * + * @name Phaser.GameObjects.Shape#isStroked + * @type {boolean} + * @since 3.13.0 + */ + this.isStroked = false; + + /** + * Controls if this Shape path is closed during rendering when stroked. + * Note that some Shapes are always closed when stroked (such as Ellipse shapes) + * + * @name Phaser.GameObjects.Shape#closePath + * @type {boolean} + * @since 3.13.0 + */ + this.closePath = true; + + /** + * Private internal value. + * A Line used when parsing internal path data to avoid constant object re-creation. + * + * @name Phaser.GameObjects.Curve#_tempLine + * @type {Phaser.Geom.Line} + * @private + * @since 3.13.0 + */ + this._tempLine = new Line(); + + this.initPipeline(); + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Shape#setFillStyle + * @since 3.13.0 + * + * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled. + * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given. + * + * @return {this} This Game Object instance. + */ + setFillStyle: function (color, alpha) + { + if (alpha === undefined) { alpha = 1; } + + if (color === undefined) + { + this.isFilled = false; + } + else + { + this.fillColor = color; + this.fillAlpha = alpha; + this.isFilled = true; + } + + return 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. + * + * @method Phaser.GameObjects.Shape#setStrokeStyle + * @since 3.13.0 + * + * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked. + * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked. + * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given. + * + * @return {this} This Game Object instance. + */ + setStrokeStyle: function (lineWidth, color, alpha) + { + if (alpha === undefined) { alpha = 1; } + + if (lineWidth === undefined) + { + this.isStroked = false; + } + else + { + this.lineWidth = lineWidth; + this.strokeColor = color; + this.strokeAlpha = alpha; + this.isStroked = true; + } + + return 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. + * + * @method Phaser.GameObjects.Shape#setClosePath + * @since 3.13.0 + * + * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`. + * + * @return {this} This Game Object instance. + */ + setClosePath: function (value) + { + this.closePath = value; + + return this; + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method Phaser.GameObjects.Shape#preDestroy + * @protected + * @since 3.13.0 + */ + preDestroy: function () + { + this.geom = null; + this._tempLine = null; + this.pathData = []; + this.pathIndexes = []; + } + +}); + +module.exports = Shape; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetColor = __webpack_require__(165); +var GetColor32 = __webpack_require__(295); +var HSVToRGB = __webpack_require__(166); +var RGBToHSV = __webpack_require__(296); /** * @namespace Phaser.Display.Color @@ -7641,6 +7646,199 @@ var Color = new Class({ module.exports = Color; +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Tilemaps.Formats + */ + +module.exports = { + + /** + * CSV Map Type + * + * @name Phaser.Tilemaps.Formats.CSV + * @type {number} + * @since 3.0.0 + */ + CSV: 0, + + /** + * Tiled JSON Map Type + * + * @name Phaser.Tilemaps.Formats.TILED_JSON + * @type {number} + * @since 3.0.0 + */ + TILED_JSON: 1, + + /** + * 2D Array Map Type + * + * @name Phaser.Tilemaps.Formats.ARRAY_2D + * @type {number} + * @since 3.0.0 + */ + ARRAY_2D: 2, + + /** + * Weltmeister (Impact.js) Map Type + * + * @name Phaser.Tilemaps.Formats.WELTMEISTER + * @type {number} + * @since 3.0.0 + */ + WELTMEISTER: 3 + +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Global constants. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.23.0', + + BlendModes: __webpack_require__(52), + + ScaleModes: __webpack_require__(234), + + /** + * AUTO Detect Renderer. + * + * @name Phaser.AUTO + * @const + * @type {integer} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Canvas Renderer. + * + * @name Phaser.CANVAS + * @const + * @type {integer} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * WebGL Renderer. + * + * @name Phaser.WEBGL + * @const + * @type {integer} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * Headless Renderer. + * + * @name Phaser.HEADLESS + * @const + * @type {integer} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {integer} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {integer} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {integer} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {integer} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {integer} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {integer} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + /***/ }), /* 34 */ /***/ (function(module, exports) { @@ -7718,7 +7916,7 @@ module.exports = PropertyValueInc; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(15); /** * Convert the given angle from degrees, to the equivalent angle in radians. @@ -7740,6 +7938,43 @@ module.exports = DegToRad; /***/ }), /* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Cameras.Scene2D.Events + */ + +module.exports = { + + DESTROY: __webpack_require__(646), + FADE_IN_COMPLETE: __webpack_require__(647), + FADE_IN_START: __webpack_require__(648), + FADE_OUT_COMPLETE: __webpack_require__(649), + FADE_OUT_START: __webpack_require__(650), + FLASH_COMPLETE: __webpack_require__(651), + FLASH_START: __webpack_require__(652), + PAN_COMPLETE: __webpack_require__(653), + PAN_START: __webpack_require__(654), + POST_RENDER: __webpack_require__(655), + PRE_RENDER: __webpack_require__(656), + ROTATE_COMPLETE: __webpack_require__(657), + ROTATE_START: __webpack_require__(658), + SHAKE_COMPLETE: __webpack_require__(659), + SHAKE_START: __webpack_require__(660), + ZOOM_COMPLETE: __webpack_require__(661), + ZOOM_START: __webpack_require__(662) + +}; + + +/***/ }), +/* 37 */ /***/ (function(module, exports) { /** @@ -7776,8 +8011,8 @@ module.exports = FillStyleCanvas; /***/ }), -/* 37 */, -/* 38 */ +/* 38 */, +/* 39 */ /***/ (function(module, exports) { /** @@ -7805,7 +8040,7 @@ module.exports = GetBottom; /***/ }), -/* 39 */ +/* 40 */ /***/ (function(module, exports) { /** @@ -7838,7 +8073,7 @@ module.exports = SetTop; /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports) { /** @@ -7866,7 +8101,7 @@ module.exports = GetLeft; /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports) { /** @@ -7899,7 +8134,7 @@ module.exports = SetLeft; /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports) { /** @@ -7927,7 +8162,7 @@ module.exports = GetRight; /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports) { /** @@ -7960,7 +8195,7 @@ module.exports = SetRight; /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -7993,7 +8228,7 @@ module.exports = SetBottom; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -8021,7 +8256,7 @@ module.exports = GetTop; /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports) { /** @@ -8101,7 +8336,7 @@ module.exports = GEOM_CONST; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports) { /** @@ -8135,41 +8370,6 @@ var Contains = function (rect, x, y) module.exports = Contains; -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Cameras.Scene2D.Events - */ - -module.exports = { - - 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) - -}; - - /***/ }), /* 49 */ /***/ (function(module, exports) { @@ -8347,7 +8547,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(138); +var GetTileAt = __webpack_require__(142); var GetTilesWithin = __webpack_require__(24); /** @@ -8792,52 +8992,52 @@ module.exports = DistanceBetween; module.exports = { - 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) + BOOT: __webpack_require__(821), + DESTROY: __webpack_require__(822), + DRAG_END: __webpack_require__(823), + DRAG_ENTER: __webpack_require__(824), + DRAG: __webpack_require__(825), + DRAG_LEAVE: __webpack_require__(826), + DRAG_OVER: __webpack_require__(827), + DRAG_START: __webpack_require__(828), + DROP: __webpack_require__(829), + GAME_OUT: __webpack_require__(830), + GAME_OVER: __webpack_require__(831), + GAMEOBJECT_DOWN: __webpack_require__(832), + GAMEOBJECT_DRAG_END: __webpack_require__(833), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(834), + GAMEOBJECT_DRAG: __webpack_require__(835), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(836), + GAMEOBJECT_DRAG_OVER: __webpack_require__(837), + GAMEOBJECT_DRAG_START: __webpack_require__(838), + GAMEOBJECT_DROP: __webpack_require__(839), + GAMEOBJECT_MOVE: __webpack_require__(840), + GAMEOBJECT_OUT: __webpack_require__(841), + GAMEOBJECT_OVER: __webpack_require__(842), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(843), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(844), + GAMEOBJECT_POINTER_OUT: __webpack_require__(845), + GAMEOBJECT_POINTER_OVER: __webpack_require__(846), + GAMEOBJECT_POINTER_UP: __webpack_require__(847), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(848), + GAMEOBJECT_UP: __webpack_require__(849), + GAMEOBJECT_WHEEL: __webpack_require__(850), + MANAGER_BOOT: __webpack_require__(851), + MANAGER_PROCESS: __webpack_require__(852), + MANAGER_UPDATE: __webpack_require__(853), + POINTER_DOWN: __webpack_require__(854), + POINTER_DOWN_OUTSIDE: __webpack_require__(855), + POINTER_MOVE: __webpack_require__(856), + POINTER_OUT: __webpack_require__(857), + POINTER_OVER: __webpack_require__(858), + POINTER_UP: __webpack_require__(859), + POINTER_UP_OUTSIDE: __webpack_require__(860), + POINTER_WHEEL: __webpack_require__(861), + POINTERLOCK_CHANGE: __webpack_require__(862), + PRE_UPDATE: __webpack_require__(863), + SHUTDOWN: __webpack_require__(864), + START: __webpack_require__(865), + UPDATE: __webpack_require__(866) }; @@ -8894,10 +9094,10 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(272); -var GetPoints = __webpack_require__(150); -var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(151); +var GetPoint = __webpack_require__(275); +var GetPoints = __webpack_require__(153); +var GEOM_CONST = __webpack_require__(47); +var Random = __webpack_require__(154); var Vector2 = __webpack_require__(3); /** @@ -9043,7 +9243,7 @@ var Line = new Class({ * @param {number} [x2=0] - The x coordinate of the lines ending point. * @param {number} [y2=0] - The y coordinate of the lines ending point. * - * @return {Phaser.Geom.Line} This Line object. + * @return {this} This Line object. */ setTo: function (x1, y1, x2, y2) { @@ -9296,29 +9496,29 @@ module.exports = Wrap; module.exports = { - 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) + COMPLETE: __webpack_require__(889), + DECODED: __webpack_require__(890), + DECODED_ALL: __webpack_require__(891), + DESTROY: __webpack_require__(892), + DETUNE: __webpack_require__(893), + GLOBAL_DETUNE: __webpack_require__(894), + GLOBAL_MUTE: __webpack_require__(895), + GLOBAL_RATE: __webpack_require__(896), + GLOBAL_VOLUME: __webpack_require__(897), + LOOP: __webpack_require__(898), + LOOPED: __webpack_require__(899), + MUTE: __webpack_require__(900), + PAUSE_ALL: __webpack_require__(901), + PAUSE: __webpack_require__(902), + PLAY: __webpack_require__(903), + RATE: __webpack_require__(904), + RESUME_ALL: __webpack_require__(905), + RESUME: __webpack_require__(906), + SEEK: __webpack_require__(907), + STOP_ALL: __webpack_require__(908), + STOP: __webpack_require__(909), + UNLOCKED: __webpack_require__(910), + VOLUME: __webpack_require__(911) }; @@ -9334,7 +9534,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -9346,7 +9546,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -9450,7 +9650,7 @@ var JSONFile = new Class({ * Adds a JSON file, or array of JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -9465,14 +9665,14 @@ var JSONFile = new Class({ * 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 JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.json({ * key: 'wavedata', @@ -9483,7 +9683,7 @@ var JSONFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.json('wavedata', 'files/AlienWaveData.json'); * // and later in your game ... @@ -9502,7 +9702,7 @@ var JSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -9522,7 +9722,7 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -9530,7 +9730,7 @@ var JSONFile = new Class({ * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) { @@ -9902,10 +10102,10 @@ module.exports = WorldToTileY; var Class = __webpack_require__(0); 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__(147); +var GetPoint = __webpack_require__(266); +var GetPoints = __webpack_require__(267); +var GEOM_CONST = __webpack_require__(47); +var Random = __webpack_require__(150); /** * @classdesc @@ -10069,7 +10269,7 @@ var Circle = new Class({ * @param {number} [y=0] - The y position of the center of the circle. * @param {number} [radius=0] - The radius of the circle. * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setTo: function (x, y, radius) { @@ -10088,7 +10288,7 @@ var Circle = new Class({ * @method Phaser.Geom.Circle#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setEmpty: function () { @@ -10107,7 +10307,7 @@ var Circle = new Class({ * @param {number} [x=0] - The x position of the center of the circle. * @param {number} [y=0] - The y position of the center of the circle. * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setPosition: function (x, y) { @@ -11048,172 +11248,103 @@ module.exports = SafeRange; * @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__(960); +var EaseMap = __webpack_require__(115); +var UppercaseFirst = __webpack_require__(181); /** - * @classdesc - * A Sprite Game Object. + * This internal function is used to return the correct ease function for a Tween. + * + * It can take a variety of input, including an EaseMap based string, or a custom function. * - * 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. - * - * @class Sprite - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects - * @constructor + * @function Phaser.Tweens.Builders.GetEaseFunction * @since 3.0.0 * - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.TextureCrop - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible + * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function. + * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. * - * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @return {function} The ease function. */ -var Sprite = new Class({ +var GetEaseFunction = function (ease, easeParams) +{ + // Default ease function + var easeFunction = EaseMap.Power0; - Extends: GameObject, - - Mixins: [ - Components.Alpha, - Components.BlendMode, - Components.Depth, - Components.Flip, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Size, - Components.TextureCrop, - Components.Tint, - Components.Transform, - Components.Visible, - SpriteRender - ], - - initialize: - - function Sprite (scene, x, y, texture, frame) + // Prepare ease function + if (typeof ease === 'string') { - GameObject.call(this, scene, 'Sprite'); + // String based look-up - /** - * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. - * - * @name Phaser.GameObjects.Sprite#_crop - * @type {object} - * @private - * @since 3.11.0 - */ - this._crop = this.resetCropObject(); + // 1) They specified it correctly + if (EaseMap.hasOwnProperty(ease)) + { + easeFunction = EaseMap[ease]; + } + else + { + // Do some string manipulation to try and find it + var direction = ''; - /** - * The Animation Controller of this Sprite. - * - * @name Phaser.GameObjects.Sprite#anims - * @type {Phaser.GameObjects.Components.Animation} - * @since 3.0.0 - */ - this.anims = new Components.Animation(this); + if (ease.indexOf('.')) + { + // quad.in = Quad.easeIn + // quad.out = Quad.easeOut + // quad.inout = Quad.easeInOut - this.setTexture(texture, frame); - this.setPosition(x, y); - this.setSizeToFrame(); - this.setOriginFromFrame(); - this.initPipeline(); - }, + direction = ease.substr(ease.indexOf('.') + 1); - /** - * Update this Sprite's animations. - * - * @method Phaser.GameObjects.Sprite#preUpdate - * @protected - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - preUpdate: function (time, delta) + if (direction.toLowerCase() === 'in') + { + direction = 'easeIn'; + } + else if (direction.toLowerCase() === 'out') + { + direction = 'easeOut'; + } + else if (direction.toLowerCase() === 'inout') + { + direction = 'easeInOut'; + } + } + + ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction); + + if (EaseMap.hasOwnProperty(ease)) + { + easeFunction = EaseMap[ease]; + } + } + } + else if (typeof ease === 'function') { - this.anims.update(time, delta); - }, - - /** - * Start playing the given animation. - * - * @method Phaser.GameObjects.Sprite#play - * @since 3.0.0 - * - * @param {string} key - The string-based key of the animation to play. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.Sprite} This Game Object. - */ - play: function (key, ignoreIfPlaying, startFrame) + // Custom function + easeFunction = ease; + } + else if (Array.isArray(ease) && ease.length === 4) { - this.anims.play(key, ignoreIfPlaying, startFrame); - - return this; - }, - - /** - * Build a JSON representation of this Sprite. - * - * @method Phaser.GameObjects.Sprite#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ - toJSON: function () - { - var data = Components.ToJSON(this); - - // Extra Sprite data is added here - - return data; - }, - - /** - * Handles the pre-destroy step for the Sprite, which removes the Animation component. - * - * @method Phaser.GameObjects.Sprite#preDestroy - * @private - * @since 3.14.0 - */ - preDestroy: function () - { - this.anims.destroy(); - - this.anims = undefined; + // Bezier function (TODO) } -}); + // No custom ease parameters? + if (!easeParams) + { + // Return ease function + return easeFunction; + } -module.exports = Sprite; + var cloneParams = easeParams.slice(0); + + cloneParams.unshift(0); + + // Return ease function with custom ease parameters + return function (v) + { + cloneParams[0] = v; + + return easeFunction.apply(this, cloneParams); + }; +}; + +module.exports = GetEaseFunction; /***/ }), @@ -11226,7 +11357,7 @@ module.exports = Sprite; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders a stroke outline around the given Shape. @@ -11303,11 +11434,11 @@ module.exports = StrokePathWebGL; var Class = __webpack_require__(0); var Contains = __webpack_require__(83); -var GetPoint = __webpack_require__(417); -var GetPoints = __webpack_require__(418); -var GEOM_CONST = __webpack_require__(46); +var GetPoint = __webpack_require__(424); +var GetPoints = __webpack_require__(425); +var GEOM_CONST = __webpack_require__(47); var Line = __webpack_require__(56); -var Random = __webpack_require__(155); +var Random = __webpack_require__(158); /** * @classdesc @@ -11495,7 +11626,7 @@ var Triangle = new Class({ * @param {number} [x3=0] - `x` coordinate of the third point. * @param {number} [y3=0] - `y` coordinate of the third point. * - * @return {Phaser.Geom.Triangle} This Triangle object. + * @return {this} This Triangle object. */ setTo: function (x1, y1, x2, y2, x3, y3) { @@ -11749,7 +11880,7 @@ module.exports = Triangle; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -11760,7 +11891,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -11904,7 +12035,7 @@ var ImageFile = new Class({ * Adds an Image, or array of Images, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -11919,7 +12050,7 @@ var ImageFile = new Class({ * 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. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback * of animated gifs to Canvas elements. @@ -11930,7 +12061,7 @@ var ImageFile = new Class({ * 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.image({ * key: 'logo', @@ -11941,7 +12072,7 @@ var ImageFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` 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.image('logo', 'images/AtariLogo.png'); * // and later in your game ... @@ -11960,13 +12091,13 @@ var ImageFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -11982,14 +12113,14 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string|string[]} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('image', function (key, url, xhrSettings) { @@ -12060,7 +12191,7 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(436); +var Rectangle = __webpack_require__(443); /** * @classdesc @@ -12495,7 +12626,7 @@ var Tile = new Class({ * @since 3.0.0 * * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check. - * @param {object} [output] - [description] + * @param {Phaser.Geom.Rectangle} [output] - Optional Rectangle object to store the results in. * * @return {(Phaser.Geom.Rectangle|object)} */ @@ -12888,6 +13019,184 @@ module.exports = Tile; /***/ }), /* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @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__(13); +var SpriteRender = __webpack_require__(965); + +/** + * @classdesc + * A 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. + * + * @class Sprite + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Size + * @extends Phaser.GameObjects.Components.TextureCrop + * @extends Phaser.GameObjects.Components.Tint + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. + */ +var Sprite = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Size, + Components.TextureCrop, + Components.Tint, + Components.Transform, + Components.Visible, + SpriteRender + ], + + initialize: + + function Sprite (scene, x, y, texture, frame) + { + GameObject.call(this, scene, 'Sprite'); + + /** + * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. + * + * @name Phaser.GameObjects.Sprite#_crop + * @type {object} + * @private + * @since 3.11.0 + */ + this._crop = this.resetCropObject(); + + /** + * The Animation Controller of this Sprite. + * + * @name Phaser.GameObjects.Sprite#anims + * @type {Phaser.GameObjects.Components.Animation} + * @since 3.0.0 + */ + this.anims = new Components.Animation(this); + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.setOriginFromFrame(); + this.initPipeline(); + }, + + /** + * Update this Sprite's animations. + * + * @method Phaser.GameObjects.Sprite#preUpdate + * @protected + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + preUpdate: function (time, delta) + { + this.anims.update(time, delta); + }, + + /** + * Start playing the given animation. + * + * @method Phaser.GameObjects.Sprite#play + * @since 3.0.0 + * + * @param {string} key - The string-based key of the animation to play. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {this} This Game Object. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + this.anims.play(key, ignoreIfPlaying, startFrame); + + return this; + }, + + /** + * Build a JSON representation of this Sprite. + * + * @method Phaser.GameObjects.Sprite#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ + toJSON: function () + { + var data = Components.ToJSON(this); + + // Extra Sprite data is added here + + return data; + }, + + /** + * Handles the pre-destroy step for the Sprite, which removes the Animation component. + * + * @method Phaser.GameObjects.Sprite#preDestroy + * @private + * @since 3.14.0 + */ + preDestroy: function () + { + this.anims.destroy(); + + this.anims = undefined; + } + +}); + +module.exports = Sprite; + + +/***/ }), +/* 76 */ /***/ (function(module, exports) { /** @@ -12915,7 +13224,7 @@ module.exports = GetCenterX; /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports) { /** @@ -12950,7 +13259,7 @@ module.exports = SetCenterX; /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports) { /** @@ -12978,7 +13287,7 @@ module.exports = GetCenterY; /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports) { /** @@ -13013,7 +13322,7 @@ module.exports = SetCenterY; /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports) { /** @@ -13059,7 +13368,7 @@ module.exports = SpliceOne; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13069,7 +13378,7 @@ module.exports = SpliceOne; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(174); +var FromPoints = __webpack_require__(176); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -13553,17 +13862,16 @@ var Curve = new Class({ return this.getTangent(t, out); }, - // Given a distance in pixels, get a t to find p. /** - * [description] + * Given a distance in pixels, get a t to find p. * * @method Phaser.Curves.Curve#getTFromDistance * @since 3.0.0 * - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The distance. */ getTFromDistance: function (distance, divisions) { @@ -13575,19 +13883,17 @@ var Curve = new Class({ return this.getUtoTmapping(0, distance, divisions); }, - // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant - /** - * [description] + * Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant. * * @method Phaser.Curves.Curve#getUtoTmapping * @since 3.0.0 * - * @param {number} u - [description] - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {number} u - A float between 0 and 1. + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The equidistant value. */ getUtoTmapping: function (u, distance, divisions) { @@ -13679,7 +13985,7 @@ module.exports = Curve; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13694,129 +14000,20 @@ module.exports = Curve; module.exports = { - 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) + ADD: __webpack_require__(868), + COMPLETE: __webpack_require__(869), + FILE_COMPLETE: __webpack_require__(870), + FILE_KEY_COMPLETE: __webpack_require__(871), + FILE_LOAD_ERROR: __webpack_require__(872), + FILE_LOAD: __webpack_require__(873), + FILE_PROGRESS: __webpack_require__(874), + POST_PROCESS: __webpack_require__(875), + PROGRESS: __webpack_require__(876), + START: __webpack_require__(877) }; -/***/ }), -/* 82 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var EaseMap = __webpack_require__(166); -var UppercaseFirst = __webpack_require__(179); - -/** - * This internal function is used to return the correct ease function for a Tween. - * - * It can take a variety of input, including an EaseMap based string, or a custom function. - * - * @function Phaser.Tweens.Builders.GetEaseFunction - * @since 3.0.0 - * - * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function. - * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. - * - * @return {function} The ease function. - */ -var GetEaseFunction = function (ease, easeParams) -{ - // Default ease function - var easeFunction = EaseMap.Power0; - - // Prepare ease function - if (typeof ease === 'string') - { - // String based look-up - - // 1) They specified it correctly - if (EaseMap.hasOwnProperty(ease)) - { - easeFunction = EaseMap[ease]; - } - else - { - // Do some string manipulation to try and find it - var direction = ''; - - if (ease.indexOf('.')) - { - // quad.in = Quad.easeIn - // quad.out = Quad.easeOut - // quad.inout =Quad.easeInOut - - direction = ease.substr(ease.indexOf('.') + 1); - - if (direction.toLowerCase() === 'in') - { - direction = 'easeIn'; - } - else if (direction.toLowerCase() === 'out') - { - direction = 'easeOut'; - } - else if (direction.toLowerCase() === 'inout') - { - direction = 'easeInOut'; - } - } - - ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction); - - if (EaseMap.hasOwnProperty(ease)) - { - easeFunction = EaseMap[ease]; - } - } - } - else if (typeof ease === 'function') - { - // Custom function - easeFunction = ease; - } - else if (Array.isArray(ease) && ease.length === 4) - { - // Bezier function (TODO) - } - - // No custom ease parameters? - if (!easeParams) - { - // Return ease function - return easeFunction; - } - - var cloneParams = easeParams.slice(0); - - cloneParams.unshift(0); - - // Return ease function with custom ease parameters - return function (v) - { - cloneParams[0] = v; - - return easeFunction.apply(this, cloneParams); - }; -}; - -module.exports = GetEaseFunction; - - /***/ }), /* 83 */ /***/ (function(module, exports) { @@ -13985,7 +14182,7 @@ module.exports = Angle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -14238,17 +14435,17 @@ module.exports = TWEEN_CONST; module.exports = { - 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) + DESTROY: __webpack_require__(581), + VIDEO_COMPLETE: __webpack_require__(582), + VIDEO_CREATED: __webpack_require__(583), + VIDEO_ERROR: __webpack_require__(584), + VIDEO_LOOP: __webpack_require__(585), + VIDEO_PLAY: __webpack_require__(586), + VIDEO_SEEKED: __webpack_require__(587), + VIDEO_SEEKING: __webpack_require__(588), + VIDEO_STOP: __webpack_require__(589), + VIDEO_TIMEOUT: __webpack_require__(590), + VIDEO_UNLOCKED: __webpack_require__(591) }; @@ -14266,11 +14463,11 @@ module.exports = { var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DegToRad = __webpack_require__(35); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(48); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(36); var Rectangle = __webpack_require__(11); -var TransformMatrix = __webpack_require__(32); -var ValueToColor = __webpack_require__(161); +var TransformMatrix = __webpack_require__(29); +var ValueToColor = __webpack_require__(164); var Vector2 = __webpack_require__(3); /** @@ -14868,7 +15065,7 @@ var BaseCamera = new Class({ * * @param {number} x - The horizontal coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOnX: function (x) { @@ -14895,7 +15092,7 @@ var BaseCamera = new Class({ * * @param {number} y - The vertical coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOnY: function (y) { @@ -14922,7 +15119,7 @@ var BaseCamera = new Class({ * @param {number} x - The horizontal coordinate to center on. * @param {number} y - The vertical coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOn: function (x, y) { @@ -14938,7 +15135,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerToBounds: function () { @@ -14963,7 +15160,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerToSize: function () { @@ -15131,7 +15328,7 @@ var BaseCamera = new Class({ * * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group)} entries - The Game Object, or array of Game Objects, to be ignored by this Camera. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ ignore: function (entries) { @@ -15301,7 +15498,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ removeBounds: function () { @@ -15324,7 +15521,7 @@ var BaseCamera = new Class({ * * @param {number} [value=0] - The cameras angle of rotation, given in degrees. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setAngle: function (value) { @@ -15348,7 +15545,7 @@ var BaseCamera = new Class({ * * @param {(string|number|Phaser.Types.Display.InputColorObject)} [color='rgba(0,0,0,0)'] - The color value. In CSS, hex or numeric color notation. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setBackgroundColor: function (color) { @@ -15389,7 +15586,7 @@ var BaseCamera = new Class({ * @param {integer} height - The height of the bounds, in pixels. * @param {boolean} [centerOn=false] - If `true` the Camera will automatically be centered on the new bounds. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setBounds: function (x, y, width, height, centerOn) { @@ -15447,7 +15644,7 @@ var BaseCamera = new Class({ * * @param {string} [value=''] - The name of the Camera. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setName: function (value) { @@ -15469,7 +15666,7 @@ var BaseCamera = new Class({ * @param {number} x - The top-left x coordinate of the Camera viewport. * @param {number} [y=x] - The top-left y coordinate of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setPosition: function (x, y) { @@ -15491,7 +15688,7 @@ var BaseCamera = new Class({ * * @param {number} [value=0] - The rotation of the Camera, in radians. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setRotation: function (value) { @@ -15512,7 +15709,7 @@ var BaseCamera = new Class({ * * @param {boolean} value - `true` to round Camera pixels, `false` to not. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setRoundPixels: function (value) { @@ -15531,7 +15728,7 @@ var BaseCamera = new Class({ * * @param {Phaser.Scene} scene - The Scene the camera is bound to. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setScene: function (scene) { @@ -15575,7 +15772,7 @@ var BaseCamera = new Class({ * @param {number} x - The x coordinate of the Camera in the game world. * @param {number} [y=x] - The y coordinate of the Camera in the game world. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setScroll: function (x, y) { @@ -15600,7 +15797,7 @@ var BaseCamera = new Class({ * @param {integer} width - The width of the Camera viewport. * @param {integer} [height=width] - The height of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setSize: function (width, height) { @@ -15631,7 +15828,7 @@ var BaseCamera = new Class({ * @param {integer} width - The width of the Camera viewport. * @param {integer} [height=width] - The height of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setViewport: function (x, y, width, height) { @@ -15658,7 +15855,7 @@ var BaseCamera = new Class({ * * @param {number} [value=1] - The zoom value of the Camera. The minimum it can be is 0.001. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setZoom: function (value) { @@ -16190,12 +16387,12 @@ module.exports = BaseCamera; module.exports = { - 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) + ENTER_FULLSCREEN: __webpack_require__(702), + FULLSCREEN_FAILED: __webpack_require__(703), + FULLSCREEN_UNSUPPORTED: __webpack_require__(704), + LEAVE_FULLSCREEN: __webpack_require__(705), + ORIENTATION_CHANGE: __webpack_require__(706), + RESIZE: __webpack_require__(707) }; @@ -16255,8 +16452,8 @@ module.exports = SnapFloor; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(22); -var Extend = __webpack_require__(17); +var Clamp = __webpack_require__(19); +var Extend = __webpack_require__(18); /** * @classdesc @@ -17075,10 +17272,10 @@ module.exports = Frame; var Class = __webpack_require__(0); var Contains = __webpack_require__(96); -var GetPoint = __webpack_require__(390); -var GetPoints = __webpack_require__(391); -var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(154); +var GetPoint = __webpack_require__(397); +var GetPoints = __webpack_require__(398); +var GEOM_CONST = __webpack_require__(47); +var Random = __webpack_require__(157); /** * @classdesc @@ -17245,7 +17442,7 @@ var Ellipse = new Class({ * @param {number} width - The width of the ellipse. * @param {number} height - The height of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setTo: function (x, y, width, height) { @@ -17264,7 +17461,7 @@ var Ellipse = new Class({ * @method Phaser.Geom.Ellipse#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setEmpty: function () { @@ -17283,7 +17480,7 @@ var Ellipse = new Class({ * @param {number} x - The x position of the center of the ellipse. * @param {number} y - The y position of the center of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setPosition: function (x, y) { @@ -17305,7 +17502,7 @@ var Ellipse = new Class({ * @param {number} width - The width of the ellipse. * @param {number} [height=width] - The height of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setSize: function (width, height) { @@ -17497,15 +17694,15 @@ module.exports = Contains; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(238); +var Actions = __webpack_require__(241); 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__(384); -var Set = __webpack_require__(108); -var Sprite = __webpack_require__(69); +var Range = __webpack_require__(391); +var Set = __webpack_require__(133); +var Sprite = __webpack_require__(75); /** * @classdesc @@ -18014,7 +18211,7 @@ var Group = new Class({ * @param {Phaser.GameObjects.GameObject} child - The Game Object to add. * @param {boolean} [addToScene=false] - Also add the Game Object to the scene. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ add: function (child, addToScene) { @@ -18063,7 +18260,7 @@ var Group = new Class({ * @param {Phaser.GameObjects.GameObject[]} children - The Game Objects to add. * @param {boolean} [addToScene=false] - Also add the Game Objects to the scene. * - * @return {Phaser.GameObjects.Group} This group. + * @return {this} This group. */ addMultiple: function (children, addToScene) { @@ -18092,7 +18289,7 @@ var Group = new Class({ * @param {boolean} [removeFromScene=false] - Optionally remove the Group member from the Scene it belongs to. * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group member. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ remove: function (child, removeFromScene, destroyChild) { @@ -18146,7 +18343,7 @@ var Group = new Class({ * @param {boolean} [removeFromScene=false] - Optionally remove each Group member from the Scene. * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group members. * - * @return {Phaser.GameObjects.Group} This group. + * @return {this} This group. */ clear: function (removeFromScene, destroyChild) { @@ -18509,7 +18706,7 @@ var Group = new Class({ * @param {string} key - The string-based key of the animation to play. * @param {string} [startFrame=0] - Optionally start the animation playing from this frame index. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ playAnimation: function (key, startFrame) { @@ -18608,7 +18805,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ propertyValueSet: function (key, value, step, index, direction) { @@ -18629,7 +18826,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ propertyValueInc: function (key, value, step, index, direction) { @@ -18647,7 +18844,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setX: function (value, step) { @@ -18665,7 +18862,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setY: function (value, step) { @@ -18685,7 +18882,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setXY: function (x, y, stepX, stepY) { @@ -18703,7 +18900,7 @@ var Group = new Class({ * @param {number} value - The amount to be added to the `x` property. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incX: function (value, step) { @@ -18721,7 +18918,7 @@ var Group = new Class({ * @param {number} value - The amount to be added to the `y` property. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incY: function (value, step) { @@ -18741,7 +18938,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incXY: function (x, y, stepX, stepY) { @@ -18763,7 +18960,7 @@ var Group = new Class({ * @param {number} y - The y coordinate to place the first item in the array at. * @param {integer} [direction=0] - The iteration direction. 0 = first to last and 1 = last to first. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ shiftPosition: function (x, y, direction) { @@ -18781,7 +18978,7 @@ var Group = new Class({ * @param {number} value - The amount to set the angle to, in degrees. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ angle: function (value, step) { @@ -18799,7 +18996,7 @@ var Group = new Class({ * @param {number} value - The amount to set the rotation to, in radians. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotate: function (value, step) { @@ -18817,7 +19014,7 @@ var Group = new Class({ * @param {Phaser.Types.Math.Vector2Like} point - Any object with public `x` and `y` properties. * @param {number} angle - The angle to rotate by, in radians. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotateAround: function (point, angle) { @@ -18836,7 +19033,7 @@ var Group = new Class({ * @param {number} angle - The angle to rotate by, in radians. * @param {number} distance - The distance from the point of rotation in pixels. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotateAroundDistance: function (point, angle, distance) { @@ -18854,7 +19051,7 @@ var Group = new Class({ * @param {number} value - The amount to set the alpha to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setAlpha: function (value, step) { @@ -18874,7 +19071,7 @@ var Group = new Class({ * @param {number} [bottomLeft] - The tint to be applied to the bottom-left corner of item. * @param {number} [bottomRight] - The tint to be applied to the bottom-right corner of item. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setTint: function (topLeft, topRight, bottomLeft, bottomRight) { @@ -18894,7 +19091,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `originX` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `originY` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setOrigin: function (originX, originY, stepX, stepY) { @@ -18912,7 +19109,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleX: function (value, step) { @@ -18930,7 +19127,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleY: function (value, step) { @@ -18950,7 +19147,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `scaleY` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleXY: function (scaleX, scaleY, stepX, stepY) { @@ -18968,7 +19165,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setDepth: function (value, step) { @@ -18985,7 +19182,7 @@ var Group = new Class({ * * @param {number} value - The amount to set the property to. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setBlendMode: function (value) { @@ -19003,7 +19200,7 @@ var Group = new Class({ * @param {*} hitArea - 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 {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setHitArea: function (hitArea, hitAreaCallback) { @@ -19018,7 +19215,7 @@ var Group = new Class({ * @method Phaser.GameObjects.Group#shuffle * @since 3.21.0 * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ shuffle: function () { @@ -19070,7 +19267,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setVisible: function (value, index, direction) { @@ -19085,7 +19282,7 @@ var Group = new Class({ * @method Phaser.GameObjects.Group#toggleVisible * @since 3.0.0 * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ toggleVisible: function () { @@ -19135,137 +19332,7 @@ module.exports = Group; * @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__(963); - -/** - * @classdesc - * An Image Game Object. - * - * An Image is a light-weight Game Object useful for the display of static images in your game, - * such as logos, backgrounds, scenery or other non-animated elements. Images can have input - * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an - * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. - * - * @class Image - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.TextureCrop - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. - */ -var Image = new Class({ - - Extends: GameObject, - - Mixins: [ - Components.Alpha, - Components.BlendMode, - Components.Depth, - Components.Flip, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Size, - Components.TextureCrop, - Components.Tint, - Components.Transform, - Components.Visible, - ImageRender - ], - - initialize: - - function Image (scene, x, y, texture, frame) - { - GameObject.call(this, scene, 'Image'); - - /** - * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. - * - * @name Phaser.GameObjects.Image#_crop - * @type {object} - * @private - * @since 3.11.0 - */ - this._crop = this.resetCropObject(); - - this.setTexture(texture, frame); - this.setPosition(x, y); - this.setSizeToFrame(); - this.setOriginFromFrame(); - this.initPipeline(); - } - -}); - -module.exports = Image; - - -/***/ }), -/* 99 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Determine whether the source object has a property with the specified key. - * - * @function Phaser.Utils.Objects.HasValue - * @since 3.0.0 - * - * @param {object} source - The source object to be checked. - * @param {string} key - The property to check for within the object - * - * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`. - */ -var HasValue = function (source, key) -{ - return (source.hasOwnProperty(key)); -}; - -module.exports = HasValue; - - -/***/ }), -/* 100 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders a filled path for the given Shape. @@ -19320,9 +19387,9 @@ module.exports = FillPathWebGL; /***/ }), -/* 101 */, -/* 102 */, -/* 103 */ +/* 99 */, +/* 100 */, +/* 101 */ /***/ (function(module, exports) { /** @@ -19353,7 +19420,7 @@ module.exports = IsInLayerBounds; /***/ }), -/* 104 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19376,7 +19443,7 @@ var GetFastValue = __webpack_require__(2); * @constructor * @since 3.0.0 * - * @param {object} [config] - [description] + * @param {Phaser.Types.Tilemaps.LayerDataConfig} [config] - The Layer Data configuration object. */ var LayerData = new Class({ @@ -19396,7 +19463,7 @@ var LayerData = new Class({ this.name = GetFastValue(config, 'name', 'layer'); /** - * The x offset of where to draw from the top left + * The x offset of where to draw from the top left. * * @name Phaser.Tilemaps.LayerData#x * @type {number} @@ -19405,7 +19472,7 @@ var LayerData = new Class({ this.x = GetFastValue(config, 'x', 0); /** - * The y offset of where to draw from the top left + * The y offset of where to draw from the top left. * * @name Phaser.Tilemaps.LayerData#y * @type {number} @@ -19414,7 +19481,7 @@ var LayerData = new Class({ this.y = GetFastValue(config, 'y', 0); /** - * The width in tile of the layer. + * The width of the layer in tiles. * * @name Phaser.Tilemaps.LayerData#width * @type {number} @@ -19423,7 +19490,7 @@ var LayerData = new Class({ this.width = GetFastValue(config, 'width', 0); /** - * The height in tiles of the layer. + * The height of the layer in tiles. * * @name Phaser.Tilemaps.LayerData#height * @type {number} @@ -19450,7 +19517,7 @@ var LayerData = new Class({ this.tileHeight = GetFastValue(config, 'tileHeight', 0); /** - * [description] + * The base tile width. * * @name Phaser.Tilemaps.LayerData#baseTileWidth * @type {number} @@ -19459,7 +19526,7 @@ var LayerData = new Class({ this.baseTileWidth = GetFastValue(config, 'baseTileWidth', this.tileWidth); /** - * [description] + * The base tile height. * * @name Phaser.Tilemaps.LayerData#baseTileHeight * @type {number} @@ -19486,7 +19553,7 @@ var LayerData = new Class({ this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.baseTileHeight); /** - * [description] + * The alpha value of the layer. * * @name Phaser.Tilemaps.LayerData#alpha * @type {number} @@ -19495,7 +19562,7 @@ var LayerData = new Class({ this.alpha = GetFastValue(config, 'alpha', 1); /** - * [description] + * Is the layer visible or not? * * @name Phaser.Tilemaps.LayerData#visible * @type {boolean} @@ -19507,13 +19574,13 @@ var LayerData = new Class({ * Layer specific properties (can be specified in Tiled) * * @name Phaser.Tilemaps.LayerData#properties - * @type {object} + * @type {object[]} * @since 3.0.0 */ - this.properties = GetFastValue(config, 'properties', {}); + this.properties = GetFastValue(config, 'properties', []); /** - * [description] + * Tile ID index map. * * @name Phaser.Tilemaps.LayerData#indexes * @type {array} @@ -19522,7 +19589,7 @@ var LayerData = new Class({ this.indexes = GetFastValue(config, 'indexes', []); /** - * [description] + * Tile Collision ID index map. * * @name Phaser.Tilemaps.LayerData#collideIndexes * @type {array} @@ -19531,7 +19598,7 @@ var LayerData = new Class({ this.collideIndexes = GetFastValue(config, 'collideIndexes', []); /** - * [description] + * An array of callbacks. * * @name Phaser.Tilemaps.LayerData#callbacks * @type {array} @@ -19540,7 +19607,7 @@ var LayerData = new Class({ this.callbacks = GetFastValue(config, 'callbacks', []); /** - * [description] + * An array of physics bodies. * * @name Phaser.Tilemaps.LayerData#bodies * @type {array} @@ -19549,7 +19616,7 @@ var LayerData = new Class({ this.bodies = GetFastValue(config, 'bodies', []); /** - * An array of the tile indexes + * An array of the tile data indexes. * * @name Phaser.Tilemaps.LayerData#data * @type {Phaser.Tilemaps.Tile[][]} @@ -19558,7 +19625,7 @@ var LayerData = new Class({ this.data = GetFastValue(config, 'data', []); /** - * [description] + * A reference to the Tilemap layer that owns this data. * * @name Phaser.Tilemaps.LayerData#tilemapLayer * @type {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} @@ -19573,7 +19640,7 @@ module.exports = LayerData; /***/ }), -/* 105 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19679,7 +19746,7 @@ var MapData = new Class({ this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.tileHeight); /** - * [description] + * The format of the map data. * * @name Phaser.Tilemaps.MapData#format * @type {integer} @@ -19783,7 +19850,7 @@ var MapData = new Class({ this.imageCollections = GetFastValue(config, 'imageCollections', []); /** - * [description] + * An array of tile instances. * * @name Phaser.Tilemaps.MapData#tiles * @type {array} @@ -19798,7 +19865,411 @@ module.exports = MapData; /***/ }), -/* 106 */ +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A Tileset is a combination of an image containing the tiles and a container for data about + * each tile. + * + * @class Tileset + * @memberof Phaser.Tilemaps + * @constructor + * @since 3.0.0 + * + * @param {string} name - The name of the tileset in the map data. + * @param {integer} firstgid - The first tile index this tileset contains. + * @param {integer} [tileWidth=32] - Width of each tile (in pixels). + * @param {integer} [tileHeight=32] - Height of each tile (in pixels). + * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels). + * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels). + * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset. + * These typically are custom properties created in Tiled when editing a tileset. + * @param {object} [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. + */ +var Tileset = new Class({ + + initialize: + + function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData) + { + if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; } + if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; } + if (tileMargin === undefined) { tileMargin = 0; } + if (tileSpacing === undefined) { tileSpacing = 0; } + if (tileProperties === undefined) { tileProperties = {}; } + if (tileData === undefined) { tileData = {}; } + + /** + * The name of the Tileset. + * + * @name Phaser.Tilemaps.Tileset#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The starting index of the first tile index this Tileset contains. + * + * @name Phaser.Tilemaps.Tileset#firstgid + * @type {integer} + * @since 3.0.0 + */ + this.firstgid = firstgid; + + /** + * The width of each tile (in pixels). Use setTileSize to change. + * + * @name Phaser.Tilemaps.Tileset#tileWidth + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileWidth = tileWidth; + + /** + * The height of each tile (in pixels). Use setTileSize to change. + * + * @name Phaser.Tilemaps.Tileset#tileHeight + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileHeight = tileHeight; + + /** + * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. + * + * @name Phaser.Tilemaps.Tileset#tileMargin + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileMargin = tileMargin; + + /** + * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. + * + * @name Phaser.Tilemaps.Tileset#tileSpacing + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileSpacing = tileSpacing; + + /** + * Tileset-specific properties per tile that are typically defined in the Tiled editor in the + * Tileset editor. + * + * @name Phaser.Tilemaps.Tileset#tileProperties + * @type {object} + * @since 3.0.0 + */ + this.tileProperties = tileProperties; + + /** + * 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. + * + * @name Phaser.Tilemaps.Tileset#tileData + * @type {object} + * @since 3.0.0 + */ + this.tileData = tileData; + + /** + * The cached image that contains the individual tiles. Use setImage to set. + * + * @name Phaser.Tilemaps.Tileset#image + * @type {?Phaser.Textures.Texture} + * @readonly + * @since 3.0.0 + */ + this.image = null; + + /** + * The gl texture used by the WebGL renderer. + * + * @name Phaser.Tilemaps.Tileset#glTexture + * @type {?WebGLTexture} + * @readonly + * @since 3.11.0 + */ + this.glTexture = null; + + /** + * The number of tile rows in the the tileset. + * + * @name Phaser.Tilemaps.Tileset#rows + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.rows = 0; + + /** + * The number of tile columns in the tileset. + * + * @name Phaser.Tilemaps.Tileset#columns + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.columns = 0; + + /** + * The total number of tiles in the tileset. + * + * @name Phaser.Tilemaps.Tileset#total + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.total = 0; + + /** + * 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}. + * + * @name Phaser.Tilemaps.Tileset#texCoordinates + * @type {object[]} + * @readonly + * @since 3.0.0 + */ + this.texCoordinates = []; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileProperties + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?(object|undefined)} + */ + getTileProperties: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.tileProperties[tileIndex - this.firstgid]; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileData + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object|undefined} + */ + getTileData: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.tileData[tileIndex - this.firstgid]; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object} + */ + getTileCollisionGroup: function (tileIndex) + { + var data = this.getTileData(tileIndex); + + return (data && data.objectgroup) ? data.objectgroup : null; + }, + + /** + * Returns true if and only if this Tileset contains the given tile index. + * + * @method Phaser.Tilemaps.Tileset#containsTileIndex + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {boolean} + */ + containsTileIndex: function (tileIndex) + { + return ( + tileIndex >= this.firstgid && + tileIndex < (this.firstgid + this.total) + ); + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object} Object in the form { x, y } representing the top-left UV coordinate + * within the Tileset image. + */ + getTileTextureCoordinates: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.texCoordinates[tileIndex - this.firstgid]; + }, + + /** + * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setImage + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The image that contains the tiles. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setImage: function (texture) + { + this.image = texture; + + this.glTexture = texture.get().source.glTexture; + + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + + return this; + }, + + /** + * Sets the tile width & height and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setTileSize + * @since 3.0.0 + * + * @param {integer} [tileWidth] - The width of a tile in pixels. + * @param {integer} [tileHeight] - The height of a tile in pixels. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setTileSize: function (tileWidth, tileHeight) + { + if (tileWidth !== undefined) { this.tileWidth = tileWidth; } + if (tileHeight !== undefined) { this.tileHeight = tileHeight; } + + if (this.image) + { + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + } + + return this; + }, + + /** + * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setSpacing + * @since 3.0.0 + * + * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels). + * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels). + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setSpacing: function (margin, spacing) + { + if (margin !== undefined) { this.tileMargin = margin; } + if (spacing !== undefined) { this.tileSpacing = spacing; } + + if (this.image) + { + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + } + + return this; + }, + + /** + * Updates tile texture coordinates and tileset data. + * + * @method Phaser.Tilemaps.Tileset#updateTileData + * @since 3.0.0 + * + * @param {integer} imageWidth - The (expected) width of the image to slice. + * @param {integer} imageHeight - The (expected) height of the image to slice. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + updateTileData: function (imageWidth, imageHeight) + { + var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing); + var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing); + + if (rowCount % 1 !== 0 || colCount % 1 !== 0) + { + console.warn('Image tile area not tile size multiple in: ' + this.name); + } + + // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated + // - hence the floor when calculating the rows/columns. + rowCount = Math.floor(rowCount); + colCount = Math.floor(colCount); + + this.rows = rowCount; + this.columns = colCount; + + // In Tiled, "empty" spaces in a tileset count as tiles and hence count towards the gid + this.total = rowCount * colCount; + + this.texCoordinates.length = 0; + + var tx = this.tileMargin; + var ty = this.tileMargin; + + for (var y = 0; y < this.rows; y++) + { + for (var x = 0; x < this.columns; x++) + { + this.texCoordinates.push({ x: tx, y: ty }); + tx += this.tileWidth + this.tileSpacing; + } + + tx = this.tileMargin; + ty += this.tileHeight + this.tileSpacing; + } + + return this; + } + +}); + +module.exports = Tileset; + + +/***/ }), +/* 105 */ /***/ (function(module, exports) { /** @@ -19931,6 +20402,40 @@ var ALIGN_CONST = { module.exports = ALIGN_CONST; +/***/ }), +/* 106 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @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; + + /***/ }), /* 107 */ /***/ (function(module, exports, __webpack_require__) { @@ -19941,44 +20446,100 @@ module.exports = ALIGN_CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Class = __webpack_require__(0); +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var ImageRender = __webpack_require__(968); /** - * Creates a new Object using all values from obj1 and obj2. - * If a value exists in both obj1 and obj2, the value in obj1 is used. - * - * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this - * function on shallow objects. + * @classdesc + * An Image Game Object. * - * @function Phaser.Utils.Objects.Merge + * 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. + * + * @class Image + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor * @since 3.0.0 * - * @param {object} obj1 - The first object. - * @param {object} obj2 - The second object. + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Size + * @extends Phaser.GameObjects.Components.TextureCrop + * @extends Phaser.GameObjects.Components.Tint + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible * - * @return {object} A new object containing the union of obj1's and obj2's properties. + * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. */ -var Merge = function (obj1, obj2) -{ - var clone = Clone(obj1); +var Image = new Class({ - for (var key in obj2) + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Size, + Components.TextureCrop, + Components.Tint, + Components.Transform, + Components.Visible, + ImageRender + ], + + initialize: + + function Image (scene, x, y, texture, frame) { - if (!clone.hasOwnProperty(key)) - { - clone[key] = obj2[key]; - } + GameObject.call(this, scene, 'Image'); + + /** + * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. + * + * @name Phaser.GameObjects.Image#_crop + * @type {object} + * @private + * @since 3.11.0 + */ + this._crop = this.resetCropObject(); + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.setOriginFromFrame(); + this.initPipeline(); } - return clone; -}; +}); -module.exports = Merge; +module.exports = Image; /***/ }), /* 108 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { /** * @author Richard Davey @@ -19986,443 +20547,23 @@ module.exports = Merge; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(0); - /** - * @callback EachSetCallback + * Determine whether the source object has a property with the specified key. * - * @param {E} entry - The Set entry. - * @param {number} index - The index of the entry within the Set. - * - * @return {?boolean} The callback result. - */ - -/** - * @classdesc - * A Set is a collection of unique elements. - * - * @class Set - * @memberof Phaser.Structs - * @constructor + * @function Phaser.Utils.Objects.HasValue * @since 3.0.0 * - * @generic T - * @genericUse {T[]} - [elements] + * @param {object} source - The source object to be checked. + * @param {string} key - The property to check for within the object * - * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set. + * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`. */ -var Set = new Class({ +var HasValue = function (source, key) +{ + return (source.hasOwnProperty(key)); +}; - initialize: - - function Set (elements) - { - /** - * The entries of this Set. Stored internally as an array. - * - * @genericUse {T[]} - [$type] - * - * @name Phaser.Structs.Set#entries - * @type {Array.<*>} - * @default [] - * @since 3.0.0 - */ - this.entries = []; - - if (Array.isArray(elements)) - { - for (var i = 0; i < elements.length; i++) - { - this.set(elements[i]); - } - } - }, - - /** - * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect. - * - * @method Phaser.Structs.Set#set - * @since 3.0.0 - * - * @genericUse {T} - [value] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {*} value - The value to insert into this Set. - * - * @return {Phaser.Structs.Set} This Set object. - */ - set: function (value) - { - if (this.entries.indexOf(value) === -1) - { - this.entries.push(value); - } - - return this; - }, - - /** - * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value. - * If no elements of this Set satisfy the condition then this method will return `null`. - * - * @method Phaser.Structs.Set#get - * @since 3.0.0 - * - * @genericUse {T} - [value,$return] - * - * @param {string} property - The property name to check on the elements of this Set. - * @param {*} value - The value to check for. - * - * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition. - */ - get: function (property, value) - { - for (var i = 0; i < this.entries.length; i++) - { - var entry = this.entries[i]; - - if (entry[property] === value) - { - return entry; - } - } - }, - - /** - * Returns an array containing all the values in this Set. - * - * @method Phaser.Structs.Set#getArray - * @since 3.0.0 - * - * @genericUse {T[]} - [$return] - * - * @return {Array.<*>} An array containing all the values in this Set. - */ - getArray: function () - { - return this.entries.slice(0); - }, - - /** - * Removes the given value from this Set if this Set contains that value. - * - * @method Phaser.Structs.Set#delete - * @since 3.0.0 - * - * @genericUse {T} - [value] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {*} value - The value to remove from the Set. - * - * @return {Phaser.Structs.Set} This Set object. - */ - delete: function (value) - { - var index = this.entries.indexOf(value); - - if (index > -1) - { - this.entries.splice(index, 1); - } - - return this; - }, - - /** - * Dumps the contents of this Set to the console via `console.group`. - * - * @method Phaser.Structs.Set#dump - * @since 3.0.0 - */ - dump: function () - { - // eslint-disable-next-line no-console - console.group('Set'); - - for (var i = 0; i < this.entries.length; i++) - { - var entry = this.entries[i]; - console.log(entry); - } - - // eslint-disable-next-line no-console - console.groupEnd(); - }, - - /** - * Passes each value in this Set to the given callback. - * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`. - * - * @method Phaser.Structs.Set#each - * @since 3.0.0 - * - * @genericUse {EachSetCallback.} - [callback] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. - * @param {*} [callbackScope] - The scope of the callback. - * - * @return {Phaser.Structs.Set} This Set object. - */ - each: function (callback, callbackScope) - { - var i; - var temp = this.entries.slice(); - var len = temp.length; - - if (callbackScope) - { - for (i = 0; i < len; i++) - { - if (callback.call(callbackScope, temp[i], i) === false) - { - break; - } - } - } - else - { - for (i = 0; i < len; i++) - { - if (callback(temp[i], i) === false) - { - break; - } - } - } - - return this; - }, - - /** - * Passes each value in this Set to the given callback. - * For when you absolutely know this Set won't be modified during the iteration. - * - * @method Phaser.Structs.Set#iterate - * @since 3.0.0 - * - * @genericUse {EachSetCallback.} - [callback] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. - * @param {*} [callbackScope] - The scope of the callback. - * - * @return {Phaser.Structs.Set} This Set object. - */ - iterate: function (callback, callbackScope) - { - var i; - var len = this.entries.length; - - if (callbackScope) - { - for (i = 0; i < len; i++) - { - if (callback.call(callbackScope, this.entries[i], i) === false) - { - break; - } - } - } - else - { - for (i = 0; i < len; i++) - { - if (callback(this.entries[i], i) === false) - { - break; - } - } - } - - return this; - }, - - /** - * Goes through each entry in this Set and invokes the given function on them, passing in the arguments. - * - * @method Phaser.Structs.Set#iterateLocal - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {string} callbackKey - The key of the function to be invoked on each Set entry. - * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. - * - * @return {Phaser.Structs.Set} This Set object. - */ - iterateLocal: function (callbackKey) - { - var i; - var args = []; - - for (i = 1; i < arguments.length; i++) - { - args.push(arguments[i]); - } - - var len = this.entries.length; - - for (i = 0; i < len; i++) - { - var entry = this.entries[i]; - - entry[callbackKey].apply(entry, args); - } - - return this; - }, - - /** - * Clears this Set so that it no longer contains any values. - * - * @method Phaser.Structs.Set#clear - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @return {Phaser.Structs.Set} This Set object. - */ - clear: function () - { - this.entries.length = 0; - - return this; - }, - - /** - * Returns `true` if this Set contains the given value, otherwise returns `false`. - * - * @method Phaser.Structs.Set#contains - * @since 3.0.0 - * - * @genericUse {T} - [value] - * - * @param {*} value - The value to check for in this Set. - * - * @return {boolean} `true` if the given value was found in this Set, otherwise `false`. - */ - contains: function (value) - { - return (this.entries.indexOf(value) > -1); - }, - - /** - * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument. - * - * @method Phaser.Structs.Set#union - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to perform the union with. - * - * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument. - */ - union: function (set) - { - var newSet = new Set(); - - set.entries.forEach(function (value) - { - newSet.set(value); - }); - - this.entries.forEach(function (value) - { - newSet.set(value); - }); - - return newSet; - }, - - /** - * Returns a new Set that contains only the values which are in this Set and that are also in the given Set. - * - * @method Phaser.Structs.Set#intersect - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to intersect this set with. - * - * @return {Phaser.Structs.Set} The result of the intersection, as a new Set. - */ - intersect: function (set) - { - var newSet = new Set(); - - this.entries.forEach(function (value) - { - if (set.contains(value)) - { - newSet.set(value); - } - }); - - return newSet; - }, - - /** - * Returns a new Set containing all the values in this Set which are *not* also in the given Set. - * - * @method Phaser.Structs.Set#difference - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to perform the difference with. - * - * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method. - */ - difference: function (set) - { - var newSet = new Set(); - - this.entries.forEach(function (value) - { - if (!set.contains(value)) - { - newSet.set(value); - } - }); - - return newSet; - }, - - /** - * The size of this Set. This is the number of entries within it. - * Changing the size will truncate the Set if the given value is smaller than the current size. - * Increasing the size larger than the current size has no effect. - * - * @name Phaser.Structs.Set#size - * @type {integer} - * @since 3.0.0 - */ - size: { - - get: function () - { - return this.entries.length; - }, - - set: function (value) - { - if (value < this.entries.length) - { - return this.entries.length = value; - } - else - { - return this.entries.length; - } - } - - } - -}); - -module.exports = Set; +module.exports = HasValue; /***/ }), @@ -20441,9 +20582,9 @@ var Circle = __webpack_require__(65); var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(47); +var RectangleContains = __webpack_require__(48); /** * @classdesc @@ -20588,7 +20729,7 @@ var Zone = new Class({ * @param {number} height - The height of this Game Object. * @param {boolean} [resizeInput=true] - If this Zone has a Rectangle for a hit area this argument will resize the hit area as well. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setSize: function (width, height, resizeInput) { @@ -20620,7 +20761,7 @@ var Zone = new Class({ * @param {number} width - The width of this Game Object. * @param {number} height - The height of this Game Object. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setDisplaySize: function (width, height) { @@ -20639,7 +20780,7 @@ var Zone = new Class({ * * @param {number} radius - The radius of the Circle that will form the Drop Zone. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setCircleDropZone: function (radius) { @@ -20656,7 +20797,7 @@ var Zone = new Class({ * @param {number} width - The width of the rectangle drop zone. * @param {number} height - The height of the rectangle drop zone. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setRectangleDropZone: function (width, height) { @@ -20672,7 +20813,7 @@ var Zone = new Class({ * @param {object} shape - A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape. * @param {Phaser.Types.Input.HitAreaCallback} callback - A function that will return `true` if the given x/y coords it is sent are within the shape. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setDropZone: function (shape, callback) { @@ -20755,24 +20896,24 @@ module.exports = Zone; module.exports = { - 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) + ADD_ANIMATION: __webpack_require__(533), + ANIMATION_COMPLETE: __webpack_require__(534), + ANIMATION_REPEAT: __webpack_require__(535), + ANIMATION_RESTART: __webpack_require__(536), + ANIMATION_START: __webpack_require__(537), + PAUSE_ALL: __webpack_require__(538), + REMOVE_ANIMATION: __webpack_require__(539), + RESUME_ALL: __webpack_require__(540), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(541), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(542), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(543), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(544), + SPRITE_ANIMATION_KEY_START: __webpack_require__(545), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(546), + SPRITE_ANIMATION_REPEAT: __webpack_require__(547), + SPRITE_ANIMATION_RESTART: __webpack_require__(548), + SPRITE_ANIMATION_START: __webpack_require__(549), + SPRITE_ANIMATION_UPDATE: __webpack_require__(550) }; @@ -20816,7 +20957,7 @@ module.exports = Perimeter; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(281); +var Events = __webpack_require__(284); /** * @callback DataEachCallback @@ -20839,7 +20980,7 @@ var Events = __webpack_require__(281); * @since 3.0.0 * * @param {object} parent - The object that this DataManager belongs to. - * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter. + * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter. */ var DataManager = new Class({ @@ -21066,7 +21207,7 @@ var DataManager = new Class({ * @param {(string|object)} key - The key to set the value for. Or an object or 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. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ set: function (key, data) { @@ -21090,6 +21231,72 @@ var DataManager = new Class({ return this; }, + /** + * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#inc + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + inc: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (data === undefined) + { + data = 1; + } + + var value = this.get(key); + if (value === undefined) + { + value = 0; + } + + this.set(key, (value + data)); + + return this; + }, + + /** + * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#toggle + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + toggle: function (key) + { + if (this._frozen) + { + return this; + } + + this.set(key, !this.get(key)); + + return this; + }, + /** * Internal value setter, called automatically by the `set` method. * @@ -21103,7 +21310,7 @@ var DataManager = new Class({ * @param {string} key - The key to set the value for. * @param {*} data - The value to set. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setValue: function (key, data) { @@ -21167,7 +21374,7 @@ var DataManager = new Class({ * @param {*} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ each: function (callback, context) { @@ -21204,7 +21411,7 @@ var DataManager = new Class({ * @param {Object.} data - The data to merge. * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ merge: function (data, overwrite) { @@ -21240,7 +21447,7 @@ var DataManager = new Class({ * * @param {(string|string[])} key - The key to remove, or an array of keys to remove. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ remove: function (key) { @@ -21274,7 +21481,7 @@ var DataManager = new Class({ * * @param {string} key - The key to set the value for. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ removeValue: function (key) { @@ -21346,7 +21553,7 @@ var DataManager = new Class({ * * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setFreeze: function (value) { @@ -21361,7 +21568,7 @@ var DataManager = new Class({ * @method Phaser.Data.DataManager#reset * @since 3.0.0 * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ reset: function () { @@ -21489,6 +21696,87 @@ module.exports = Shuffle; /***/ }), /* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @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); + +// EaseMap +module.exports = { + + Power0: Linear, + Power1: Quadratic.Out, + Power2: Cubic.Out, + Power3: Quartic.Out, + Power4: Quintic.Out, + + Linear: Linear, + Quad: Quadratic.Out, + Cubic: Cubic.Out, + Quart: Quartic.Out, + Quint: Quintic.Out, + Sine: Sine.Out, + Expo: Expo.Out, + Circ: Circular.Out, + Elastic: Elastic.Out, + Back: Back.Out, + Bounce: Bounce.Out, + Stepped: Stepped, + + 'Quad.easeIn': Quadratic.In, + 'Cubic.easeIn': Cubic.In, + 'Quart.easeIn': Quartic.In, + 'Quint.easeIn': Quintic.In, + 'Sine.easeIn': Sine.In, + 'Expo.easeIn': Expo.In, + 'Circ.easeIn': Circular.In, + 'Elastic.easeIn': Elastic.In, + 'Back.easeIn': Back.In, + 'Bounce.easeIn': Bounce.In, + + 'Quad.easeOut': Quadratic.Out, + 'Cubic.easeOut': Cubic.Out, + 'Quart.easeOut': Quartic.Out, + 'Quint.easeOut': Quintic.Out, + 'Sine.easeOut': Sine.Out, + 'Expo.easeOut': Expo.Out, + 'Circ.easeOut': Circular.Out, + 'Elastic.easeOut': Elastic.Out, + 'Back.easeOut': Back.Out, + 'Bounce.easeOut': Bounce.Out, + + 'Quad.easeInOut': Quadratic.InOut, + 'Cubic.easeInOut': Cubic.InOut, + 'Quart.easeInOut': Quartic.InOut, + 'Quint.easeInOut': Quintic.InOut, + 'Sine.easeInOut': Sine.InOut, + 'Expo.easeInOut': Expo.InOut, + 'Circ.easeInOut': Circular.InOut, + 'Elastic.easeInOut': Elastic.InOut, + 'Back.easeInOut': Back.InOut, + 'Bounce.easeInOut': Bounce.InOut + +}; + + +/***/ }), +/* 116 */ /***/ (function(module, exports) { /** @@ -21518,7 +21806,7 @@ module.exports = Linear; /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -21687,10 +21975,10 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(720))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(728))) /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21699,7 +21987,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(116); +var OS = __webpack_require__(117); /** * Determines the browser type and version running this Phaser Game instance. @@ -21800,7 +22088,36 @@ module.exports = init(); /***/ }), -/* 118 */ +/* 119 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. + * + * @function Phaser.Math.FloatBetween + * @since 3.0.0 + * + * @param {number} min - The lower bound for the float, inclusive. + * @param {number} max - The upper bound for the float exclusive. + * + * @return {number} A random float within the given range. + */ +var FloatBetween = function (min, max) +{ + return Math.random() * (max - min) + min; +}; + +module.exports = FloatBetween; + + +/***/ }), +/* 120 */ /***/ (function(module, exports) { /** @@ -21830,7 +22147,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21845,17 +22162,17 @@ module.exports = IsSizePowerOfTwo; module.exports = { - ADD: __webpack_require__(771), - ERROR: __webpack_require__(772), - LOAD: __webpack_require__(773), - READY: __webpack_require__(774), - REMOVE: __webpack_require__(775) + ADD: __webpack_require__(780), + ERROR: __webpack_require__(781), + LOAD: __webpack_require__(782), + READY: __webpack_require__(783), + REMOVE: __webpack_require__(784) }; /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports) { /** @@ -21913,7 +22230,7 @@ module.exports = AddToDOM; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21922,7 +22239,7 @@ module.exports = AddToDOM; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(79); +var SpliceOne = __webpack_require__(80); /** * Removes the given item, or array of items, from the array. @@ -22004,7 +22321,7 @@ module.exports = Remove; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -22910,7 +23227,7 @@ module.exports = KeyCodes; /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -23033,7 +23350,52 @@ module.exports = CONST; /***/ }), -/* 124 */ +/* 126 */ +/***/ (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); + +/** + * Creates a new Object using all values from obj1 and obj2. + * If a value exists in both obj1 and obj2, the value in obj1 is used. + * + * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this + * function on shallow objects. + * + * @function Phaser.Utils.Objects.Merge + * @since 3.0.0 + * + * @param {object} obj1 - The first object. + * @param {object} obj2 - The second object. + * + * @return {object} A new object containing the union of obj1's and obj2's properties. + */ +var Merge = function (obj1, obj2) +{ + var clone = Clone(obj1); + + for (var key in obj2) + { + if (!clone.hasOwnProperty(key)) + { + clone[key] = obj2[key]; + } + } + + return clone; +}; + +module.exports = Merge; + + +/***/ }), +/* 127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23045,19 +23407,16 @@ module.exports = CONST; var Class = __webpack_require__(0); var Clone = __webpack_require__(67); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(59); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); var NOOP = __webpack_require__(1); +var GetAll = __webpack_require__(381); +var GetFirst = __webpack_require__(382); /** * @classdesc - * The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback. - * The audio file type and the encoding of those files are extremely important. - * - * Not all browsers can play all audio formats. - * - * There is a good guide to what's supported [here](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). + * Base class for other Sound Manager classes. * * @class BaseSoundManager * @extends Phaser.Events.EventEmitter @@ -23066,6 +23425,10 @@ var NOOP = __webpack_require__(1); * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. + * + * @see Phaser.Sound.HTML5AudioSoundManager + * @see Phaser.Sound.NoAudioSoundManager + * @see Phaser.Sound.WebAudioSoundManager */ var BaseSoundManager = new Class({ @@ -23185,22 +23548,8 @@ var BaseSoundManager = new Class({ */ this.unlocked = false; - game.events.on(GameEvents.BLUR, function () - { - if (this.pauseOnBlur) - { - this.onBlur(); - } - }, this); - - game.events.on(GameEvents.FOCUS, function () - { - if (this.pauseOnBlur) - { - this.onFocus(); - } - }, this); - + game.events.on(GameEvents.BLUR, this.onGameBlur, this); + game.events.on(GameEvents.FOCUS, this.onGameFocus, this); game.events.on(GameEvents.PRE_STEP, this.update, this); game.events.once(GameEvents.DESTROY, this.destroy, this); }, @@ -23264,6 +23613,36 @@ var BaseSoundManager = new Class({ return sound; }, + /** + * Gets the first sound in the manager matching the given key, if any. + * + * @method Phaser.Sound.BaseSoundManager#get + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {?Phaser.Sound.BaseSound} - The sound, or null. + */ + get: function (key) + { + return GetFirst(this.sounds, 'key', key); + }, + + /** + * Gets any sounds in the manager matching the given key. + * + * @method Phaser.Sound.BaseSoundManager#getAll + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {Phaser.Sound.BaseSound[]} - The sounds, or an empty array. + */ + getAll: function (key) + { + return GetAll(this.sounds, 'key', key); + }, + /** * Adds a new sound to the sound manager and plays it. * The sound will be automatically removed (destroyed) once playback ends. @@ -23304,8 +23683,9 @@ var BaseSoundManager = new Class({ }, /** - * Enables playing audio sprite sound on the fly without the need to keep a reference to it. - * Sound will auto destroy once its playback ends. + * Adds a new audio sprite sound to the sound manager and plays it. + * The sprite 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#playAudioSprite * @listens Phaser.Sound.Events#COMPLETE @@ -23353,6 +23733,23 @@ var BaseSoundManager = new Class({ return false; }, + + /** + * Removes all sounds from the manager, destroying the sounds. + * + * @method Phaser.Sound.BaseSoundManager#removeAll + * @since 3.23.0 + */ + removeAll: function () + { + this.sounds.forEach(function (sound) + { + sound.destroy(); + }); + + this.sounds.length = 0; + }, + /** * Removes all sounds from the sound manager that have an asset key matching the given value. * The removed sounds are destroyed before removal. @@ -23436,6 +23833,29 @@ var BaseSoundManager = new Class({ this.emit(Events.STOP_ALL, this); }, + + /** + * Stops any sounds matching the given key. + * + * @method Phaser.Sound.BaseSoundManager#stopByKey + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {number} - How many sounds were stopped. + */ + stopByKey: function (key) + { + var stopped = 0; + + this.getAll(key).forEach(function (sound) + { + if (sound.stop()) { stopped++; } + }); + + return stopped; + }, + /** * Method used internally for unlocking audio playback on devices that * require user interaction before any sound can be played on a web page. @@ -23471,6 +23891,36 @@ var BaseSoundManager = new Class({ */ onFocus: NOOP, + /** + * Internal handler for Phaser.Core.Events#BLUR. + * + * @method Phaser.Sound.BaseSoundManager#onGameBlur + * @private + * @since 3.23.0 + */ + onGameBlur: function () + { + if (this.pauseOnBlur) + { + this.onBlur(); + } + }, + + /** + * Internal handler for Phaser.Core.Events#FOCUS. + * + * @method Phaser.Sound.BaseSoundManager#onGameFocus + * @private + * @since 3.23.0 + */ + onGameFocus: function () + { + if (this.pauseOnBlur) + { + this.onFocus(); + } + }, + /** * Update method called on every game step. * Removes destroyed sounds and updates every active sound in the game. @@ -23515,12 +23965,13 @@ var BaseSoundManager = new Class({ */ destroy: function () { + this.game.events.off(GameEvents.BLUR, this.onGameBlur, this); + this.game.events.off(GameEvents.FOCUS, this.onGameFocus, this); + this.game.events.off(GameEvents.PRE_STEP, this.update, this); + this.removeAllListeners(); - this.forEachActiveSound(function (sound) - { - sound.destroy(); - }); + this.removeAll(); this.sounds.length = 0; this.sounds = null; @@ -23658,7 +24109,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 125 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -23669,9 +24120,9 @@ module.exports = BaseSoundManager; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(59); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); var NOOP = __webpack_require__(1); /** @@ -24158,7 +24609,7 @@ module.exports = BaseSound; /***/ }), -/* 126 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24167,10 +24618,10 @@ module.exports = BaseSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(181); +var ArrayUtils = __webpack_require__(183); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(128); +var StableSort = __webpack_require__(131); /** * @callback EachListCallback @@ -24974,7 +25425,7 @@ module.exports = List; /***/ }), -/* 127 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24983,8 +25434,8 @@ module.exports = List; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(182); -var TransposeMatrix = __webpack_require__(382); +var CheckMatrix = __webpack_require__(184); +var TransposeMatrix = __webpack_require__(389); /** * Rotates the array matrix based on the given rotation value. @@ -25046,7 +25497,7 @@ module.exports = RotateMatrix; /***/ }), -/* 128 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25191,7 +25642,7 @@ else {} })(); /***/ }), -/* 129 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25202,11 +25653,11 @@ else {} var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var GetBitmapTextSize = __webpack_require__(938); -var ParseFromAtlas = __webpack_require__(939); -var ParseXMLBitmapFont = __webpack_require__(185); -var Render = __webpack_require__(940); +var GameObject = __webpack_require__(13); +var GetBitmapTextSize = __webpack_require__(943); +var ParseFromAtlas = __webpack_require__(944); +var ParseXMLBitmapFont = __webpack_require__(187); +var Render = __webpack_require__(945); /** * @classdesc @@ -25920,7 +26371,456 @@ module.exports = BitmapText; /***/ }), -/* 130 */ +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @callback EachSetCallback + * + * @param {E} entry - The Set entry. + * @param {number} index - The index of the entry within the Set. + * + * @return {?boolean} The callback result. + */ + +/** + * @classdesc + * A Set is a collection of unique elements. + * + * @class Set + * @memberof Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [elements] + * + * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set. + */ +var Set = new Class({ + + initialize: + + function Set (elements) + { + /** + * The entries of this Set. Stored internally as an array. + * + * @genericUse {T[]} - [$type] + * + * @name Phaser.Structs.Set#entries + * @type {Array.<*>} + * @default [] + * @since 3.0.0 + */ + this.entries = []; + + if (Array.isArray(elements)) + { + for (var i = 0; i < elements.length; i++) + { + this.set(elements[i]); + } + } + }, + + /** + * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect. + * + * @method Phaser.Structs.Set#set + * @since 3.0.0 + * + * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {*} value - The value to insert into this Set. + * + * @return {Phaser.Structs.Set} This Set object. + */ + set: function (value) + { + if (this.entries.indexOf(value) === -1) + { + this.entries.push(value); + } + + return this; + }, + + /** + * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value. + * If no elements of this Set satisfy the condition then this method will return `null`. + * + * @method Phaser.Structs.Set#get + * @since 3.0.0 + * + * @genericUse {T} - [value,$return] + * + * @param {string} property - The property name to check on the elements of this Set. + * @param {*} value - The value to check for. + * + * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition. + */ + get: function (property, value) + { + for (var i = 0; i < this.entries.length; i++) + { + var entry = this.entries[i]; + + if (entry[property] === value) + { + return entry; + } + } + }, + + /** + * Returns an array containing all the values in this Set. + * + * @method Phaser.Structs.Set#getArray + * @since 3.0.0 + * + * @genericUse {T[]} - [$return] + * + * @return {Array.<*>} An array containing all the values in this Set. + */ + getArray: function () + { + return this.entries.slice(0); + }, + + /** + * Removes the given value from this Set if this Set contains that value. + * + * @method Phaser.Structs.Set#delete + * @since 3.0.0 + * + * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {*} value - The value to remove from the Set. + * + * @return {Phaser.Structs.Set} This Set object. + */ + delete: function (value) + { + var index = this.entries.indexOf(value); + + if (index > -1) + { + this.entries.splice(index, 1); + } + + return this; + }, + + /** + * Dumps the contents of this Set to the console via `console.group`. + * + * @method Phaser.Structs.Set#dump + * @since 3.0.0 + */ + dump: function () + { + // eslint-disable-next-line no-console + console.group('Set'); + + for (var i = 0; i < this.entries.length; i++) + { + var entry = this.entries[i]; + console.log(entry); + } + + // eslint-disable-next-line no-console + console.groupEnd(); + }, + + /** + * Passes each value in this Set to the given callback. + * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`. + * + * @method Phaser.Structs.Set#each + * @since 3.0.0 + * + * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. + * @param {*} [callbackScope] - The scope of the callback. + * + * @return {Phaser.Structs.Set} This Set object. + */ + each: function (callback, callbackScope) + { + var i; + var temp = this.entries.slice(); + var len = temp.length; + + if (callbackScope) + { + for (i = 0; i < len; i++) + { + if (callback.call(callbackScope, temp[i], i) === false) + { + break; + } + } + } + else + { + for (i = 0; i < len; i++) + { + if (callback(temp[i], i) === false) + { + break; + } + } + } + + return this; + }, + + /** + * Passes each value in this Set to the given callback. + * For when you absolutely know this Set won't be modified during the iteration. + * + * @method Phaser.Structs.Set#iterate + * @since 3.0.0 + * + * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. + * @param {*} [callbackScope] - The scope of the callback. + * + * @return {Phaser.Structs.Set} This Set object. + */ + iterate: function (callback, callbackScope) + { + var i; + var len = this.entries.length; + + if (callbackScope) + { + for (i = 0; i < len; i++) + { + if (callback.call(callbackScope, this.entries[i], i) === false) + { + break; + } + } + } + else + { + for (i = 0; i < len; i++) + { + if (callback(this.entries[i], i) === false) + { + break; + } + } + } + + return this; + }, + + /** + * Goes through each entry in this Set and invokes the given function on them, passing in the arguments. + * + * @method Phaser.Structs.Set#iterateLocal + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {string} callbackKey - The key of the function to be invoked on each Set entry. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {Phaser.Structs.Set} This Set object. + */ + iterateLocal: function (callbackKey) + { + var i; + var args = []; + + for (i = 1; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + var len = this.entries.length; + + for (i = 0; i < len; i++) + { + var entry = this.entries[i]; + + entry[callbackKey].apply(entry, args); + } + + return this; + }, + + /** + * Clears this Set so that it no longer contains any values. + * + * @method Phaser.Structs.Set#clear + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @return {Phaser.Structs.Set} This Set object. + */ + clear: function () + { + this.entries.length = 0; + + return this; + }, + + /** + * Returns `true` if this Set contains the given value, otherwise returns `false`. + * + * @method Phaser.Structs.Set#contains + * @since 3.0.0 + * + * @genericUse {T} - [value] + * + * @param {*} value - The value to check for in this Set. + * + * @return {boolean} `true` if the given value was found in this Set, otherwise `false`. + */ + contains: function (value) + { + return (this.entries.indexOf(value) > -1); + }, + + /** + * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument. + * + * @method Phaser.Structs.Set#union + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to perform the union with. + * + * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument. + */ + union: function (set) + { + var newSet = new Set(); + + set.entries.forEach(function (value) + { + newSet.set(value); + }); + + this.entries.forEach(function (value) + { + newSet.set(value); + }); + + return newSet; + }, + + /** + * Returns a new Set that contains only the values which are in this Set and that are also in the given Set. + * + * @method Phaser.Structs.Set#intersect + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to intersect this set with. + * + * @return {Phaser.Structs.Set} The result of the intersection, as a new Set. + */ + intersect: function (set) + { + var newSet = new Set(); + + this.entries.forEach(function (value) + { + if (set.contains(value)) + { + newSet.set(value); + } + }); + + return newSet; + }, + + /** + * Returns a new Set containing all the values in this Set which are *not* also in the given Set. + * + * @method Phaser.Structs.Set#difference + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to perform the difference with. + * + * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method. + */ + difference: function (set) + { + var newSet = new Set(); + + this.entries.forEach(function (value) + { + if (!set.contains(value)) + { + newSet.set(value); + } + }); + + return newSet; + }, + + /** + * The size of this Set. This is the number of entries within it. + * Changing the size will truncate the Set if the given value is smaller than the current size. + * Increasing the size larger than the current size has no effect. + * + * @name Phaser.Structs.Set#size + * @type {integer} + * @since 3.0.0 + */ + size: { + + get: function () + { + return this.entries.length; + }, + + set: function (value) + { + if (value < this.entries.length) + { + return this.entries.length = value; + } + else + { + return this.entries.length; + } + } + + } + +}); + +module.exports = Set; + + +/***/ }), +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25931,8 +26831,8 @@ module.exports = BitmapText; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1065); +var GameObject = __webpack_require__(13); +var MeshRender = __webpack_require__(1075); var NOOP = __webpack_require__(1); /** @@ -26091,7 +26991,7 @@ module.exports = Mesh; /***/ }), -/* 131 */ +/* 135 */ /***/ (function(module, exports) { /** @@ -26129,7 +27029,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 132 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26237,7 +27137,7 @@ module.exports = InputPluginCache; /***/ }), -/* 133 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26252,19 +27152,19 @@ module.exports = InputPluginCache; module.exports = { - 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) + ANY_KEY_DOWN: __webpack_require__(1215), + ANY_KEY_UP: __webpack_require__(1216), + COMBO_MATCH: __webpack_require__(1217), + DOWN: __webpack_require__(1218), + KEY_DOWN: __webpack_require__(1219), + KEY_UP: __webpack_require__(1220), + UP: __webpack_require__(1221) }; /***/ }), -/* 134 */ +/* 138 */ /***/ (function(module, exports) { /** @@ -26305,7 +27205,7 @@ module.exports = GetURL; /***/ }), -/* 135 */ +/* 139 */ /***/ (function(module, exports) { /** @@ -26325,16 +27225,18 @@ module.exports = GetURL; * @param {string} [user=''] - Optional username for the XHR request. * @param {string} [password=''] - Optional password for the XHR request. * @param {integer} [timeout=0] - Optional XHR timeout value. + * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value. * * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader. */ -var XHRSettings = function (responseType, async, user, password, timeout) +var XHRSettings = function (responseType, async, user, password, timeout, withCredentials) { if (responseType === undefined) { responseType = ''; } if (async === undefined) { async = true; } if (user === undefined) { user = ''; } if (password === undefined) { password = ''; } if (timeout === undefined) { timeout = 0; } + if (withCredentials === undefined) { withCredentials = false; } // Before sending a request, set the xhr.responseType to "text", // "arraybuffer", "blob", or "document", depending on your data needs. @@ -26355,12 +27257,16 @@ var XHRSettings = function (responseType, async, user, password, timeout) timeout: timeout, // setRequestHeader + headers: undefined, header: undefined, headerValue: undefined, requestedWith: false, // overrideMimeType - overrideMimeType: undefined + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials }; }; @@ -26369,7 +27275,7 @@ module.exports = XHRSettings; /***/ }), -/* 136 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26379,8 +27285,8 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(214); -var Sprite = __webpack_require__(69); +var Components = __webpack_require__(217); +var Sprite = __webpack_require__(75); /** * @classdesc @@ -26470,7 +27376,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 137 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26485,54 +27391,54 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(217), + CalculateFacesAt: __webpack_require__(220), CalculateFacesWithin: __webpack_require__(51), - 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), + Copy: __webpack_require__(1311), + CreateFromTiles: __webpack_require__(1312), + CullTiles: __webpack_require__(1313), + Fill: __webpack_require__(1314), + FilterTiles: __webpack_require__(1315), + FindByIndex: __webpack_require__(1316), + FindTile: __webpack_require__(1317), + ForEachTile: __webpack_require__(1318), + GetTileAt: __webpack_require__(142), + GetTileAtWorldXY: __webpack_require__(1319), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1310), - GetTilesWithinWorldXY: __webpack_require__(1311), - HasTileAt: __webpack_require__(470), - HasTileAtWorldXY: __webpack_require__(1312), - IsInLayerBounds: __webpack_require__(103), - 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), + GetTilesWithinShape: __webpack_require__(1320), + GetTilesWithinWorldXY: __webpack_require__(1321), + HasTileAt: __webpack_require__(475), + HasTileAtWorldXY: __webpack_require__(1322), + IsInLayerBounds: __webpack_require__(101), + PutTileAt: __webpack_require__(221), + PutTileAtWorldXY: __webpack_require__(1323), + PutTilesAt: __webpack_require__(1324), + Randomize: __webpack_require__(1325), + RemoveTileAt: __webpack_require__(476), + RemoveTileAtWorldXY: __webpack_require__(1326), + RenderDebug: __webpack_require__(1327), + ReplaceByIndex: __webpack_require__(474), + SetCollision: __webpack_require__(1328), + SetCollisionBetween: __webpack_require__(1329), + SetCollisionByExclusion: __webpack_require__(1330), + SetCollisionByProperty: __webpack_require__(1331), + SetCollisionFromCollisionGroup: __webpack_require__(1332), + SetTileIndexCallback: __webpack_require__(1333), + SetTileLocationCallback: __webpack_require__(1334), + Shuffle: __webpack_require__(1335), + SwapByIndex: __webpack_require__(1336), + TileToWorldX: __webpack_require__(143), + TileToWorldXY: __webpack_require__(1337), + TileToWorldY: __webpack_require__(144), + WeightedRandomize: __webpack_require__(1338), WorldToTileX: __webpack_require__(63), - WorldToTileXY: __webpack_require__(1329), + WorldToTileXY: __webpack_require__(1339), WorldToTileY: __webpack_require__(64) }; /***/ }), -/* 138 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26541,7 +27447,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(103); +var IsInLayerBounds = __webpack_require__(101); /** * Gets a tile at the given tile coordinates from the given layer. @@ -26588,7 +27494,7 @@ module.exports = GetTileAt; /***/ }), -/* 139 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -26633,7 +27539,7 @@ module.exports = TileToWorldX; /***/ }), -/* 140 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -26678,411 +27584,7 @@ module.exports = TileToWorldY; /***/ }), -/* 141 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A Tileset is a combination of an image containing the tiles and a container for data about - * each tile. - * - * @class Tileset - * @memberof Phaser.Tilemaps - * @constructor - * @since 3.0.0 - * - * @param {string} name - The name of the tileset in the map data. - * @param {integer} firstgid - The first tile index this tileset contains. - * @param {integer} [tileWidth=32] - Width of each tile (in pixels). - * @param {integer} [tileHeight=32] - Height of each tile (in pixels). - * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels). - * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels). - * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset. - * These typically are custom properties created in Tiled when editing a tileset. - * @param {object} [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. - */ -var Tileset = new Class({ - - initialize: - - function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData) - { - if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; } - if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; } - if (tileMargin === undefined) { tileMargin = 0; } - if (tileSpacing === undefined) { tileSpacing = 0; } - if (tileProperties === undefined) { tileProperties = {}; } - if (tileData === undefined) { tileData = {}; } - - /** - * The name of the Tileset. - * - * @name Phaser.Tilemaps.Tileset#name - * @type {string} - * @since 3.0.0 - */ - this.name = name; - - /** - * The starting index of the first tile index this Tileset contains. - * - * @name Phaser.Tilemaps.Tileset#firstgid - * @type {integer} - * @since 3.0.0 - */ - this.firstgid = firstgid; - - /** - * The width of each tile (in pixels). Use setTileSize to change. - * - * @name Phaser.Tilemaps.Tileset#tileWidth - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileWidth = tileWidth; - - /** - * The height of each tile (in pixels). Use setTileSize to change. - * - * @name Phaser.Tilemaps.Tileset#tileHeight - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileHeight = tileHeight; - - /** - * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. - * - * @name Phaser.Tilemaps.Tileset#tileMargin - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileMargin = tileMargin; - - /** - * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. - * - * @name Phaser.Tilemaps.Tileset#tileSpacing - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileSpacing = tileSpacing; - - /** - * Tileset-specific properties per tile that are typically defined in the Tiled editor in the - * Tileset editor. - * - * @name Phaser.Tilemaps.Tileset#tileProperties - * @type {object} - * @since 3.0.0 - */ - this.tileProperties = tileProperties; - - /** - * 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. - * - * @name Phaser.Tilemaps.Tileset#tileData - * @type {object} - * @since 3.0.0 - */ - this.tileData = tileData; - - /** - * The cached image that contains the individual tiles. Use setImage to set. - * - * @name Phaser.Tilemaps.Tileset#image - * @type {?Phaser.Textures.Texture} - * @readonly - * @since 3.0.0 - */ - this.image = null; - - /** - * The gl texture used by the WebGL renderer. - * - * @name Phaser.Tilemaps.Tileset#glTexture - * @type {?WebGLTexture} - * @readonly - * @since 3.11.0 - */ - this.glTexture = null; - - /** - * The number of tile rows in the the tileset. - * - * @name Phaser.Tilemaps.Tileset#rows - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.rows = 0; - - /** - * The number of tile columns in the tileset. - * - * @name Phaser.Tilemaps.Tileset#columns - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.columns = 0; - - /** - * The total number of tiles in the tileset. - * - * @name Phaser.Tilemaps.Tileset#total - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.total = 0; - - /** - * 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}. - * - * @name Phaser.Tilemaps.Tileset#texCoordinates - * @type {object[]} - * @readonly - * @since 3.0.0 - */ - this.texCoordinates = []; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileProperties - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?(object|undefined)} - */ - getTileProperties: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.tileProperties[tileIndex - this.firstgid]; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileData - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object|undefined} - */ - getTileData: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.tileData[tileIndex - this.firstgid]; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object} - */ - getTileCollisionGroup: function (tileIndex) - { - var data = this.getTileData(tileIndex); - - return (data && data.objectgroup) ? data.objectgroup : null; - }, - - /** - * Returns true if and only if this Tileset contains the given tile index. - * - * @method Phaser.Tilemaps.Tileset#containsTileIndex - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {boolean} - */ - containsTileIndex: function (tileIndex) - { - return ( - tileIndex >= this.firstgid && - tileIndex < (this.firstgid + this.total) - ); - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object} Object in the form { x, y } representing the top-left UV coordinate - * within the Tileset image. - */ - getTileTextureCoordinates: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.texCoordinates[tileIndex - this.firstgid]; - }, - - /** - * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setImage - * @since 3.0.0 - * - * @param {Phaser.Textures.Texture} texture - The image that contains the tiles. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setImage: function (texture) - { - this.image = texture; - - this.glTexture = texture.get().source.glTexture; - - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - - return this; - }, - - /** - * Sets the tile width & height and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setTileSize - * @since 3.0.0 - * - * @param {integer} [tileWidth] - The width of a tile in pixels. - * @param {integer} [tileHeight] - The height of a tile in pixels. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setTileSize: function (tileWidth, tileHeight) - { - if (tileWidth !== undefined) { this.tileWidth = tileWidth; } - if (tileHeight !== undefined) { this.tileHeight = tileHeight; } - - if (this.image) - { - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - } - - return this; - }, - - /** - * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setSpacing - * @since 3.0.0 - * - * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels). - * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels). - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setSpacing: function (margin, spacing) - { - if (margin !== undefined) { this.tileMargin = margin; } - if (spacing !== undefined) { this.tileSpacing = spacing; } - - if (this.image) - { - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - } - - return this; - }, - - /** - * Updates tile texture coordinates and tileset data. - * - * @method Phaser.Tilemaps.Tileset#updateTileData - * @since 3.0.0 - * - * @param {integer} imageWidth - The (expected) width of the image to slice. - * @param {integer} imageHeight - The (expected) height of the image to slice. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - updateTileData: function (imageWidth, imageHeight) - { - var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing); - var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing); - - if (rowCount % 1 !== 0 || colCount % 1 !== 0) - { - console.warn('Image tile area not tile size multiple in: ' + this.name); - } - - // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated - // - hence the floor when calculating the rows/columns. - rowCount = Math.floor(rowCount); - colCount = Math.floor(colCount); - - this.rows = rowCount; - this.columns = colCount; - - // In Tiled, "empty" spaces in a tileset count as tiles and hence count towards the gid - this.total = rowCount * colCount; - - this.texCoordinates.length = 0; - - var tx = this.tileMargin; - var ty = this.tileMargin; - - for (var y = 0; y < this.rows; y++) - { - for (var x = 0; x < this.columns; x++) - { - this.texCoordinates.push({ x: tx, y: ty }); - tx += this.tileWidth + this.tileSpacing; - } - - tx = this.tileMargin; - ty += this.tileHeight + this.tileSpacing; - } - - return this; - } - -}); - -module.exports = Tileset; - - -/***/ }), -/* 142 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -27146,7 +27648,7 @@ module.exports = GetNewValue; /***/ }), -/* 143 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27155,17 +27657,17 @@ module.exports = GetNewValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(227); -var GetAdvancedValue = __webpack_require__(15); +var Defaults = __webpack_require__(230); +var GetAdvancedValue = __webpack_require__(14); var GetBoolean = __webpack_require__(88); -var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(142); -var GetProps = __webpack_require__(492); -var GetTargets = __webpack_require__(225); +var GetEaseFunction = __webpack_require__(69); +var GetNewValue = __webpack_require__(145); +var GetProps = __webpack_require__(497); +var GetTargets = __webpack_require__(228); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(226); -var Tween = __webpack_require__(228); -var TweenData = __webpack_require__(230); +var GetValueOp = __webpack_require__(229); +var Tween = __webpack_require__(231); +var TweenData = __webpack_require__(233); /** * Creates a new Tween. @@ -27279,42 +27781,777 @@ module.exports = TweenBuilder; /***/ }), -/* 144 */ -/***/ (function(module, exports) { +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Class = __webpack_require__(0); +var Utils = __webpack_require__(9); + /** - * Check whether the given values are fuzzily equal. + * @classdesc + * WebGLPipeline is a class that describes the way elements will be renderered + * in WebGL, specially focused on batching vertices (batching is not provided). + * Pipelines are mostly used for describing 2D rendering passes but it's + * flexible enough to be used for any type of rendering including 3D. + * Internally WebGLPipeline will handle things like compiling shaders, + * creating vertex buffers, assigning primitive topology and binding + * vertex attributes. * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - gl: Current WebGL context. + * - 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. + * - vertices: An optional buffer of vertices + * - attributes: An array describing the vertex attributes * - * @function Phaser.Math.Fuzzy.Equal + * The vertex attributes properties are: + * - name : String - Name of the attribute in the vertex shader + * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 + * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) + * - normalized : boolean - Is the attribute normalized + * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C + * Here you can find more information of how to describe an attribute: + * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer + * + * @class WebGLPipeline + * @memberof Phaser.Renderer.WebGL + * @constructor * @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`. + * @param {object} config - The configuration object for this WebGL Pipeline, as described above. */ -var Equal = function (a, b, epsilon) -{ - if (epsilon === undefined) { epsilon = 0.0001; } +var WebGLPipeline = new Class({ - return Math.abs(a - b) < epsilon; -}; + initialize: -module.exports = Equal; + function WebGLPipeline (config) + { + /** + * Name of the Pipeline. Used for identifying + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#name + * @type {string} + * @since 3.0.0 + */ + this.name = 'WebGLPipeline'; + + /** + * The Game which owns this WebGL Pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#game + * @type {Phaser.Game} + * @since 3.0.0 + */ + this.game = config.game; + + /** + * The canvas which this WebGL Pipeline renders to. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#view + * @type {HTMLCanvasElement} + * @since 3.0.0 + */ + this.view = config.game.canvas; + + /** + * Used to store the current game resolution + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution + * @type {number} + * @since 3.0.0 + */ + this.resolution = 1; + + /** + * Width of the current viewport + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#width + * @type {number} + * @since 3.0.0 + */ + this.width = 0; + + /** + * Height of the current viewport + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#height + * @type {number} + * @since 3.0.0 + */ + this.height = 0; + + /** + * The WebGL context this WebGL Pipeline uses. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#gl + * @type {WebGLRenderingContext} + * @since 3.0.0 + */ + this.gl = config.gl; + + /** + * How many vertices have been fed to the current pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.vertexCount = 0; + + /** + * The limit of vertices that the pipeline can hold + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity + * @type {integer} + * @since 3.0.0 + */ + this.vertexCapacity = config.vertexCapacity; + + /** + * The WebGL Renderer which owns this WebGL Pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.0.0 + */ + this.renderer = config.renderer; + + /** + * Raw byte buffer of vertices. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData + * @type {ArrayBuffer} + * @since 3.0.0 + */ + this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); + + /** + * The handle to a WebGL vertex buffer object. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer + * @type {WebGLBuffer} + * @since 3.0.0 + */ + this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); + + /** + * The handle to a WebGL program + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#program + * @type {WebGLProgram} + * @since 3.0.0 + */ + this.program = this.renderer.createProgram(config.vertShader, config.fragShader); + + /** + * Array of objects that describe the vertex attributes + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes + * @type {object} + * @since 3.0.0 + */ + this.attributes = config.attributes; + + /** + * The size in bytes of the vertex + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize + * @type {integer} + * @since 3.0.0 + */ + this.vertexSize = config.vertexSize; + + /** + * The primitive topology which the pipeline will use to submit draw calls + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#topology + * @type {integer} + * @since 3.0.0 + */ + this.topology = config.topology; + + /** + * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources + * to the GPU. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes + * @type {Uint8Array} + * @since 3.0.0 + */ + this.bytes = new Uint8Array(this.vertexData); + + /** + * This will store the amount of components of 32 bit length + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount + * @type {integer} + * @since 3.0.0 + */ + this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; + + /** + * Indicates if the current pipeline is active or not for this frame only. + * Reset in the onRender method. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#active + * @type {boolean} + * @since 3.10.0 + */ + this.active = false; + }, + + /** + * Called when the Game has fully booted and the Renderer has finished setting up. + * + * By this stage all Game level systems are now in place and you can perform any final + * tasks that the pipeline may need that relied on game systems such as the Texture Manager. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#boot + * @since 3.11.0 + */ + boot: function () + { + }, + + /** + * Adds a description of vertex attribute to the pipeline + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute + * @since 3.2.0 + * + * @param {string} name - Name of the vertex attribute + * @param {integer} size - Vertex component size + * @param {integer} type - Type of the attribute + * @param {boolean} normalized - Is the value normalized to a range + * @param {integer} offset - Byte offset to the beginning of the first element in the vertex + * + * @return {this} This WebGLPipeline instance. + */ + addAttribute: function (name, size, type, normalized, offset) + { + this.attributes.push({ + name: name, + size: size, + type: this.renderer.glFormats[type], + normalized: normalized, + offset: offset + }); + + this.vertexComponentCount = Utils.getComponentCount( + this.attributes, + this.gl + ); + return this; + }, + + /** + * Check if the current batch of vertices is full. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush + * @since 3.0.0 + * + * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. + */ + shouldFlush: function () + { + return (this.vertexCount >= this.vertexCapacity); + }, + + /** + * Resizes the properties used to describe the viewport + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#resize + * @since 3.0.0 + * + * @param {number} width - The new width of this WebGL Pipeline. + * @param {number} height - The new height of this WebGL Pipeline. + * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. + * + * @return {this} This WebGLPipeline instance. + */ + resize: function (width, height, resolution) + { + this.width = width * resolution; + this.height = height * resolution; + this.resolution = resolution; + + return this; + }, + + /** + * Binds the pipeline resources, including programs, vertex buffers and binds attributes + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#bind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + var gl = this.gl; + var vertexBuffer = this.vertexBuffer; + var attributes = this.attributes; + var program = this.program; + var renderer = this.renderer; + var vertexSize = this.vertexSize; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + } + else if (location !== -1) + { + gl.disableVertexAttribArray(location); + } + } + + return this; + }, + + /** + * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. + * + * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onBind: function () + { + // This is for updating uniform data it's called on each bind attempt. + return this; + }, + + /** + * Called before each frame is rendered, but after the canvas has been cleared. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPreRender: function () + { + // called once every frame + return this; + }, + + /** + * Called before a Scene's Camera is rendered. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. + * + * @return {this} This WebGLPipeline instance. + */ + onRender: function () + { + // called for each camera + return this; + }, + + /** + * Called after each frame has been completely rendered and snapshots have been taken. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPostRender: function () + { + // called once every frame + return this; + }, + + /** + * Uploads the vertex data and emits a draw call + * for the current batch of vertices. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#flush + * @since 3.0.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; + + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + gl.drawArrays(topology, 0, vertexCount); + + this.vertexCount = 0; + this.flushLocked = false; + + return this; + }, + + /** + * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + destroy: function () + { + var gl = this.gl; + + gl.deleteProgram(this.program); + gl.deleteBuffer(this.vertexBuffer); + + delete this.program; + delete this.vertexBuffer; + delete this.gl; + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new value of the `float` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1: function (name, x) + { + this.renderer.setFloat1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec2` uniform. + * @param {number} y - The new Y component of the `vec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2: function (name, x, y) + { + this.renderer.setFloat2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec3` uniform. + * @param {number} y - The new Y component of the `vec3` uniform. + * @param {number} z - The new Z component of the `vec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3: function (name, x, y, z) + { + this.renderer.setFloat3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - X component of the uniform + * @param {number} y - Y component of the uniform + * @param {number} z - Z component of the uniform + * @param {number} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4: function (name, x, y, z, w) + { + this.renderer.setFloat4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1v: function (name, arr) + { + this.renderer.setFloat1v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2v: function (name, arr) + { + this.renderer.setFloat2v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3v: function (name, arr) + { + this.renderer.setFloat3v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4v: function (name, arr) + { + this.renderer.setFloat4v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new value of the `int` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt1: function (name, x) + { + this.renderer.setInt1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec2` uniform. + * @param {integer} y - The new Y component of the `ivec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt2: function (name, x, y) + { + this.renderer.setInt2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec3` uniform. + * @param {integer} y - The new Y component of the `ivec3` uniform. + * @param {integer} z - The new Z component of the `ivec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt3: function (name, x, y, z) + { + this.renderer.setInt3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - X component of the uniform + * @param {integer} y - Y component of the uniform + * @param {integer} z - Z component of the uniform + * @param {integer} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setInt4: function (name, x, y, z, w) + { + this.renderer.setInt4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix2: function (name, transpose, matrix) + { + this.renderer.setMatrix2(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix3: function (name, transpose, matrix) + { + this.renderer.setMatrix3(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Should the matrix be transpose + * @param {Float32Array} matrix - Matrix data + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix4: function (name, transpose, matrix) + { + this.renderer.setMatrix4(this.program, name, transpose, matrix); + + return this; + } + +}); + +module.exports = WebGLPipeline; /***/ }), -/* 145 */, -/* 146 */ +/* 148 */, +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27353,7 +28590,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 147 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27397,7 +28634,7 @@ module.exports = Random; /***/ }), -/* 148 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27406,12 +28643,12 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(111); -var FindClosestInSorted = __webpack_require__(267); -var Frame = __webpack_require__(268); +var FindClosestInSorted = __webpack_require__(270); +var Frame = __webpack_require__(271); var GetValue = __webpack_require__(6); /** @@ -27626,9 +28863,9 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#addFrame * @since 3.0.0 * - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description] + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ addFrame: function (config) { @@ -27642,9 +28879,9 @@ var Animation = new Class({ * @since 3.0.0 * * @param {integer} index - The index to insert the frame at within the animation. - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description] + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ addFrameAt: function (index, config) { @@ -27690,13 +28927,14 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when this Animation completes playback. + * Optionally, hides the parent Game Object, then stops playback. * * @method Phaser.Animations.Animation#completeAnimation * @protected * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ completeAnimation: function (component) { @@ -27709,14 +28947,15 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when this Animation first starts to play. + * Sets the accumulator and nextTick properties. * * @method Phaser.Animations.Animation#getFirstTick * @protected * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] - * @param {boolean} [includeDelay=true] - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. */ getFirstTick: function (component, includeDelay) { @@ -27749,16 +28988,16 @@ var Animation = new Class({ }, /** - * [description] + * Creates AnimationFrame instances based on the given frame data. * * @method Phaser.Animations.Animation#getFrames * @since 3.0.0 * - * @param {Phaser.Textures.TextureManager} textureManager - [description] - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - [description] - * @param {string} [defaultTextureKey] - [description] + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. * - * @return {Phaser.Animations.AnimationFrame[]} [description] + * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. */ getFrames: function (textureManager, frames, defaultTextureKey) { @@ -27851,12 +29090,12 @@ var Animation = new Class({ }, /** - * [description] + * Called internally. Sets the accumulator and nextTick values of the current Animation. * * @method Phaser.Animations.Animation#getNextTick * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ getNextTick: function (component) { @@ -27991,7 +29230,11 @@ var Animation = new Class({ if (component._reverse === !isReverse && component.repeatCounter > 0) { - component.forward = isReverse; + if (!component._repeatDelay || component.pendingRepeat) + + { + component.forward = isReverse; + } this.repeatAnimation(component); @@ -28026,12 +29269,13 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when the Animation is playing backwards. + * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. * * @method Phaser.Animations.Animation#previousFrame * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ previousFrame: function (component) { @@ -28089,14 +29333,15 @@ var Animation = new Class({ }, /** - * [description] + * Removes the given AnimationFrame from this Animation instance. + * This is a global action. Any Game Object using this Animation will be impacted by this change. * * @method Phaser.Animations.Animation#removeFrame * @since 3.0.0 * - * @param {Phaser.Animations.AnimationFrame} frame - [description] + * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ removeFrame: function (frame) { @@ -28119,7 +29364,7 @@ var Animation = new Class({ * * @param {integer} index - The index in the AnimationFrame array * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ removeFrameAt: function (index) { @@ -28131,7 +29376,8 @@ var Animation = new Class({ }, /** - * [description] + * Called internally during playback. Forces the animation to repeat, providing there are enough counts left + * in the repeat counter. * * @method Phaser.Animations.Animation#repeatAnimation * @fires Phaser.Animations.Events#ANIMATION_REPEAT @@ -28139,7 +29385,7 @@ var Animation = new Class({ * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ repeatAnimation: function (component) { @@ -28184,7 +29430,7 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#setFrame * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ setFrame: function (component) { @@ -28205,7 +29451,7 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#toJSON * @since 3.0.0 * - * @return {Phaser.Types.Animations.JSONAnimation} [description] + * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. */ toJSON: function () { @@ -28233,12 +29479,12 @@ var Animation = new Class({ }, /** - * [description] + * Called internally whenever frames are added to, or removed from, this Animation. * * @method Phaser.Animations.Animation#updateFrameSequence * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ updateFrameSequence: function () { @@ -28290,12 +29536,12 @@ var Animation = new Class({ }, /** - * [description] + * Pauses playback of this Animation. The paused state is set immediately. * * @method Phaser.Animations.Animation#pause * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ pause: function () { @@ -28305,12 +29551,12 @@ var Animation = new Class({ }, /** - * [description] + * Resumes playback of this Animation. The paused state is reset immediately. * * @method Phaser.Animations.Animation#resume * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ resume: function () { @@ -28320,7 +29566,9 @@ var Animation = new Class({ }, /** - * [description] + * Destroys this Animation instance. It will remove all event listeners, + * remove this animation and its key from the global Animation Manager, + * and then destroy all Animation Frames in turn. * * @method Phaser.Animations.Animation#destroy * @since 3.0.0 @@ -28350,7 +29598,7 @@ module.exports = Animation; /***/ }), -/* 149 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28363,18 +29611,22 @@ var Perimeter = __webpack_require__(112); var Point = __webpack_require__(4); /** - * Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right. + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. * * @function Phaser.Geom.Rectangle.GetPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rectangle - [description] - * @param {number} position - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. */ var GetPoint = function (rectangle, position, out) { @@ -28427,7 +29679,7 @@ module.exports = GetPoint; /***/ }), -/* 150 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28464,7 +29716,7 @@ var GetPoints = function (line, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Length(line) / stepRate; } @@ -28492,7 +29744,7 @@ module.exports = GetPoints; /***/ }), -/* 151 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28532,7 +29784,7 @@ module.exports = Random; /***/ }), -/* 152 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28570,7 +29822,7 @@ module.exports = Random; /***/ }), -/* 153 */ +/* 156 */ /***/ (function(module, exports) { /** @@ -28699,7 +29951,7 @@ module.exports = Pipeline; /***/ }), -/* 154 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28740,7 +29992,7 @@ module.exports = Random; /***/ }), -/* 155 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28752,17 +30004,17 @@ module.exports = Random; var Point = __webpack_require__(4); /** - * [description] + * Returns a random Point from within the area of the given Triangle. * * @function Phaser.Geom.Triangle.Random * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Triangle} triangle - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get a random point from. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of a random position within the Triangle. */ var Random = function (triangle, out) { @@ -28796,7 +30048,7 @@ module.exports = Random; /***/ }), -/* 156 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -28808,16 +30060,20 @@ module.exports = Random; /** * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * * @function Phaser.Math.RotateAroundDistance * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * @param {number} distance - The distance from (x, y) to place the point at. * - * @return {Phaser.Geom.Point} The given point. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAroundDistance = function (point, x, y, angle, distance) { @@ -28833,7 +30089,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 157 */ +/* 160 */ /***/ (function(module, exports) { /** @@ -28872,7 +30128,7 @@ module.exports = SmootherStep; /***/ }), -/* 158 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -28919,7 +30175,7 @@ module.exports = SmoothStep; /***/ }), -/* 159 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29292,7 +30548,7 @@ module.exports = Map; /***/ }), -/* 160 */ +/* 163 */ /***/ (function(module, exports) { /** @@ -29324,7 +30580,7 @@ module.exports = Map; * @function Phaser.Utils.String.Pad * @since 3.0.0 * - * @param {string} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. + * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. * @param {integer} [len=0] - The number of characters to be added. * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). @@ -29368,7 +30624,7 @@ module.exports = Pad; /***/ }), -/* 161 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29377,10 +30633,10 @@ module.exports = Pad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(291); -var IntegerToColor = __webpack_require__(294); -var ObjectToColor = __webpack_require__(296); -var RGBStringToColor = __webpack_require__(297); +var HexStringToColor = __webpack_require__(294); +var IntegerToColor = __webpack_require__(297); +var ObjectToColor = __webpack_require__(299); +var RGBStringToColor = __webpack_require__(300); /** * Converts the given source color value into an instance of a Color class. @@ -29424,7 +30680,7 @@ module.exports = ValueToColor; /***/ }), -/* 162 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -29454,7 +30710,7 @@ module.exports = GetColor; /***/ }), -/* 163 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29463,7 +30719,7 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(162); +var GetColor = __webpack_require__(165); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -29555,7 +30811,7 @@ module.exports = HSVToRGB; /***/ }), -/* 164 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -29687,7 +30943,7 @@ module.exports = Smoothing(); /***/ }), -/* 165 */ +/* 168 */ /***/ (function(module, exports) { /** @@ -29724,7 +30980,7 @@ module.exports = CenterOn; /***/ }), -/* 166 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29733,89 +30989,8 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -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 = { - - Power0: Linear, - Power1: Quadratic.Out, - Power2: Cubic.Out, - Power3: Quartic.Out, - Power4: Quintic.Out, - - Linear: Linear, - Quad: Quadratic.Out, - Cubic: Cubic.Out, - Quart: Quartic.Out, - Quint: Quintic.Out, - Sine: Sine.Out, - Expo: Expo.Out, - Circ: Circular.Out, - Elastic: Elastic.Out, - Back: Back.Out, - Bounce: Bounce.Out, - Stepped: Stepped, - - 'Quad.easeIn': Quadratic.In, - 'Cubic.easeIn': Cubic.In, - 'Quart.easeIn': Quartic.In, - 'Quint.easeIn': Quintic.In, - 'Sine.easeIn': Sine.In, - 'Expo.easeIn': Expo.In, - 'Circ.easeIn': Circular.In, - 'Elastic.easeIn': Elastic.In, - 'Back.easeIn': Back.In, - 'Bounce.easeIn': Bounce.In, - - 'Quad.easeOut': Quadratic.Out, - 'Cubic.easeOut': Cubic.Out, - 'Quart.easeOut': Quartic.Out, - 'Quint.easeOut': Quintic.Out, - 'Sine.easeOut': Sine.Out, - 'Expo.easeOut': Expo.Out, - 'Circ.easeOut': Circular.Out, - 'Elastic.easeOut': Elastic.Out, - 'Back.easeOut': Back.Out, - 'Bounce.easeOut': Bounce.Out, - - 'Quad.easeInOut': Quadratic.InOut, - 'Cubic.easeInOut': Cubic.InOut, - 'Quart.easeInOut': Quartic.InOut, - 'Quint.easeInOut': Quintic.InOut, - 'Sine.easeInOut': Sine.InOut, - 'Expo.easeInOut': Expo.InOut, - 'Circ.easeInOut': Circular.InOut, - 'Elastic.easeInOut': Elastic.InOut, - 'Back.easeInOut': Back.InOut, - 'Bounce.easeInOut': Bounce.InOut - -}; - - -/***/ }), -/* 167 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var OS = __webpack_require__(116); -var Browser = __webpack_require__(117); +var OS = __webpack_require__(117); +var Browser = __webpack_require__(118); var CanvasPool = __webpack_require__(26); /** @@ -29997,7 +31172,7 @@ module.exports = init(); /***/ }), -/* 168 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30006,8 +31181,8 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(15); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Math @@ -30016,62 +31191,62 @@ var Extend = __webpack_require__(17); var PhaserMath = { // Collections of functions - 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), + Angle: __webpack_require__(733), + Distance: __webpack_require__(743), + Easing: __webpack_require__(748), + Fuzzy: __webpack_require__(749), + Interpolation: __webpack_require__(752), + Pow2: __webpack_require__(757), + Snap: __webpack_require__(759), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(752), + RandomDataGenerator: __webpack_require__(761), // Single functions - Average: __webpack_require__(753), - Bernstein: __webpack_require__(319), - Between: __webpack_require__(170), - CatmullRom: __webpack_require__(169), - CeilTo: __webpack_require__(754), - Clamp: __webpack_require__(22), + Average: __webpack_require__(762), + Bernstein: __webpack_require__(323), + Between: __webpack_require__(172), + CatmullRom: __webpack_require__(171), + CeilTo: __webpack_require__(763), + Clamp: __webpack_require__(19), DegToRad: __webpack_require__(35), - Difference: __webpack_require__(755), - Factorial: __webpack_require__(320), - FloatBetween: __webpack_require__(326), - FloorTo: __webpack_require__(756), + Difference: __webpack_require__(764), + Factorial: __webpack_require__(324), + FloatBetween: __webpack_require__(119), + FloorTo: __webpack_require__(765), FromPercent: __webpack_require__(87), - 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), + GetSpeed: __webpack_require__(766), + IsEven: __webpack_require__(767), + IsEvenStrict: __webpack_require__(768), + Linear: __webpack_require__(116), + MaxAdd: __webpack_require__(769), + MinSub: __webpack_require__(770), + Percent: __webpack_require__(771), + RadToDeg: __webpack_require__(173), + RandomXY: __webpack_require__(772), + RandomXYZ: __webpack_require__(773), + RandomXYZW: __webpack_require__(774), + Rotate: __webpack_require__(330), + RotateAround: __webpack_require__(276), + RotateAroundDistance: __webpack_require__(159), + RoundAwayFromZero: __webpack_require__(331), + RoundTo: __webpack_require__(775), + SinCosTableGenerator: __webpack_require__(776), + SmootherStep: __webpack_require__(160), + SmoothStep: __webpack_require__(161), + ToXY: __webpack_require__(777), + TransformXY: __webpack_require__(332), + Within: __webpack_require__(778), Wrap: __webpack_require__(58), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(172), - Vector4: __webpack_require__(330), - Matrix3: __webpack_require__(331), - Matrix4: __webpack_require__(332), - Quaternion: __webpack_require__(333), - RotateVec3: __webpack_require__(770) + Vector3: __webpack_require__(174), + Vector4: __webpack_require__(333), + Matrix3: __webpack_require__(334), + Matrix4: __webpack_require__(335), + Quaternion: __webpack_require__(336), + RotateVec3: __webpack_require__(779) }; @@ -30085,7 +31260,7 @@ module.exports = PhaserMath; /***/ }), -/* 169 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -30095,16 +31270,16 @@ module.exports = PhaserMath; */ /** - * Calculates a Catmull-Rom value. + * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5. * * @function Phaser.Math.CatmullRom * @since 3.0.0 * - * @param {number} t - [description] - * @param {number} p0 - [description] - * @param {number} p1 - [description] - * @param {number} p2 - [description] - * @param {number} p3 - [description] + * @param {number} t - The amount to interpolate by. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. * * @return {number} The Catmull-Rom value. */ @@ -30122,7 +31297,7 @@ module.exports = CatmullRom; /***/ }), -/* 170 */ +/* 172 */ /***/ (function(module, exports) { /** @@ -30151,7 +31326,7 @@ module.exports = Between; /***/ }), -/* 171 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30160,7 +31335,7 @@ module.exports = Between; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(15); /** * Convert the given angle in radians, to the equivalent angle in degrees. @@ -30181,7 +31356,7 @@ module.exports = RadToDeg; /***/ }), -/* 172 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30991,7 +32166,7 @@ module.exports = Vector3; /***/ }), -/* 173 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31092,7 +32267,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 174 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31102,7 +32277,7 @@ module.exports = DefaultPlugins; */ var Rectangle = __webpack_require__(11); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); // points is an array of Point-like objects, // either 2 dimensional arrays, or objects with public x/y properties: @@ -31178,7 +32353,7 @@ module.exports = FromPoints; /***/ }), -/* 175 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31189,10 +32364,10 @@ module.exports = FromPoints; var CONST = { - CENTER: __webpack_require__(353), - ORIENTATION: __webpack_require__(354), - SCALE_MODE: __webpack_require__(355), - ZOOM: __webpack_require__(356) + CENTER: __webpack_require__(358), + ORIENTATION: __webpack_require__(359), + SCALE_MODE: __webpack_require__(360), + ZOOM: __webpack_require__(361) }; @@ -31200,7 +32375,7 @@ module.exports = CONST; /***/ }), -/* 176 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -31229,7 +32404,7 @@ module.exports = RemoveFromDOM; /***/ }), -/* 177 */ +/* 179 */ /***/ (function(module, exports) { /** @@ -31327,7 +32502,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 178 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31337,13 +32512,13 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -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 CONST = __webpack_require__(125); +var DefaultPlugins = __webpack_require__(175); +var Events = __webpack_require__(22); +var GetPhysicsPlugins = __webpack_require__(878); +var GetScenePlugins = __webpack_require__(879); var NOOP = __webpack_require__(1); -var Settings = __webpack_require__(369); +var Settings = __webpack_require__(374); /** * @classdesc @@ -31437,7 +32612,7 @@ var Systems = new Class({ /** * A reference to the global Animations Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.anims` property. * * @name Phaser.Scenes.Systems#anims @@ -31449,7 +32624,7 @@ var Systems = new Class({ /** * A reference to the global Cache. The Cache stores all files bought in to Phaser via * the Loader, with the exception of images. Images are stored in the Texture Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.cache` property. * * @name Phaser.Scenes.Systems#cache @@ -31460,7 +32635,7 @@ var Systems = new Class({ /** * A reference to the global Plugins Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.plugins` property. * * @name Phaser.Scenes.Systems#plugins @@ -31472,7 +32647,7 @@ var Systems = new Class({ /** * A reference to the global registry. This is a game-wide instance of the Data Manager, allowing * you to exchange data between Scenes via a universal and shared point. - * + * * In the default set-up you can access this from within a Scene via the `this.registry` property. * * @name Phaser.Scenes.Systems#registry @@ -31483,7 +32658,7 @@ var Systems = new Class({ /** * A reference to the global Scale Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.scale` property. * * @name Phaser.Scenes.Systems#scale @@ -31494,7 +32669,7 @@ var Systems = new Class({ /** * A reference to the global Sound Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.sound` property. * * @name Phaser.Scenes.Systems#sound @@ -31505,7 +32680,7 @@ var Systems = new Class({ /** * A reference to the global Texture Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.textures` property. * * @name Phaser.Scenes.Systems#textures @@ -31518,9 +32693,9 @@ var Systems = new Class({ /** * A reference to the Scene's Game Object Factory. - * + * * Use this to quickly and easily create new Game Object's. - * + * * In the default set-up you can access this from within a Scene via the `this.add` property. * * @name Phaser.Scenes.Systems#add @@ -31531,9 +32706,9 @@ var Systems = new Class({ /** * A reference to the Scene's Camera Manager. - * + * * Use this to manipulate and create Cameras for this specific Scene. - * + * * In the default set-up you can access this from within a Scene via the `this.cameras` property. * * @name Phaser.Scenes.Systems#cameras @@ -31544,9 +32719,9 @@ var Systems = new Class({ /** * A reference to the Scene's Display List. - * + * * Use this to organize the children contained in the display list. - * + * * In the default set-up you can access this from within a Scene via the `this.children` property. * * @name Phaser.Scenes.Systems#displayList @@ -31557,9 +32732,9 @@ var Systems = new Class({ /** * A reference to the Scene's Event Manager. - * + * * Use this to listen for Scene specific events, such as `pause` and `shutdown`. - * + * * In the default set-up you can access this from within a Scene via the `this.events` property. * * @name Phaser.Scenes.Systems#events @@ -31570,11 +32745,11 @@ var Systems = new Class({ /** * A reference to the Scene's Game Object Creator. - * + * * Use this to quickly and easily create new Game Object's. The difference between this and the * Game Object Factory, is that the Creator just creates and returns Game Object instances, it * doesn't then add them to the Display List or Update List. - * + * * In the default set-up you can access this from within a Scene via the `this.make` property. * * @name Phaser.Scenes.Systems#make @@ -31585,10 +32760,10 @@ var Systems = new Class({ /** * A reference to the Scene Manager Plugin. - * + * * Use this to manipulate both this and other Scene's in your game, for example to launch a parallel Scene, * or pause or resume a Scene, or switch from this Scene to another. - * + * * In the default set-up you can access this from within a Scene via the `this.scene` property. * * @name Phaser.Scenes.Systems#scenePlugin @@ -31599,12 +32774,12 @@ var Systems = new Class({ /** * A reference to the Scene's Update List. - * + * * Use this to organize the children contained in the update list. - * + * * The Update List is responsible for managing children that need their `preUpdate` methods called, * in order to process so internal components, such as Sprites with Animations. - * + * * In the default set-up there is no reference to this from within the Scene itself. * * @name Phaser.Scenes.Systems#updateList @@ -31688,7 +32863,7 @@ var Systems = new Class({ * * @method Phaser.Scenes.Systems#step * @fires Phaser.Scenes.Events#PRE_UPDATE - * @fires Phaser.Scenes.Events#_UPDATE + * @fires Phaser.Scenes.Events#UPDATE * @fires Phaser.Scenes.Events#POST_UPDATE * @since 3.0.0 * @@ -31756,7 +32931,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#pause * @fires Phaser.Scenes.Events#PAUSE * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'pause' event. * * @return {Phaser.Scenes.Systems} This Systems object. @@ -31811,7 +32986,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#sleep * @fires Phaser.Scenes.Events#SLEEP * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'sleep' event. * * @return {Phaser.Scenes.Systems} This Systems object. @@ -31860,14 +33035,14 @@ var Systems = new Class({ /** * 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} + * @return {any} */ getData: function () { @@ -31985,7 +33160,7 @@ var Systems = new Class({ /** * Set the active state of this Scene. - * + * * An active Scene will run its core update loop. * * @method Phaser.Scenes.Systems#setActive @@ -32048,7 +33223,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#shutdown * @fires Phaser.Scenes.Events#SHUTDOWN * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'shutdown' event. */ shutdown: function (data) @@ -32101,7 +33276,7 @@ module.exports = Systems; /***/ }), -/* 179 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -32138,7 +33313,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 180 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32149,7 +33324,7 @@ module.exports = UppercaseFirst; var Class = __webpack_require__(0); var Frame = __webpack_require__(94); -var TextureSource = __webpack_require__(372); +var TextureSource = __webpack_require__(377); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -32658,7 +33833,7 @@ module.exports = Texture; /***/ }), -/* 181 */ +/* 183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32673,45 +33848,45 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(907), + Matrix: __webpack_require__(914), - 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), + Add: __webpack_require__(921), + AddAt: __webpack_require__(922), + BringToTop: __webpack_require__(923), + CountAllMatching: __webpack_require__(924), + Each: __webpack_require__(925), + EachInRange: __webpack_require__(926), + FindClosestInSorted: __webpack_require__(270), + GetAll: __webpack_require__(381), + GetFirst: __webpack_require__(382), + GetRandom: __webpack_require__(185), + MoveDown: __webpack_require__(927), + MoveTo: __webpack_require__(928), + MoveUp: __webpack_require__(929), + NumberArray: __webpack_require__(930), + NumberArrayStep: __webpack_require__(931), + QuickSelect: __webpack_require__(390), + Range: __webpack_require__(391), + Remove: __webpack_require__(123), + RemoveAt: __webpack_require__(932), + RemoveBetween: __webpack_require__(933), + RemoveRandomElement: __webpack_require__(934), + Replace: __webpack_require__(935), + RotateLeft: __webpack_require__(286), + RotateRight: __webpack_require__(287), SafeRange: __webpack_require__(68), - SendToBack: __webpack_require__(931), - SetAll: __webpack_require__(932), + SendToBack: __webpack_require__(936), + SetAll: __webpack_require__(937), Shuffle: __webpack_require__(114), - SpliceOne: __webpack_require__(79), - StableSort: __webpack_require__(128), - Swap: __webpack_require__(933) + SpliceOne: __webpack_require__(80), + StableSort: __webpack_require__(131), + Swap: __webpack_require__(938) }; /***/ }), -/* 182 */ +/* 184 */ /***/ (function(module, exports) { /** @@ -32772,7 +33947,7 @@ module.exports = CheckMatrix; /***/ }), -/* 183 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -32807,7 +33982,7 @@ module.exports = GetRandom; /***/ }), -/* 184 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32817,8 +33992,8 @@ module.exports = GetRandom; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(935); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(940); /** * @classdesc @@ -33098,7 +34273,7 @@ module.exports = ProcessQueue; /***/ }), -/* 185 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -33237,7 +34412,7 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 186 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33246,13 +34421,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(943); -var Bob = __webpack_require__(946); +var BlitterRender = __webpack_require__(948); +var Bob = __webpack_require__(951); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Frame = __webpack_require__(94); -var GameObject = __webpack_require__(14); -var List = __webpack_require__(126); +var GameObject = __webpack_require__(13); +var List = __webpack_require__(129); /** * @callback CreateCallback @@ -33536,7 +34711,7 @@ module.exports = Blitter; /***/ }), -/* 187 */ +/* 189 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33546,15 +34721,15 @@ module.exports = Blitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(181); +var ArrayUtils = __webpack_require__(183); 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 GameObject = __webpack_require__(13); var Rectangle = __webpack_require__(11); -var Render = __webpack_require__(947); -var Union = __webpack_require__(386); +var Render = __webpack_require__(952); +var Union = __webpack_require__(393); var Vector2 = __webpack_require__(3); /** @@ -33567,6 +34742,10 @@ var Vector2 = __webpack_require__(3); * * The position of the Game Object automatically becomes relative to the position of the Container. * + * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the + * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of + * the Container, and position children positively and negative around it as required. + * * When the Container is rendered, all of its children are rendered as well, in the order in which they exist * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`. * @@ -33888,7 +35067,7 @@ var Container = new Class({ * * @param {boolean} [value=true] - The exclusive state of this Container. * - * @return {Phaser.GameObjects.Container} This Container. + * @return {this} This Container. */ setExclusive: function (value) { @@ -33925,12 +35104,21 @@ var Container = new Class({ output.setTo(this.x, this.y, 0, 0); + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + var transformedPosition = parentMatrix.transformPoint(this.x, this.y); + output.setTo(transformedPosition.x, transformedPosition.y, 0, 0); + } + if (this.list.length > 0) { var children = this.list; var tempRect = new Rectangle(); - for (var i = 0; i < children.length; i++) + var firstChildBounds = children[0].getBounds(); + output.setTo(firstChildBounds.x, firstChildBounds.y, firstChildBounds.width, firstChildBounds.height); + for (var i = 1; i < children.length; i++) { var entry = children[i]; @@ -34009,7 +35197,11 @@ var Container = new Class({ if (this.parentContainer) { - return this.parentContainer.pointToContainer(source, output); + this.parentContainer.pointToContainer(source, output); + } + else + { + output = new Vector2(source.x, source.y); } var tempMatrix = this.tempTransformMatrix; @@ -34049,7 +35241,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ add: function (child) { @@ -34071,7 +35263,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * @param {integer} [index=0] - The position to insert the Game Object/s at. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ addAt: function (child, index) { @@ -34120,7 +35312,7 @@ var Container = new Class({ * @param {string} property - The property to lexically sort by. * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ sort: function (property, handler) { @@ -34262,7 +35454,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ swap: function (child1, child2) { @@ -34285,7 +35477,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. * @param {integer} index - The new position of the Game Object in this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveTo: function (child, index) { @@ -34307,7 +35499,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ remove: function (child, destroyChild) { @@ -34340,7 +35532,7 @@ var Container = new Class({ * @param {integer} index - The index of the Game Object to be removed. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeAt: function (index, destroyChild) { @@ -34366,7 +35558,7 @@ var Container = new Class({ * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeBetween: function (startIndex, endIndex, destroyChild) { @@ -34393,7 +35585,7 @@ var Container = new Class({ * * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeAll: function (destroyChild) { @@ -34419,7 +35611,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ bringToTop: function (child) { @@ -34437,7 +35629,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ sendToBack: function (child) { @@ -34454,7 +35646,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveUp: function (child) { @@ -34471,7 +35663,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveDown: function (child) { @@ -34486,7 +35678,7 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#reverse * @since 3.4.0 * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ reverse: function () { @@ -34501,7 +35693,7 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#shuffle * @since 3.4.0 * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ shuffle: function () { @@ -34521,7 +35713,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ replace: function (oldChild, newChild, destroyChild) { @@ -34573,7 +35765,7 @@ var Container = new Class({ * @param {integer} [startIndex=0] - An optional start index to search from. * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ setAll: function (property, value, startIndex, endIndex) { @@ -34606,7 +35798,7 @@ var Container = new Class({ * @param {object} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ each: function (callback, context) { @@ -34643,7 +35835,7 @@ var Container = new Class({ * @param {object} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ iterate: function (callback, context) { @@ -34861,7 +36053,7 @@ module.exports = Container; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34870,9 +36062,9 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(129); +var BitmapText = __webpack_require__(132); var Class = __webpack_require__(0); -var Render = __webpack_require__(952); +var Render = __webpack_require__(957); /** * @classdesc @@ -35021,7 +36213,7 @@ var DynamicBitmapText = new Class({ * @param {number} width - The width of the crop. * @param {number} height - The height of the crop. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setSize: function (width, height) { @@ -35045,7 +36237,7 @@ var DynamicBitmapText = new Class({ * * @param {Phaser.Types.GameObjects.BitmapText.DisplayCallback} callback - The display callback to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setDisplayCallback: function (callback) { @@ -35062,7 +36254,7 @@ var DynamicBitmapText = new Class({ * * @param {number} value - The horizontal scroll position to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setScrollX: function (value) { @@ -35079,7 +36271,7 @@ var DynamicBitmapText = new Class({ * * @param {number} value - The vertical scroll position to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setScrollY: function (value) { @@ -35094,7 +36286,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 189 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35105,24 +36297,24 @@ module.exports = DynamicBitmapText; var BaseCamera = __webpack_require__(91); var Class = __webpack_require__(0); -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 Commands = __webpack_require__(192); +var ComponentsAlpha = __webpack_require__(269); +var ComponentsBlendMode = __webpack_require__(272); +var ComponentsDepth = __webpack_require__(273); +var ComponentsMask = __webpack_require__(277); +var ComponentsPipeline = __webpack_require__(156); +var ComponentsTransform = __webpack_require__(282); +var ComponentsVisible = __webpack_require__(283); +var ComponentsScrollFactor = __webpack_require__(280); -var TransformMatrix = __webpack_require__(32); +var TransformMatrix = __webpack_require__(29); var Ellipse = __webpack_require__(95); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(958); +var MATH_CONST = __webpack_require__(15); +var Render = __webpack_require__(963); /** * @classdesc @@ -35342,7 +36534,7 @@ var Graphics = new Class({ * * @param {Phaser.Types.GameObjects.Graphics.Styles} options - The styles to set as defaults. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ setDefaultStyles: function (options) { @@ -35376,7 +36568,7 @@ var Graphics = new Class({ * @param {number} color - The stroke color. * @param {number} [alpha=1] - The stroke alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineStyle: function (lineWidth, color, alpha) { @@ -35401,7 +36593,7 @@ var Graphics = new Class({ * @param {number} color - The fill color. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillStyle: function (color, alpha) { @@ -35440,7 +36632,7 @@ var Graphics = new Class({ * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillGradientStyle: function (topLeft, topRight, bottomLeft, bottomRight, alpha) { @@ -35478,7 +36670,7 @@ var Graphics = new Class({ * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineGradientStyle: function (lineWidth, topLeft, topRight, bottomLeft, bottomRight, alpha) { @@ -35554,7 +36746,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#beginPath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ beginPath: function () { @@ -35571,7 +36763,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#closePath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ closePath: function () { @@ -35588,7 +36780,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#fillPath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPath: function () { @@ -35608,7 +36800,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#fill * @since 3.16.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fill: function () { @@ -35625,7 +36817,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#strokePath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokePath: function () { @@ -35645,7 +36837,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#stroke * @since 3.16.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ stroke: function () { @@ -35664,7 +36856,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Circle} circle - The circle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillCircleShape: function (circle) { @@ -35679,7 +36871,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Circle} circle - The circle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeCircleShape: function (circle) { @@ -35696,7 +36888,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the center of the circle. * @param {number} radius - The radius of the circle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillCircle: function (x, y, radius) { @@ -35717,7 +36909,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the center of the circle. * @param {number} radius - The radius of the circle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeCircle: function (x, y, radius) { @@ -35736,7 +36928,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Rectangle} rect - The rectangle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRectShape: function (rect) { @@ -35751,7 +36943,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Rectangle} rect - The rectangle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRectShape: function (rect) { @@ -35769,7 +36961,7 @@ var Graphics = new Class({ * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRect: function (x, y, width, height) { @@ -35792,7 +36984,7 @@ var Graphics = new Class({ * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRect: function (x, y, width, height) { @@ -35835,7 +37027,7 @@ var Graphics = new Class({ * @param {number} height - The height of the rectangle. * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRoundedRect: function (x, y, width, height, radius) { @@ -35881,7 +37073,7 @@ var Graphics = new Class({ * @param {number} height - The height of the rectangle. * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRoundedRect: function (x, y, width, height, radius) { @@ -35926,7 +37118,7 @@ var Graphics = new Class({ * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The point to fill. * @param {number} [size=1] - The size of the square to draw. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPointShape: function (point, size) { @@ -35945,7 +37137,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the point. * @param {number} [size=1] - The size of the square to draw. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPoint: function (x, y, size) { @@ -35975,7 +37167,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Triangle} triangle - The triangle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillTriangleShape: function (triangle) { @@ -35990,7 +37182,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Triangle} triangle - The triangle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeTriangleShape: function (triangle) { @@ -36010,7 +37202,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the third point. * @param {number} y2 - The y coordinate of the third point. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillTriangle: function (x0, y0, x1, y1, x2, y2) { @@ -36035,7 +37227,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the third point. * @param {number} y2 - The y coordinate of the third point. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeTriangle: function (x0, y0, x1, y1, x2, y2) { @@ -36055,7 +37247,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Line} line - The line to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeLineShape: function (line) { @@ -36073,7 +37265,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the end point of the line. * @param {number} y2 - The y coordinate of the end point of the line. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineBetween: function (x1, y1, x2, y2) { @@ -36096,7 +37288,7 @@ var Graphics = new Class({ * @param {number} x - The x coordinate to draw the line to. * @param {number} y - The y coordinate to draw the line to. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineTo: function (x, y) { @@ -36117,7 +37309,7 @@ var Graphics = new Class({ * @param {number} x - The x coordinate to move to. * @param {number} y - The y coordinate to move to. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ moveTo: function (x, y) { @@ -36144,7 +37336,7 @@ var Graphics = new Class({ * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked. * @param {integer} [endIndex] - The index of `points` to stop drawing at. Defaults to `points.length`. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokePoints: function (points, closeShape, closePath, endIndex) { @@ -36191,7 +37383,7 @@ var Graphics = new Class({ * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked. * @param {integer} [endIndex] - The index of `points` to stop at. Defaults to `points.length`. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPoints: function (points, closeShape, closePath, endIndex) { @@ -36232,7 +37424,7 @@ var Graphics = new Class({ * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to stroke. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeEllipseShape: function (ellipse, smoothness) { @@ -36255,7 +37447,7 @@ var Graphics = new Class({ * @param {number} height - The height of the ellipse. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeEllipse: function (x, y, width, height, smoothness) { @@ -36277,7 +37469,7 @@ var Graphics = new Class({ * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to fill. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillEllipseShape: function (ellipse, smoothness) { @@ -36300,7 +37492,7 @@ var Graphics = new Class({ * @param {number} height - The height of the ellipse. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillEllipse: function (x, y, width, height, smoothness) { @@ -36339,7 +37531,7 @@ var Graphics = new Class({ * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise. * @param {number} [overshoot=0] - This value allows you to increase the segment iterations in WebGL rendering. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Use small numbers such as 0.01 to start with and increase as needed. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ arc: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot) { @@ -36375,7 +37567,7 @@ var Graphics = new Class({ * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise. * @param {number} [overshoot=0] - This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ slice: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot) { @@ -36401,7 +37593,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#save * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ save: function () { @@ -36422,7 +37614,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#restore * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ restore: function () { @@ -36448,7 +37640,7 @@ var Graphics = new Class({ * @param {number} x - The horizontal translation to apply. * @param {number} y - The vertical translation to apply. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ translateCanvas: function (x, y) { @@ -36475,7 +37667,7 @@ var Graphics = new Class({ * @param {number} x - The horizontal scale to apply. * @param {number} y - The vertical scale to apply. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ scaleCanvas: function (x, y) { @@ -36501,7 +37693,7 @@ var Graphics = new Class({ * * @param {number} radians - The rotation angle, in radians. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ rotateCanvas: function (radians) { @@ -36519,7 +37711,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#clear * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ clear: function () { @@ -36554,7 +37746,7 @@ var Graphics = new Class({ * @param {integer} [width] - The width of the graphics to generate. * @param {integer} [height] - The height of the graphics to generate. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ generateTexture: function (key, width, height) { @@ -36644,7 +37836,7 @@ module.exports = Graphics; /***/ }), -/* 190 */ +/* 192 */ /***/ (function(module, exports) { /** @@ -36681,7 +37873,7 @@ module.exports = { /***/ }), -/* 191 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36723,7 +37915,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 192 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36734,11 +37926,11 @@ module.exports = CircumferencePoint; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var GravityWell = __webpack_require__(394); -var List = __webpack_require__(126); -var ParticleEmitter = __webpack_require__(396); -var Render = __webpack_require__(968); +var GameObject = __webpack_require__(13); +var GravityWell = __webpack_require__(401); +var List = __webpack_require__(129); +var ParticleEmitter = __webpack_require__(403); +var Render = __webpack_require__(973); /** * @classdesc @@ -36888,7 +38080,7 @@ var ParticleEmitterManager = new Class({ * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setTexture: function (key, frame) { @@ -36909,7 +38101,7 @@ var ParticleEmitterManager = new Class({ * * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setFrame: function (frame) { @@ -36940,7 +38132,7 @@ var ParticleEmitterManager = new Class({ * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames. * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setEmitterFrames: function (frames, emitter) { @@ -37060,7 +38252,7 @@ var ParticleEmitterManager = new Class({ * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ emitParticle: function (count, x, y) { @@ -37089,7 +38281,7 @@ var ParticleEmitterManager = new Class({ * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ emitParticleAt: function (x, y, count) { @@ -37106,7 +38298,7 @@ var ParticleEmitterManager = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ pause: function () { @@ -37121,7 +38313,7 @@ var ParticleEmitterManager = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ resume: function () { @@ -37212,7 +38404,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 193 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37226,12 +38418,12 @@ var Camera = __webpack_require__(91); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var CONST = __webpack_require__(29); +var CONST = __webpack_require__(33); var Frame = __webpack_require__(94); -var GameObject = __webpack_require__(14); -var Render = __webpack_require__(972); -var Utils = __webpack_require__(10); -var UUID = __webpack_require__(194); +var GameObject = __webpack_require__(13); +var Render = __webpack_require__(977); +var Utils = __webpack_require__(9); +var UUID = __webpack_require__(196); /** * @classdesc @@ -38451,7 +39643,7 @@ module.exports = RenderTexture; /***/ }), -/* 194 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -38486,7 +39678,7 @@ module.exports = UUID; /***/ }), -/* 195 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38495,17 +39687,1130 @@ module.exports = UUID; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(120); +var Class = __webpack_require__(0); +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var RopeRender = __webpack_require__(983); +var Vector2 = __webpack_require__(3); + +/** + * @classdesc + * A Rope Game Object. + * + * The Rope object is WebGL only and does not have a Canvas counterpart. + * + * A Rope is a special kind of Game Object that has a texture that repeats along its entire length. + * Unlike a Sprite, it isn't restricted to using just a quad and can have as many vertices as you define + * when creating it. The vertices can be arranged in a horizontal or vertical strip and have their own + * color and alpha values as well. + * + * A Ropes origin is always 0.5 x 0.5 and cannot be changed. + * + * @class Rope + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @webglOnly + * @since 3.23.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @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=0] - The horizontal position of this Game Object in the world. + * @param {number} [y=0] - 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. If not given, `__DEFAULT` is used. + * @param {(string|integer|null)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. See `setPoints` to set this post-creation. + * @param {boolean} [horizontal=true] - Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)? + * @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.AlphaSingle, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.Mask, + Components.Pipeline, + Components.Size, + Components.Texture, + Components.Transform, + Components.Visible, + Components.ScrollFactor, + RopeRender + ], + + initialize: + + function Rope (scene, x, y, texture, frame, points, horizontal, colors, alphas) + { + if (texture === undefined) { texture = '__DEFAULT'; } + if (points === undefined) { points = 2; } + if (horizontal === undefined) { horizontal = true; } + + GameObject.call(this, scene, 'Rope'); + + /** + * The Animation Controller of this Rope. + * + * @name Phaser.GameObjects.Rope#anims + * @type {Phaser.GameObjects.Components.Animation} + * @since 3.23.0 + */ + this.anims = new Components.Animation(this); + + /** + * 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.Types.Math.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; + + /** + * The tint fill mode. + * + * 0 = An additive tint (the default), where vertices colors are blended with the texture. + * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. + * + * @name Phaser.GameObjects.Rope#tintFill + * @type {integer} + * @since 3.23.0 + */ + this.tintFill = (texture === '__DEFAULT') ? 2 : 0; + + /** + * 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; + + /** + * Are the Rope vertices aligned horizontally, in a strip, or vertically, in a column? + * + * This property is set during instantiation and cannot be changed directly. + * See the `setVertical` and `setHorizontal` methods. + * + * @name Phaser.GameObjects.Rope#horizontal + * @type {boolean} + * @readonly + * @since 3.23.0 + */ + this.horizontal = horizontal; + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#_flipX + * @type {boolean} + * @default false + * @private + * @since 3.23.0 + */ + this._flipX = false; + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipY + * @type {boolean} + * @default false + * @private + * @since 3.23.0 + */ + this._flipY = 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(); + + /** + * You can optionally choose to render the vertices of this Rope to a Graphics instance. + * + * Achieve this by setting the `debugCallback` and the `debugGraphic` properties. + * + * You can do this in a single call via the `Rope.setDebug` method, which will use the + * built-in debug function. You can also set it to your own callback. The callback + * will be invoked _once per render_ and sent the following parameters: + * + * `debugCallback(src, meshLength, verts)` + * + * `src` is the Rope instance being debugged. + * `meshLength` is the number of mesh vertices in total. + * `verts` is an array of the translated vertex coordinates. + * + * To disable rendering, set this property back to `null`. + * + * @name Phaser.GameObjects.Rope#debugCallback + * @type {function} + * @since 3.23.0 + */ + this.debugCallback = null; + + /** + * The Graphics instance that the debug vertices will be drawn to, if `setDebug` has + * been called. + * + * @name Phaser.GameObjects.Rope#debugGraphic + * @type {Phaser.GameObjects.Graphics} + * @since 3.23.0 + */ + this.debugGraphic = null; + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.initPipeline('TextureTintStripPipeline'); + + if (Array.isArray(points)) + { + this.resizeArrays(points.length); + } + + this.setPoints(points, colors, alphas); + + this.updateVertices(); + }, + + /** + * The Rope update loop. + * + * @method Phaser.GameObjects.Rope#preUpdate + * @protected + * @since 3.23.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + preUpdate: function (time, delta) + { + var prevFrame = this.anims.currentFrame; + + this.anims.update(time, delta); + + if (this.anims.currentFrame !== prevFrame) + { + this.updateUVs(); + this.updateVertices(); + } + }, + + /** + * Start playing the given animation. + * + * @method Phaser.GameObjects.Rope#play + * @since 3.23.0 + * + * @param {string} key - The string-based key of the animation to play. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {this} This Game Object. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + this.anims.play(key, ignoreIfPlaying, startFrame); + + return this; + }, + + /** + * 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; + }, + + /** + * Sets the alignment of the points in this Rope to be horizontal, in a strip format. + * + * Calling this method will reset this Rope. The current points, vertices, colors and alpha + * values will be reset to thoes values given as parameters. + * + * @method Phaser.GameObjects.Rope#setHorizontal + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. + * @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. + */ + setHorizontal: function (points, colors, alphas) + { + if (points === undefined) { points = this.points.length; } + + if (this.horizontal) + { + return this; + } + + this.horizontal = true; + + return this.setPoints(points, colors, alphas); + }, + + /** + * Sets the alignment of the points in this Rope to be vertical, in a column format. + * + * Calling this method will reset this Rope. The current points, vertices, colors and alpha + * values will be reset to thoes values given as parameters. + * + * @method Phaser.GameObjects.Rope#setVertical + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. + * @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. + */ + setVertical: function (points, colors, alphas) + { + if (points === undefined) { points = this.points.length; } + + if (!this.horizontal) + { + return this; + } + + this.horizontal = false; + + return this.setPoints(points, colors, alphas); + }, + + /** + * Sets the tint fill mode. + * + * Mode 0 is an additive tint, the default, which blends the vertices colors with the texture. + * This mode respects the texture alpha. + * + * Mode 1 is a fill 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. This mode respects the texture alpha. + * + * Mode 2 is a complete tint. The texture colors and alpha are replaced entirely by the vertices colors. + * + * See the `setColors` method for details of how to color each of the vertices. + * + * @method Phaser.GameObjects.Rope#setTintFill + * @webglOnly + * @since 3.23.0 + * + * @param {integer} [value=0] - Set to 0 for an Additive tint, 1 for a fill tint with alpha, or 2 for a fill tint without alpha. + * + * @return {this} This Game Object instance. + */ + setTintFill: function (value) + { + if (value === undefined) { value = 0; } + + this.tintFill = value; + + 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`. + * + * @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: + * + * * One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope. + * * 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 } + * ]); + * ``` + * + * Or, you can provide an integer to do the same thing: + * + * ```javascript + * rope.setPoints(4); + * ``` + * + * Which will divide the Rope into 4 equally sized segments based on the frame width. + * + * 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. + * + * @method Phaser.GameObjects.Rope#setPoints + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. + * @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) + { + if (points === undefined) { points = 2; } + + if (typeof points === 'number') + { + // Generate an array based on the points + var segments = points; + + if (segments < 2) + { + segments = 2; + } + + points = []; + + var s; + var frameSegment; + var offset; + + if (this.horizontal) + { + offset = -(this.frame.halfWidth); + frameSegment = this.frame.width / (segments - 1); + + for (s = 0; s < segments; s++) + { + points.push({ x: offset + s * frameSegment, y: 0 }); + } + } + else + { + offset = -(this.frame.halfHeight); + frameSegment = this.frame.height / (segments - 1); + + for (s = 0; s < segments; s++) + { + points.push({ x: 0, y: offset + s * frameSegment }); + } + } + } + + var total = points.length; + var currentTotal = this.points.length; + + if (total < 1) + { + console.warn('Rope: Not enough points given'); + + return this; + } + else if (total === 1) + { + points.unshift({ x: 0, y: 0 }); + total++; + } + + if (currentTotal !== total) + { + this.resizeArrays(total); + } + + this.points = points; + + this.updateUVs(); + + if (colors !== undefined && colors !== null) + { + this.setColors(colors); + } + + if (alphas !== undefined && alphas !== null) + { + this.setAlphas(alphas); + } + + return this; + }, + + /** + * Updates all of the UVs based on the Rope.points and `flipX` and `flipY` settings. + * + * @method Phaser.GameObjects.Rope#updateUVs + * @since 3.23.0 + * + * @return {this} This Game Object instance. + */ + updateUVs: function () + { + var currentUVs = this.uv; + var total = this.points.length; + + var u0 = this.frame.u0; + var v0 = this.frame.v0; + var u1 = this.frame.u1; + var v1 = this.frame.v1; + + var partH = (u1 - u0) / (total - 1); + var partV = (v1 - v0) / (total - 1); + + for (var i = 0; i < total; i++) + { + var index = i * 4; + + var uv0; + var uv1; + var uv2; + var uv3; + + if (this.horizontal) + { + if (this._flipX) + { + uv0 = u1 - (i * partH); + uv2 = u1 - (i * partH); + } + else + { + uv0 = u0 + (i * partH); + uv2 = u0 + (i * partH); + } + + if (this._flipY) + { + uv1 = v1; + uv3 = v0; + } + else + { + uv1 = v0; + uv3 = v1; + } + } + else + { + if (this._flipX) + { + uv0 = u0; + uv2 = u1; + } + else + { + uv0 = u1; + uv2 = u0; + } + + if (this._flipY) + { + uv1 = v1 - (i * partV); + uv3 = v1 - (i * partV); + } + else + { + uv1 = v0 + (i * partV); + uv3 = v0 + (i * partV); + } + } + + currentUVs[index + 0] = uv0; + currentUVs[index + 1] = uv1; + currentUVs[index + 2] = uv2; + currentUVs[index + 3] = uv3; + } + + 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 nextPoint; + var lastPoint = points[0]; + + var frameSize = (this.horizontal) ? this.frame.halfHeight : this.frame.halfWidth; + + 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 perpLength = perp.length(); + + perp.x /= perpLength; + perp.y /= perpLength; + + perp.x *= frameSize; + perp.y *= frameSize; + + 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; + }, + + /** + * This method enables rendering of the Rope vertices to the given Graphics instance. + * + * If you enable this feature, you must call `Graphics.clear()` in your Scene `update`, + * otherwise the Graphics instance will fill-in with draw calls. This is not done automatically + * to allow for you to debug render multiple Rope objects to a single Graphics instance. + * + * The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however + * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. + * + * The callback is invoked _once per render_ and sent the following parameters: + * + * `callback(src, meshLength, verts)` + * + * `src` is the Rope instance being debugged. + * `meshLength` is the number of mesh vertices in total. + * `verts` is an array of the translated vertex coordinates. + * + * If using your own callback you do not have to provide a Graphics instance to this method. + * + * To disable debug rendering, to either your own callback or the built-in one, call this method + * with no arguments. + * + * @method Phaser.GameObjects.Rope#setDebug + * @since 3.23.0 + * + * @param {Phaser.GameObjects.Graphics} [graphic] - The Graphic instance to render to if using the built-in callback. + * @param {function} [callback] - The callback to invoke during debug render. Leave as undefined to use the built-in callback. + * + * @return {this} This Game Object instance. + */ + setDebug: function (graphic, callback) + { + this.debugGraphic = graphic; + + if (!graphic && !callback) + { + this.debugCallback = null; + } + else if (!callback) + { + this.debugCallback = this.renderDebugVerts; + } + else + { + this.debugCallback = callback; + } + + return this; + }, + + /** + * The built-in Rope vertices debug rendering method. + * + * See `Rope.setDebug` for more details. + * + * @method Phaser.GameObjects.Rope#renderDebugVerts + * @since 3.23.0 + * + * @param {Phaser.GameObjects.Rope} src - The Rope object being rendered. + * @param {integer} meshLength - The number of vertices in the mesh. + * @param {number[]} verts - An array of translated vertex coordinates. + */ + renderDebugVerts: function (src, meshLength, verts) + { + var graphic = src.debugGraphic; + + var px0 = verts[0]; + var py0 = verts[1]; + var px1 = verts[2]; + var py1 = verts[3]; + + graphic.lineBetween(px0, py0, px1, py1); + + for (var i = 4; i < meshLength; i += 4) + { + var x0 = verts[i + 0]; + var y0 = verts[i + 1]; + var x1 = verts[i + 2]; + var y1 = verts[i + 3]; + + graphic.lineBetween(px0, py0, x0, y0); + graphic.lineBetween(px1, py1, x1, y1); + graphic.lineBetween(px1, py1, x0, y0); + graphic.lineBetween(x0, y0, x1, y1); + + px0 = x0; + py0 = y0; + px1 = x1; + py1 = y1; + } + }, + + /** + * Handles the pre-destroy step for the Rope, which removes the Animation component and typed arrays. + * + * @method Phaser.GameObjects.Rope#preDestroy + * @private + * @since 3.23.0 + */ + preDestroy: function () + { + this.anims.destroy(); + + this.anims = undefined; + + this.points = null; + this.vertices = null; + this.uv = null; + this.colors = null; + this.alphas = null; + + this.debugCallback = null; + this.debugGraphic = null; + }, + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipX + * @type {boolean} + * @default false + * @since 3.23.0 + */ + flipX: { + + get: function () + { + return this._flipX; + }, + + set: function (value) + { + this._flipX = value; + + return this.updateUVs(); + } + + }, + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipY + * @type {boolean} + * @default false + * @since 3.23.0 + */ + flipY: { + + get: function () + { + return this._flipY; + }, + + set: function (value) + { + this._flipY = value; + + return this.updateUVs(); + } + + } + +}); + +module.exports = Rope; + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var AddToDOM = __webpack_require__(122); 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__(978); +var GameEvents = __webpack_require__(20); +var GameObject = __webpack_require__(13); +var GetTextSize = __webpack_require__(986); var GetValue = __webpack_require__(6); -var RemoveFromDOM = __webpack_require__(176); -var TextRender = __webpack_require__(979); -var TextStyle = __webpack_require__(982); +var RemoveFromDOM = __webpack_require__(178); +var TextRender = __webpack_require__(987); +var TextStyle = __webpack_require__(990); /** * @classdesc @@ -38518,20 +40823,17 @@ var TextStyle = __webpack_require__(982); * 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. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes, either - * when creating the Text object, or when setting the font via `setFont` or `setFontFamily`. I.e.: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters, either when creating the Text object, or when setting the font via `setFont` + * or `setFontFamily`, e.g.: + * * ```javascript - * this.add.text(0, 0, 'Hello World', { fontFamily: '"Roboto Condensed"' }); + * this.add.text(0, 0, 'Hello World', { fontFamily: 'Georgia, "Goudy Bookletter 1911", Times, serif' }); * ``` - * - * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all - * quoted properly, too: - * + * * ```javascript - * this.add.text(0, 0, 'Hello World', { fontFamily: 'Verdana, "Times New Roman", Tahoma, serif' }); + * this.add.text(0, 0, 'Hello World', { font: '"Press Start 2P"' }); * ``` * * You can only display fonts that are currently loaded and available to the browser: therefore fonts must @@ -38573,6 +40875,8 @@ var TextStyle = __webpack_require__(982); * @param {number} y - The vertical position of this Game Object in the world. * @param {(string|string[])} text - The text this Text object will display. * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The text style configuration object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ var Text = new Class({ @@ -39079,7 +41383,7 @@ var Text = new Class({ * * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this Text object. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setText: function (value) { @@ -39120,7 +41424,7 @@ var Text = new Class({ * * @param {object} style - The style settings to set. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setStyle: function (style) { @@ -39134,19 +41438,19 @@ var Text = new Class({ * * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` * properties of that object are set. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters: + * * ```javascript - * Text.setFont('"Roboto Condensed"'); + * Text.setFont('"Press Start 2P"'); * ``` - * + * * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all * quoted properly, too: - * + * * ```javascript - * Text.setFont('Verdana, "Times New Roman", Tahoma, serif'); + * Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif'); * ``` * * @method Phaser.GameObjects.Text#setFont @@ -39154,7 +41458,9 @@ var Text = new Class({ * * @param {string} font - The font family or font settings to set. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ setFont: function (font) { @@ -39163,19 +41469,19 @@ var Text = new Class({ /** * Set the font family. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters: + * * ```javascript - * Text.setFont('"Roboto Condensed"'); + * Text.setFont('"Press Start 2P"'); * ``` * * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all * quoted properly, too: * * ```javascript - * Text.setFont('Verdana, "Times New Roman", Tahoma, serif'); + * Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif'); * ``` * * @method Phaser.GameObjects.Text#setFontFamily @@ -39183,7 +41489,9 @@ var Text = new Class({ * * @param {string} family - The font family. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ setFontFamily: function (family) { @@ -39198,7 +41506,7 @@ var Text = new Class({ * * @param {number} size - The font size. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFontSize: function (size) { @@ -39213,7 +41521,7 @@ var Text = new Class({ * * @param {string} style - The font style. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFontStyle: function (style) { @@ -39231,7 +41539,7 @@ var Text = new Class({ * @param {number} width - The fixed width to set. `0` disables fixed width. * @param {number} height - The fixed height to set. `0` disables fixed height. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFixedSize: function (width, height) { @@ -39246,7 +41554,7 @@ var Text = new Class({ * * @param {string} color - The background color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setBackgroundColor: function (color) { @@ -39266,7 +41574,7 @@ var Text = new Class({ * * @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFill: function (fillStyle) { @@ -39281,7 +41589,7 @@ var Text = new Class({ * * @param {string} color - The text fill color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setColor: function (color) { @@ -39297,7 +41605,7 @@ var Text = new Class({ * @param {string} color - The stroke color. * @param {number} thickness - The stroke thickness. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setStroke: function (color, thickness) { @@ -39317,7 +41625,7 @@ var Text = new Class({ * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow. * @param {boolean} [shadowFill=true] - Whether to fill the shadow. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadow: function (x, y, color, blur, shadowStroke, shadowFill) { @@ -39333,7 +41641,7 @@ var Text = new Class({ * @param {number} x - The horizontal shadow offset. * @param {number} y - The vertical shadow offset. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowOffset: function (x, y) { @@ -39348,7 +41656,7 @@ var Text = new Class({ * * @param {string} color - The shadow color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowColor: function (color) { @@ -39363,7 +41671,7 @@ var Text = new Class({ * * @param {number} blur - The shadow blur radius. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowBlur: function (blur) { @@ -39378,7 +41686,7 @@ var Text = new Class({ * * @param {boolean} enabled - Whether shadow stroke is enabled or not. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowStroke: function (enabled) { @@ -39393,7 +41701,7 @@ var Text = new Class({ * * @param {boolean} enabled - Whether shadow fill is enabled or not. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowFill: function (enabled) { @@ -39411,7 +41719,7 @@ var Text = new Class({ * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, * spaces and whitespace are left as is. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setWordWrapWidth: function (width, useAdvancedWrap) { @@ -39430,7 +41738,7 @@ var Text = new Class({ * newline characters in place to indicate where breaks should happen. * @param {object} [scope=null] - The scope that will be applied when the callback is invoked. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setWordWrapCallback: function (callback, scope) { @@ -39449,7 +41757,7 @@ var Text = new Class({ * * @param {string} [align='left'] - The text alignment for multi-line text. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setAlign: function (align) { @@ -39472,7 +41780,7 @@ var Text = new Class({ * * @param {number} value - The resolution for this Text object to use. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setResolution: function (value) { @@ -39490,7 +41798,7 @@ var Text = new Class({ * * @param {number} value - The amount to add to the font height to achieve the overall line height. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setLineSpacing: function (value) { @@ -39514,7 +41822,7 @@ var Text = new Class({ * @param {number} right - The right padding value. * @param {number} bottom - The bottom padding value. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setPadding: function (left, top, right, bottom) { @@ -39573,7 +41881,7 @@ var Text = new Class({ * * @param {integer} [max=0] - The maximum number of lines to draw. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setMaxLines: function (max) { @@ -39586,7 +41894,7 @@ var Text = new Class({ * @method Phaser.GameObjects.Text#updateText * @since 3.0.0 * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ updateText: function () { @@ -39761,7 +42069,7 @@ var Text = new Class({ context.restore(); - if (this.renderer.gl) + if (this.renderer && this.renderer.gl) { this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true); @@ -39895,7 +42203,7 @@ module.exports = Text; /***/ }), -/* 196 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -39907,11 +42215,11 @@ module.exports = Text; 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 GetPowerOfTwo = __webpack_require__(324); -var Smoothing = __webpack_require__(164); -var TileSpriteRender = __webpack_require__(984); +var GameEvents = __webpack_require__(20); +var GameObject = __webpack_require__(13); +var GetPowerOfTwo = __webpack_require__(328); +var Smoothing = __webpack_require__(167); +var TileSpriteRender = __webpack_require__(992); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -40547,7 +42855,7 @@ module.exports = TileSprite; /***/ }), -/* 197 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40557,15 +42865,15 @@ module.exports = TileSprite; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Components = __webpack_require__(12); var Events = __webpack_require__(90); -var GameEvents = __webpack_require__(18); -var GameObject = __webpack_require__(14); +var GameEvents = __webpack_require__(20); +var GameObject = __webpack_require__(13); var SoundEvents = __webpack_require__(59); -var UUID = __webpack_require__(194); -var VideoRender = __webpack_require__(987); -var MATH_CONST = __webpack_require__(13); +var UUID = __webpack_require__(196); +var VideoRender = __webpack_require__(995); +var MATH_CONST = __webpack_require__(15); /** * @classdesc @@ -42316,7 +44624,7 @@ module.exports = Video; /***/ }), -/* 198 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42326,9 +44634,9 @@ module.exports = Video; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(199); -var GetPoints = __webpack_require__(411); -var GEOM_CONST = __webpack_require__(46); +var Contains = __webpack_require__(202); +var GetPoints = __webpack_require__(418); +var GEOM_CONST = __webpack_require__(47); /** * @classdesc @@ -42428,7 +44736,7 @@ var Polygon = new Class({ * * @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats. * - * @return {Phaser.Geom.Polygon} This Polygon object. + * @return {this} This Polygon object. */ setTo: function (points) { @@ -42550,7 +44858,7 @@ module.exports = Polygon; /***/ }), -/* 199 */ +/* 202 */ /***/ (function(module, exports) { /** @@ -42599,7 +44907,7 @@ module.exports = Contains; /***/ }), -/* 200 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42609,7 +44917,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(130); +var Mesh = __webpack_require__(134); /** * @classdesc @@ -43103,7 +45411,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setTopLeft: function (x, y) { @@ -43122,7 +45430,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setTopRight: function (x, y) { @@ -43141,7 +45449,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setBottomLeft: function (x, y) { @@ -43160,7 +45468,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setBottomRight: function (x, y) { @@ -43176,7 +45484,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetPosition * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetPosition: function () { @@ -43199,7 +45507,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetAlpha * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetAlpha: function () { @@ -43221,7 +45529,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetColors * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetColors: function () { @@ -43243,7 +45551,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#reset * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ reset: function () { @@ -43260,7 +45568,7 @@ module.exports = Quad; /***/ }), -/* 201 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43271,12 +45579,12 @@ module.exports = Quad; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var GetFastValue = __webpack_require__(2); -var Extend = __webpack_require__(17); -var SetValue = __webpack_require__(419); -var ShaderRender = __webpack_require__(1068); -var TransformMatrix = __webpack_require__(32); +var Extend = __webpack_require__(18); +var SetValue = __webpack_require__(426); +var ShaderRender = __webpack_require__(1078); +var TransformMatrix = __webpack_require__(29); /** * @classdesc @@ -44483,7 +46791,7 @@ module.exports = Shader; /***/ }), -/* 202 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44514,7 +46822,7 @@ module.exports = CircleToCircle; /***/ }), -/* 203 */ +/* 206 */ /***/ (function(module, exports) { /** @@ -44568,7 +46876,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 204 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44579,7 +46887,7 @@ module.exports = CircleToRectangle; */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(205); +var LineToCircle = __webpack_require__(208); /** * Checks for intersection between the line segment and circle, @@ -44660,7 +46968,7 @@ module.exports = GetLineToCircle; /***/ }), -/* 205 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44744,7 +47052,7 @@ module.exports = LineToCircle; /***/ }), -/* 206 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44756,7 +47064,7 @@ module.exports = LineToCircle; var Point = __webpack_require__(4); var LineToLine = __webpack_require__(84); -var LineToRectangle = __webpack_require__(424); +var LineToRectangle = __webpack_require__(431); /** * Checks for intersection between the Line and a Rectangle shape, @@ -44804,7 +47112,7 @@ module.exports = GetLineToRectangle; /***/ }), -/* 207 */ +/* 210 */ /***/ (function(module, exports) { /** @@ -44891,7 +47199,7 @@ module.exports = ContainsArray; /***/ }), -/* 208 */ +/* 211 */ /***/ (function(module, exports) { /** @@ -44939,7 +47247,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 209 */ +/* 212 */ /***/ (function(module, exports) { /** @@ -44967,7 +47275,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 210 */ +/* 213 */ /***/ (function(module, exports) { /** @@ -45021,7 +47329,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 211 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45036,18 +47344,18 @@ module.exports = RotateAroundXY; module.exports = { - 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) + BUTTON_DOWN: __webpack_require__(1201), + BUTTON_UP: __webpack_require__(1202), + CONNECTED: __webpack_require__(1203), + DISCONNECTED: __webpack_require__(1204), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1205), + GAMEPAD_BUTTON_UP: __webpack_require__(1206) }; /***/ }), -/* 212 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45056,8 +47364,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); -var XHRSettings = __webpack_require__(135); +var Extend = __webpack_require__(18); +var XHRSettings = __webpack_require__(139); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -45095,7 +47403,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 213 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45105,12 +47413,12 @@ module.exports = MergeXHRSettings; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(358); +var ParseXML = __webpack_require__(363); /** * @classdesc @@ -45249,14 +47557,14 @@ var XMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#xml - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig|Phaser.Types.Loader.FileTypes.XMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('xml', function (key, url, xhrSettings) { @@ -45280,7 +47588,7 @@ module.exports = XMLFile; /***/ }), -/* 214 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45295,24 +47603,24 @@ module.exports = XMLFile; module.exports = { - 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) + Acceleration: __webpack_require__(1261), + Angular: __webpack_require__(1262), + Bounce: __webpack_require__(1263), + Debug: __webpack_require__(1264), + Drag: __webpack_require__(1265), + Enable: __webpack_require__(1266), + Friction: __webpack_require__(1267), + Gravity: __webpack_require__(1268), + Immovable: __webpack_require__(1269), + Mass: __webpack_require__(1270), + Size: __webpack_require__(1271), + Velocity: __webpack_require__(1272) }; /***/ }), -/* 215 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45327,21 +47635,21 @@ module.exports = { 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) + COLLIDE: __webpack_require__(1274), + OVERLAP: __webpack_require__(1275), + PAUSE: __webpack_require__(1276), + RESUME: __webpack_require__(1277), + TILE_COLLIDE: __webpack_require__(1278), + TILE_OVERLAP: __webpack_require__(1279), + WORLD_BOUNDS: __webpack_require__(1280), + WORLD_STEP: __webpack_require__(1281) }; /***/ }), -/* 216 */, -/* 217 */ +/* 219 */, +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45350,7 +47658,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(138); +var GetTileAt = __webpack_require__(142); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -45417,7 +47725,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 218 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45427,8 +47735,8 @@ module.exports = CalculateFacesAt; */ var Tile = __webpack_require__(74); -var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(217); +var IsInLayerBounds = __webpack_require__(101); +var CalculateFacesAt = __webpack_require__(220); var SetTileCollision = __webpack_require__(73); /** @@ -45497,7 +47805,7 @@ module.exports = PutTileAt; /***/ }), -/* 219 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -45536,7 +47844,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 220 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45545,9 +47853,9 @@ module.exports = SetLayerCollisionIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var LayerData = __webpack_require__(104); -var MapData = __webpack_require__(105); +var Formats = __webpack_require__(32); +var LayerData = __webpack_require__(102); +var MapData = __webpack_require__(103); var Tile = __webpack_require__(74); /** @@ -45567,7 +47875,7 @@ var Tile = __webpack_require__(74); * consumption. However if your map is small or you need to update the tiles dynamically, then leave * the default value set. * - * @return {Phaser.Tilemaps.MapData} [description] + * @return {Phaser.Tilemaps.MapData} The MapData object. */ var Parse2DArray = function (name, data, tileWidth, tileHeight, insertNull) { @@ -45628,7 +47936,7 @@ module.exports = Parse2DArray; /***/ }), -/* 221 */ +/* 224 */ /***/ (function(module, exports) { /** @@ -45648,9 +47956,9 @@ var FLIPPED_ANTI_DIAGONAL = 0x20000000; // Top-right is swapped with bottom-left * @function Phaser.Tilemaps.Parsers.Tiled.ParseGID * @since 3.0.0 * - * @param {number} gid - [description] + * @param {number} gid - A Tiled GID. * - * @return {object} [description] + * @return {Phaser.Types.Tilemaps.GIDData} The GID Data. */ var ParseGID = function (gid) { @@ -45718,7 +48026,7 @@ module.exports = ParseGID; /***/ }), -/* 222 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45779,7 +48087,7 @@ module.exports = CreateGroupLayer; /***/ }), -/* 223 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45788,8 +48096,8 @@ module.exports = CreateGroupLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(480); -var ParseGID = __webpack_require__(221); +var Pick = __webpack_require__(485); +var ParseGID = __webpack_require__(224); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -45837,21 +48145,19 @@ var ParseObject = function (tiledObject, offsetX, offsetY) else if (tiledObject.ellipse) { parsedObject.ellipse = tiledObject.ellipse; - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; } else if (tiledObject.text) { - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; parsedObject.text = tiledObject.text; } + else if (tiledObject.point) + { + parsedObject.point = true; + } else { // Otherwise, assume it is a rectangle parsedObject.rectangle = true; - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; } return parsedObject; @@ -45861,7 +48167,7 @@ module.exports = ParseObject; /***/ }), -/* 224 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45870,10 +48176,10 @@ module.exports = ParseObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var MapData = __webpack_require__(105); -var Parse = __webpack_require__(472); -var Tilemap = __webpack_require__(488); +var Formats = __webpack_require__(32); +var MapData = __webpack_require__(103); +var Parse = __webpack_require__(477); +var Tilemap = __webpack_require__(493); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -45947,7 +48253,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 225 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -45996,7 +48302,7 @@ module.exports = GetTargets; /***/ }), -/* 226 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -46264,7 +48570,7 @@ module.exports = GetValueOp; /***/ }), -/* 227 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -46308,7 +48614,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 228 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46318,12 +48624,12 @@ module.exports = TWEEN_DEFAULTS; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(229); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(232); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var TWEEN_CONST = __webpack_require__(89); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * @classdesc @@ -47952,7 +50258,7 @@ module.exports = Tween; /***/ }), -/* 229 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47967,25 +50273,25 @@ module.exports = Tween; module.exports = { - 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) + TIMELINE_COMPLETE: __webpack_require__(1356), + TIMELINE_LOOP: __webpack_require__(1357), + TIMELINE_PAUSE: __webpack_require__(1358), + TIMELINE_RESUME: __webpack_require__(1359), + TIMELINE_START: __webpack_require__(1360), + TIMELINE_UPDATE: __webpack_require__(1361), + TWEEN_ACTIVE: __webpack_require__(1362), + TWEEN_COMPLETE: __webpack_require__(1363), + TWEEN_LOOP: __webpack_require__(1364), + TWEEN_REPEAT: __webpack_require__(1365), + TWEEN_START: __webpack_require__(1366), + TWEEN_UPDATE: __webpack_require__(1367), + TWEEN_YOYO: __webpack_require__(1368) }; /***/ }), -/* 230 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -48112,7 +50418,7 @@ module.exports = TweenData; /***/ }), -/* 231 */ +/* 234 */ /***/ (function(module, exports) { /** @@ -48166,7 +50472,7 @@ module.exports = ScaleModes; /***/ }), -/* 232 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48198,7 +50504,7 @@ module.exports = Wrap; /***/ }), -/* 233 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48230,776 +50536,7 @@ module.exports = WrapDegrees; /***/ }), -/* 234 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Utils = __webpack_require__(10); - -/** - * @classdesc - * WebGLPipeline is a class that describes the way elements will be renderered - * in WebGL, specially focused on batching vertices (batching is not provided). - * Pipelines are mostly used for describing 2D rendering passes but it's - * flexible enough to be used for any type of rendering including 3D. - * Internally WebGLPipeline will handle things like compiling shaders, - * creating vertex buffers, assigning primitive topology and binding - * vertex attributes. - * - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - gl: Current WebGL context. - * - 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. - * - vertices: An optional buffer of vertices - * - attributes: An array describing the vertex attributes - * - * The vertex attributes properties are: - * - name : String - Name of the attribute in the vertex shader - * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 - * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) - * - normalized : boolean - Is the attribute normalized - * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C - * Here you can find more information of how to describe an attribute: - * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer - * - * @class WebGLPipeline - * @memberof Phaser.Renderer.WebGL - * @constructor - * @since 3.0.0 - * - * @param {object} config - The configuration object for this WebGL Pipeline, as described above. - */ -var WebGLPipeline = new Class({ - - initialize: - - function WebGLPipeline (config) - { - /** - * Name of the Pipeline. Used for identifying - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#name - * @type {string} - * @since 3.0.0 - */ - this.name = 'WebGLPipeline'; - - /** - * The Game which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#game - * @type {Phaser.Game} - * @since 3.0.0 - */ - this.game = config.game; - - /** - * The canvas which this WebGL Pipeline renders to. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#view - * @type {HTMLCanvasElement} - * @since 3.0.0 - */ - this.view = config.game.canvas; - - /** - * Used to store the current game resolution - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = 1; - - /** - * Width of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#width - * @type {number} - * @since 3.0.0 - */ - this.width = 0; - - /** - * Height of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#height - * @type {number} - * @since 3.0.0 - */ - this.height = 0; - - /** - * The WebGL context this WebGL Pipeline uses. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#gl - * @type {WebGLRenderingContext} - * @since 3.0.0 - */ - this.gl = config.gl; - - /** - * How many vertices have been fed to the current pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.vertexCount = 0; - - /** - * The limit of vertices that the pipeline can hold - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity - * @type {integer} - * @since 3.0.0 - */ - this.vertexCapacity = config.vertexCapacity; - - /** - * The WebGL Renderer which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer - * @type {Phaser.Renderer.WebGL.WebGLRenderer} - * @since 3.0.0 - */ - this.renderer = config.renderer; - - /** - * Raw byte buffer of vertices. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData - * @type {ArrayBuffer} - * @since 3.0.0 - */ - this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); - - /** - * The handle to a WebGL vertex buffer object. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer - * @type {WebGLBuffer} - * @since 3.0.0 - */ - this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); - - /** - * The handle to a WebGL program - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#program - * @type {WebGLProgram} - * @since 3.0.0 - */ - this.program = this.renderer.createProgram(config.vertShader, config.fragShader); - - /** - * Array of objects that describe the vertex attributes - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes - * @type {object} - * @since 3.0.0 - */ - this.attributes = config.attributes; - - /** - * The size in bytes of the vertex - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {integer} - * @since 3.0.0 - */ - this.vertexSize = config.vertexSize; - - /** - * The primitive topology which the pipeline will use to submit draw calls - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {integer} - * @since 3.0.0 - */ - this.topology = config.topology; - - /** - * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources - * to the GPU. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes - * @type {Uint8Array} - * @since 3.0.0 - */ - this.bytes = new Uint8Array(this.vertexData); - - /** - * This will store the amount of components of 32 bit length - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount - * @type {integer} - * @since 3.0.0 - */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); - - /** - * Indicates if the current pipeline is flushing the contents to the GPU. - * When the variable is set the flush function will be locked. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked - * @type {boolean} - * @since 3.1.0 - */ - this.flushLocked = false; - - /** - * Indicates if the current pipeline is active or not for this frame only. - * Reset in the onRender method. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#active - * @type {boolean} - * @since 3.10.0 - */ - this.active = false; - }, - - /** - * Called when the Game has fully booted and the Renderer has finished setting up. - * - * By this stage all Game level systems are now in place and you can perform any final - * tasks that the pipeline may need that relied on game systems such as the Texture Manager. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#boot - * @since 3.11.0 - */ - boot: function () - { - }, - - /** - * Adds a description of vertex attribute to the pipeline - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute - * @since 3.2.0 - * - * @param {string} name - Name of the vertex attribute - * @param {integer} size - Vertex component size - * @param {integer} type - Type of the attribute - * @param {boolean} normalized - Is the value normalized to a range - * @param {integer} offset - Byte offset to the beginning of the first element in the vertex - * - * @return {this} This WebGLPipeline instance. - */ - addAttribute: function (name, size, type, normalized, offset) - { - this.attributes.push({ - name: name, - size: size, - type: this.renderer.glFormats[type], - normalized: normalized, - offset: offset - }); - - this.vertexComponentCount = Utils.getComponentCount( - this.attributes, - this.gl - ); - return this; - }, - - /** - * Check if the current batch of vertices is full. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush - * @since 3.0.0 - * - * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. - */ - shouldFlush: function () - { - return (this.vertexCount >= this.vertexCapacity); - }, - - /** - * Resizes the properties used to describe the viewport - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width of this WebGL Pipeline. - * @param {number} height - The new height of this WebGL Pipeline. - * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - this.width = width * resolution; - this.height = height * resolution; - this.resolution = resolution; - - return this; - }, - - /** - * Binds the pipeline resources, including programs, vertex buffers and binds attributes - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#bind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - bind: function () - { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; - var renderer = this.renderer; - var vertexSize = this.vertexSize; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - } - else if (location !== -1) - { - gl.disableVertexAttribArray(location); - } - } - - return this; - }, - - /** - * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. - * - * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onBind: function () - { - // This is for updating uniform data it's called on each bind attempt. - return this; - }, - - /** - * Called before each frame is rendered, but after the canvas has been cleared. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPreRender: function () - { - // called once every frame - return this; - }, - - /** - * Called before a Scene's Camera is rendered. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. - * - * @return {this} This WebGLPipeline instance. - */ - onRender: function () - { - // called for each camera - return this; - }, - - /** - * Called after each frame has been completely rendered and snapshots have been taken. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPostRender: function () - { - // called once every frame - return this; - }, - - /** - * Uploads the vertex data and emits a draw call - * for the current batch of vertices. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#flush - * @since 3.0.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; - - if (vertexCount === 0) - { - this.flushLocked = false; - return; - } - - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - gl.drawArrays(topology, 0, vertexCount); - - this.vertexCount = 0; - this.flushLocked = false; - - return this; - }, - - /** - * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - destroy: function () - { - var gl = this.gl; - - gl.deleteProgram(this.program); - gl.deleteBuffer(this.vertexBuffer); - - delete this.program; - delete this.vertexBuffer; - delete this.gl; - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new value of the `float` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1: function (name, x) - { - this.renderer.setFloat1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec2` uniform. - * @param {number} y - The new Y component of the `vec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2: function (name, x, y) - { - this.renderer.setFloat2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec3` uniform. - * @param {number} y - The new Y component of the `vec3` uniform. - * @param {number} z - The new Z component of the `vec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3: function (name, x, y, z) - { - this.renderer.setFloat3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - X component of the uniform - * @param {number} y - Y component of the uniform - * @param {number} z - Z component of the uniform - * @param {number} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4: function (name, x, y, z, w) - { - this.renderer.setFloat4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1v: function (name, arr) - { - this.renderer.setFloat1v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2v: function (name, arr) - { - this.renderer.setFloat2v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3v: function (name, arr) - { - this.renderer.setFloat3v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4v: function (name, arr) - { - this.renderer.setFloat4v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new value of the `int` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt1: function (name, x) - { - this.renderer.setInt1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec2` uniform. - * @param {integer} y - The new Y component of the `ivec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt2: function (name, x, y) - { - this.renderer.setInt2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec3` uniform. - * @param {integer} y - The new Y component of the `ivec3` uniform. - * @param {integer} z - The new Z component of the `ivec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt3: function (name, x, y, z) - { - this.renderer.setInt3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - X component of the uniform - * @param {integer} y - Y component of the uniform - * @param {integer} z - Z component of the uniform - * @param {integer} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setInt4: function (name, x, y, z, w) - { - this.renderer.setInt4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix2: function (name, transpose, matrix) - { - this.renderer.setMatrix2(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix3: function (name, transpose, matrix) - { - this.renderer.setMatrix3(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Should the matrix be transpose - * @param {Float32Array} matrix - Matrix data - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix4: function (name, transpose, matrix) - { - this.renderer.setMatrix4(this.program, name, transpose, matrix); - - return this; - } - -}); - -module.exports = WebGLPipeline; - - -/***/ }), -/* 235 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49012,12 +50549,12 @@ module.exports = WebGLPipeline; var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var GetFastValue = __webpack_require__(2); -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__(234); +var ModelViewProjection = __webpack_require__(238); +var ShaderSourceFS = __webpack_require__(339); +var ShaderSourceVS = __webpack_require__(340); +var TransformMatrix = __webpack_require__(29); +var Utils = __webpack_require__(9); +var WebGLPipeline = __webpack_require__(147); /** * @classdesc @@ -50507,9 +52044,759 @@ module.exports = TextureTintPipeline; /***/ }), -/* 236 */, -/* 237 */, /* 238 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Implements a model view projection matrices. + * Pipelines can implement this for doing 2D and 3D rendering. + * + * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection + * @since 3.0.0 + */ +var ModelViewProjection = { + + /** + * Dirty flag for checking if model matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + modelMatrixDirty: false, + + /** + * Dirty flag for checking if view matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + viewMatrixDirty: false, + + /** + * Dirty flag for checking if projection matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + projectionMatrixDirty: false, + + /** + * Model matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + modelMatrix: null, + + /** + * View matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + viewMatrix: null, + + /** + * Projection matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + projectionMatrix: null, + + /** + * Initializes MVP matrices with an identity matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit + * @since 3.0.0 + */ + mvpInit: function () + { + this.modelMatrixDirty = true; + this.viewMatrixDirty = true; + this.projectionMatrixDirty = true; + + 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 + ]); + + return this; + }, + + /** + * If dirty flags are set then the matrices are uploaded to the GPU. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate + * @since 3.0.0 + */ + mvpUpdate: function () + { + var program = this.program; + + if (this.modelMatrixDirty) + { + this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); + this.modelMatrixDirty = false; + } + + if (this.viewMatrixDirty) + { + this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); + this.viewMatrixDirty = false; + } + + if (this.projectionMatrixDirty) + { + this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); + this.projectionMatrixDirty = false; + } + + return this; + }, + + /** + * Loads an identity matrix to the model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity + * @since 3.0.0 + */ + modelIdentity: function () + { + var modelMatrix = this.modelMatrix; + + modelMatrix[0] = 1; + modelMatrix[1] = 0; + modelMatrix[2] = 0; + modelMatrix[3] = 0; + modelMatrix[4] = 0; + modelMatrix[5] = 1; + modelMatrix[6] = 0; + modelMatrix[7] = 0; + modelMatrix[8] = 0; + modelMatrix[9] = 0; + modelMatrix[10] = 1; + modelMatrix[11] = 0; + modelMatrix[12] = 0; + modelMatrix[13] = 0; + modelMatrix[14] = 0; + modelMatrix[15] = 1; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Scale model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + modelScale: function (x, y, z) + { + var modelMatrix = this.modelMatrix; + + modelMatrix[0] = modelMatrix[0] * x; + modelMatrix[1] = modelMatrix[1] * x; + modelMatrix[2] = modelMatrix[2] * x; + modelMatrix[3] = modelMatrix[3] * x; + modelMatrix[4] = modelMatrix[4] * y; + modelMatrix[5] = modelMatrix[5] * y; + modelMatrix[6] = modelMatrix[6] * y; + modelMatrix[7] = modelMatrix[7] * y; + modelMatrix[8] = modelMatrix[8] * z; + modelMatrix[9] = modelMatrix[9] * z; + modelMatrix[10] = modelMatrix[10] * z; + modelMatrix[11] = modelMatrix[11] * z; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Translate model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + modelTranslate: function (x, y, z) + { + var modelMatrix = this.modelMatrix; + + modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12]; + modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13]; + modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14]; + modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15]; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the X axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateX: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a10 = modelMatrix[4]; + var a11 = modelMatrix[5]; + var a12 = modelMatrix[6]; + var a13 = modelMatrix[7]; + var a20 = modelMatrix[8]; + var a21 = modelMatrix[9]; + var a22 = modelMatrix[10]; + var a23 = modelMatrix[11]; + + modelMatrix[4] = a10 * c + a20 * s; + modelMatrix[5] = a11 * c + a21 * s; + modelMatrix[6] = a12 * c + a22 * s; + modelMatrix[7] = a13 * c + a23 * s; + modelMatrix[8] = a20 * c - a10 * s; + modelMatrix[9] = a21 * c - a11 * s; + modelMatrix[10] = a22 * c - a12 * s; + modelMatrix[11] = a23 * c - a13 * s; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the Y axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateY: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = modelMatrix[0]; + var a01 = modelMatrix[1]; + var a02 = modelMatrix[2]; + var a03 = modelMatrix[3]; + var a20 = modelMatrix[8]; + var a21 = modelMatrix[9]; + var a22 = modelMatrix[10]; + var a23 = modelMatrix[11]; + + modelMatrix[0] = a00 * c - a20 * s; + modelMatrix[1] = a01 * c - a21 * s; + modelMatrix[2] = a02 * c - a22 * s; + modelMatrix[3] = a03 * c - a23 * s; + modelMatrix[8] = a00 * s + a20 * c; + modelMatrix[9] = a01 * s + a21 * c; + modelMatrix[10] = a02 * s + a22 * c; + modelMatrix[11] = a03 * s + a23 * c; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the Z axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateZ: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = modelMatrix[0]; + var a01 = modelMatrix[1]; + var a02 = modelMatrix[2]; + var a03 = modelMatrix[3]; + var a10 = modelMatrix[4]; + var a11 = modelMatrix[5]; + var a12 = modelMatrix[6]; + var a13 = modelMatrix[7]; + + modelMatrix[0] = a00 * c + a10 * s; + modelMatrix[1] = a01 * c + a11 * s; + modelMatrix[2] = a02 * c + a12 * s; + modelMatrix[3] = a03 * c + a13 * s; + modelMatrix[4] = a10 * c - a00 * s; + modelMatrix[5] = a11 * c - a01 * s; + modelMatrix[6] = a12 * c - a02 * s; + modelMatrix[7] = a13 * c - a03 * s; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Loads identity matrix into the view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity + * @since 3.0.0 + * + * @return {this} This Model View Projection. + */ + viewIdentity: function () + { + var viewMatrix = this.viewMatrix; + + viewMatrix[0] = 1; + viewMatrix[1] = 0; + viewMatrix[2] = 0; + viewMatrix[3] = 0; + viewMatrix[4] = 0; + viewMatrix[5] = 1; + viewMatrix[6] = 0; + viewMatrix[7] = 0; + viewMatrix[8] = 0; + viewMatrix[9] = 0; + viewMatrix[10] = 1; + viewMatrix[11] = 0; + viewMatrix[12] = 0; + viewMatrix[13] = 0; + viewMatrix[14] = 0; + viewMatrix[15] = 1; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Scales view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + viewScale: function (x, y, z) + { + var viewMatrix = this.viewMatrix; + + viewMatrix[0] = viewMatrix[0] * x; + viewMatrix[1] = viewMatrix[1] * x; + viewMatrix[2] = viewMatrix[2] * x; + viewMatrix[3] = viewMatrix[3] * x; + viewMatrix[4] = viewMatrix[4] * y; + viewMatrix[5] = viewMatrix[5] * y; + viewMatrix[6] = viewMatrix[6] * y; + viewMatrix[7] = viewMatrix[7] * y; + viewMatrix[8] = viewMatrix[8] * z; + viewMatrix[9] = viewMatrix[9] * z; + viewMatrix[10] = viewMatrix[10] * z; + viewMatrix[11] = viewMatrix[11] * z; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Translates view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + viewTranslate: function (x, y, z) + { + var viewMatrix = this.viewMatrix; + + viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12]; + viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13]; + viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14]; + viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15]; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the X axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateX: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a10 = viewMatrix[4]; + var a11 = viewMatrix[5]; + var a12 = viewMatrix[6]; + var a13 = viewMatrix[7]; + var a20 = viewMatrix[8]; + var a21 = viewMatrix[9]; + var a22 = viewMatrix[10]; + var a23 = viewMatrix[11]; + + viewMatrix[4] = a10 * c + a20 * s; + viewMatrix[5] = a11 * c + a21 * s; + viewMatrix[6] = a12 * c + a22 * s; + viewMatrix[7] = a13 * c + a23 * s; + viewMatrix[8] = a20 * c - a10 * s; + viewMatrix[9] = a21 * c - a11 * s; + viewMatrix[10] = a22 * c - a12 * s; + viewMatrix[11] = a23 * c - a13 * s; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the Y axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateY: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = viewMatrix[0]; + var a01 = viewMatrix[1]; + var a02 = viewMatrix[2]; + var a03 = viewMatrix[3]; + var a20 = viewMatrix[8]; + var a21 = viewMatrix[9]; + var a22 = viewMatrix[10]; + var a23 = viewMatrix[11]; + + viewMatrix[0] = a00 * c - a20 * s; + viewMatrix[1] = a01 * c - a21 * s; + viewMatrix[2] = a02 * c - a22 * s; + viewMatrix[3] = a03 * c - a23 * s; + viewMatrix[8] = a00 * s + a20 * c; + viewMatrix[9] = a01 * s + a21 * c; + viewMatrix[10] = a02 * s + a22 * c; + viewMatrix[11] = a03 * s + a23 * c; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the Z axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateZ: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = viewMatrix[0]; + var a01 = viewMatrix[1]; + var a02 = viewMatrix[2]; + var a03 = viewMatrix[3]; + var a10 = viewMatrix[4]; + var a11 = viewMatrix[5]; + var a12 = viewMatrix[6]; + var a13 = viewMatrix[7]; + + viewMatrix[0] = a00 * c + a10 * s; + viewMatrix[1] = a01 * c + a11 * s; + viewMatrix[2] = a02 * c + a12 * s; + viewMatrix[3] = a03 * c + a13 * s; + viewMatrix[4] = a10 * c - a00 * s; + viewMatrix[5] = a11 * c - a01 * s; + viewMatrix[6] = a12 * c - a02 * s; + viewMatrix[7] = a13 * c - a03 * s; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D + * @since 3.0.0 + * + * @param {Float32Array} matrix2D - The Matrix2D. + * + * @return {this} This Model View Projection. + */ + viewLoad2D: function (matrix2D) + { + var vm = this.viewMatrix; + + vm[0] = matrix2D[0]; + vm[1] = matrix2D[1]; + vm[2] = 0.0; + vm[3] = 0.0; + vm[4] = matrix2D[2]; + vm[5] = matrix2D[3]; + vm[6] = 0.0; + vm[7] = 0.0; + vm[8] = matrix2D[4]; + vm[9] = matrix2D[5]; + vm[10] = 1.0; + vm[11] = 0.0; + vm[12] = 0.0; + vm[13] = 0.0; + vm[14] = 0.0; + vm[15] = 1.0; + + this.viewMatrixDirty = true; + + return this; + }, + + + /** + * Copies a 4x4 matrix into the view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad + * @since 3.0.0 + * + * @param {Float32Array} matrix - The Matrix2D. + * + * @return {this} This Model View Projection. + */ + viewLoad: function (matrix) + { + var vm = this.viewMatrix; + + vm[0] = matrix[0]; + vm[1] = matrix[1]; + vm[2] = matrix[2]; + vm[3] = matrix[3]; + vm[4] = matrix[4]; + vm[5] = matrix[5]; + vm[6] = matrix[6]; + vm[7] = matrix[7]; + vm[8] = matrix[8]; + vm[9] = matrix[9]; + vm[10] = matrix[10]; + vm[11] = matrix[11]; + vm[12] = matrix[12]; + vm[13] = matrix[13]; + vm[14] = matrix[14]; + vm[15] = matrix[15]; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Loads identity matrix into the projection matrix. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity + * @since 3.0.0 + * + * @return {this} This Model View Projection. + */ + projIdentity: function () + { + var projectionMatrix = this.projectionMatrix; + + projectionMatrix[0] = 1; + projectionMatrix[1] = 0; + projectionMatrix[2] = 0; + projectionMatrix[3] = 0; + projectionMatrix[4] = 0; + projectionMatrix[5] = 1; + projectionMatrix[6] = 0; + projectionMatrix[7] = 0; + projectionMatrix[8] = 0; + projectionMatrix[9] = 0; + projectionMatrix[10] = 1; + projectionMatrix[11] = 0; + projectionMatrix[12] = 0; + projectionMatrix[13] = 0; + projectionMatrix[14] = 0; + projectionMatrix[15] = 1; + + this.projectionMatrixDirty = true; + + return this; + }, + + /** + * Sets up an orthographic projection matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho + * @since 3.0.0 + * + * @param {number} left - The left value. + * @param {number} right - The right value. + * @param {number} bottom - The bottom value. + * @param {number} top - The top value. + * @param {number} near - The near value. + * @param {number} far - The far value. + * + * @return {this} This Model View Projection. + */ + projOrtho: function (left, right, bottom, top, near, far) + { + var projectionMatrix = this.projectionMatrix; + var leftRight = 1.0 / (left - right); + var bottomTop = 1.0 / (bottom - top); + var nearFar = 1.0 / (near - far); + + projectionMatrix[0] = -2.0 * leftRight; + projectionMatrix[1] = 0.0; + projectionMatrix[2] = 0.0; + projectionMatrix[3] = 0.0; + projectionMatrix[4] = 0.0; + projectionMatrix[5] = -2.0 * bottomTop; + projectionMatrix[6] = 0.0; + projectionMatrix[7] = 0.0; + projectionMatrix[8] = 0.0; + projectionMatrix[9] = 0.0; + projectionMatrix[10] = 2.0 * nearFar; + projectionMatrix[11] = 0.0; + projectionMatrix[12] = (left + right) * leftRight; + projectionMatrix[13] = (top + bottom) * bottomTop; + projectionMatrix[14] = (far + near) * nearFar; + projectionMatrix[15] = 1.0; + + this.projectionMatrixDirty = true; + + return this; + }, + + /** + * Sets up a perspective projection matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp + * @since 3.0.0 + * + * @param {number} fovY - The fov value. + * @param {number} aspectRatio - The aspectRatio value. + * @param {number} near - The near value. + * @param {number} far - The far value. + * + * @return {this} This Model View Projection. + */ + projPersp: function (fovY, aspectRatio, near, far) + { + var projectionMatrix = this.projectionMatrix; + var fov = 1.0 / Math.tan(fovY / 2.0); + var nearFar = 1.0 / (near - far); + + projectionMatrix[0] = fov / aspectRatio; + projectionMatrix[1] = 0.0; + projectionMatrix[2] = 0.0; + projectionMatrix[3] = 0.0; + projectionMatrix[4] = 0.0; + projectionMatrix[5] = fov; + projectionMatrix[6] = 0.0; + projectionMatrix[7] = 0.0; + projectionMatrix[8] = 0.0; + projectionMatrix[9] = 0.0; + projectionMatrix[10] = (far + near) * nearFar; + projectionMatrix[11] = -1.0; + projectionMatrix[12] = 0.0; + projectionMatrix[13] = 0.0; + projectionMatrix[14] = (2.0 * far * near) * nearFar; + projectionMatrix[15] = 0.0; + + this.projectionMatrixDirty = true; + + return this; + } +}; + +module.exports = ModelViewProjection; + + +/***/ }), +/* 239 */, +/* 240 */, +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50524,65 +52811,65 @@ module.exports = TextureTintPipeline; module.exports = { - 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), + AlignTo: __webpack_require__(526), + Angle: __webpack_require__(527), + Call: __webpack_require__(528), + GetFirst: __webpack_require__(529), + GetLast: __webpack_require__(530), + GridAlign: __webpack_require__(531), + IncAlpha: __webpack_require__(592), + IncX: __webpack_require__(593), + IncXY: __webpack_require__(594), + IncY: __webpack_require__(595), + PlaceOnCircle: __webpack_require__(596), + PlaceOnEllipse: __webpack_require__(597), + PlaceOnLine: __webpack_require__(598), + PlaceOnRectangle: __webpack_require__(599), + PlaceOnTriangle: __webpack_require__(600), + PlayAnimation: __webpack_require__(601), PropertyValueInc: __webpack_require__(34), PropertyValueSet: __webpack_require__(25), - 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) + RandomCircle: __webpack_require__(602), + RandomEllipse: __webpack_require__(603), + RandomLine: __webpack_require__(604), + RandomRectangle: __webpack_require__(605), + RandomTriangle: __webpack_require__(606), + Rotate: __webpack_require__(607), + RotateAround: __webpack_require__(608), + RotateAroundDistance: __webpack_require__(609), + ScaleX: __webpack_require__(610), + ScaleXY: __webpack_require__(611), + ScaleY: __webpack_require__(612), + SetAlpha: __webpack_require__(613), + SetBlendMode: __webpack_require__(614), + SetDepth: __webpack_require__(615), + SetHitArea: __webpack_require__(616), + SetOrigin: __webpack_require__(617), + SetRotation: __webpack_require__(618), + SetScale: __webpack_require__(619), + SetScaleX: __webpack_require__(620), + SetScaleY: __webpack_require__(621), + SetScrollFactor: __webpack_require__(622), + SetScrollFactorX: __webpack_require__(623), + SetScrollFactorY: __webpack_require__(624), + SetTint: __webpack_require__(625), + SetVisible: __webpack_require__(626), + SetX: __webpack_require__(627), + SetXY: __webpack_require__(628), + SetY: __webpack_require__(629), + ShiftPosition: __webpack_require__(630), + Shuffle: __webpack_require__(631), + SmootherStep: __webpack_require__(632), + SmoothStep: __webpack_require__(633), + Spread: __webpack_require__(634), + ToggleVisible: __webpack_require__(635), + WrapInRectangle: __webpack_require__(636) }; /***/ }), -/* 239 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50591,22 +52878,22 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); +var ALIGN_CONST = __webpack_require__(105); 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); +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(243); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(244); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(245); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(246); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(247); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(248); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(249); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(250); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(251); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(252); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(253); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(254); /** * Takes a Game Object and aligns it next to another, at the given position. @@ -50634,7 +52921,7 @@ module.exports = QuickSet; /***/ }), -/* 240 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50643,10 +52930,10 @@ module.exports = QuickSet; * @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__(39); +var GetBottom = __webpack_require__(39); +var GetCenterX = __webpack_require__(76); +var SetCenterX = __webpack_require__(77); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. @@ -50678,7 +52965,7 @@ module.exports = BottomCenter; /***/ }), -/* 241 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50687,10 +52974,10 @@ module.exports = BottomCenter; * @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); +var GetBottom = __webpack_require__(39); +var GetLeft = __webpack_require__(41); +var SetLeft = __webpack_require__(42); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. @@ -50722,7 +53009,7 @@ module.exports = BottomLeft; /***/ }), -/* 242 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50731,10 +53018,10 @@ module.exports = BottomLeft; * @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); +var GetBottom = __webpack_require__(39); +var GetRight = __webpack_require__(43); +var SetRight = __webpack_require__(44); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. @@ -50766,7 +53053,7 @@ module.exports = BottomRight; /***/ }), -/* 243 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50775,10 +53062,10 @@ module.exports = BottomRight; * @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); +var GetBottom = __webpack_require__(39); +var GetLeft = __webpack_require__(41); +var SetBottom = __webpack_require__(45); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. @@ -50810,7 +53097,7 @@ module.exports = LeftBottom; /***/ }), -/* 244 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50819,10 +53106,10 @@ module.exports = LeftBottom; * @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); +var GetCenterY = __webpack_require__(78); +var GetLeft = __webpack_require__(41); +var SetCenterY = __webpack_require__(79); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. @@ -50854,7 +53141,7 @@ module.exports = LeftCenter; /***/ }), -/* 245 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50863,10 +53150,10 @@ module.exports = LeftCenter; * @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); +var GetLeft = __webpack_require__(41); +var GetTop = __webpack_require__(46); +var SetRight = __webpack_require__(44); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. @@ -50898,7 +53185,7 @@ module.exports = LeftTop; /***/ }), -/* 246 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50907,10 +53194,10 @@ module.exports = LeftTop; * @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); +var GetBottom = __webpack_require__(39); +var GetRight = __webpack_require__(43); +var SetBottom = __webpack_require__(45); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. @@ -50942,7 +53229,7 @@ module.exports = RightBottom; /***/ }), -/* 247 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50951,10 +53238,10 @@ module.exports = RightBottom; * @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); +var GetCenterY = __webpack_require__(78); +var GetRight = __webpack_require__(43); +var SetCenterY = __webpack_require__(79); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. @@ -50986,7 +53273,7 @@ module.exports = RightCenter; /***/ }), -/* 248 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50995,10 +53282,10 @@ module.exports = RightCenter; * @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); +var GetRight = __webpack_require__(43); +var GetTop = __webpack_require__(46); +var SetLeft = __webpack_require__(42); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. @@ -51030,7 +53317,7 @@ module.exports = RightTop; /***/ }), -/* 249 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51039,10 +53326,10 @@ module.exports = RightTop; * @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); +var GetCenterX = __webpack_require__(76); +var GetTop = __webpack_require__(46); +var SetBottom = __webpack_require__(45); +var SetCenterX = __webpack_require__(77); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -51074,7 +53361,7 @@ module.exports = TopCenter; /***/ }), -/* 250 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51083,10 +53370,10 @@ module.exports = TopCenter; * @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); +var GetLeft = __webpack_require__(41); +var GetTop = __webpack_require__(46); +var SetBottom = __webpack_require__(45); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. @@ -51118,7 +53405,7 @@ module.exports = TopLeft; /***/ }), -/* 251 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51127,10 +53414,10 @@ module.exports = TopLeft; * @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); +var GetRight = __webpack_require__(43); +var GetTop = __webpack_require__(46); +var SetBottom = __webpack_require__(45); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. @@ -51162,7 +53449,7 @@ module.exports = TopRight; /***/ }), -/* 252 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51171,19 +53458,19 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); +var ALIGN_CONST = __webpack_require__(105); var AlignInMap = []; -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.BOTTOM_CENTER] = __webpack_require__(256); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(257); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(258); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(259); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(261); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(262); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(263); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(264); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(265); 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]; @@ -51215,7 +53502,7 @@ module.exports = QuickSet; /***/ }), -/* 253 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51224,10 +53511,10 @@ module.exports = QuickSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(38); -var GetCenterX = __webpack_require__(75); -var SetBottom = __webpack_require__(44); -var SetCenterX = __webpack_require__(76); +var GetBottom = __webpack_require__(39); +var GetCenterX = __webpack_require__(76); +var SetBottom = __webpack_require__(45); +var SetCenterX = __webpack_require__(77); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -51259,7 +53546,7 @@ module.exports = BottomCenter; /***/ }), -/* 254 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51268,10 +53555,10 @@ module.exports = BottomCenter; * @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 SetLeft = __webpack_require__(41); +var GetBottom = __webpack_require__(39); +var GetLeft = __webpack_require__(41); +var SetBottom = __webpack_require__(45); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. @@ -51303,7 +53590,7 @@ module.exports = BottomLeft; /***/ }), -/* 255 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51312,10 +53599,10 @@ module.exports = BottomLeft; * @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 SetRight = __webpack_require__(43); +var GetBottom = __webpack_require__(39); +var GetRight = __webpack_require__(43); +var SetBottom = __webpack_require__(45); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. @@ -51347,7 +53634,7 @@ module.exports = BottomRight; /***/ }), -/* 256 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51356,9 +53643,9 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(257); -var GetCenterX = __webpack_require__(75); -var GetCenterY = __webpack_require__(77); +var CenterOn = __webpack_require__(260); +var GetCenterX = __webpack_require__(76); +var GetCenterY = __webpack_require__(78); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -51389,7 +53676,7 @@ module.exports = Center; /***/ }), -/* 257 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51398,8 +53685,8 @@ module.exports = Center; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetCenterX = __webpack_require__(76); -var SetCenterY = __webpack_require__(78); +var SetCenterX = __webpack_require__(77); +var SetCenterY = __webpack_require__(79); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -51426,7 +53713,7 @@ module.exports = CenterOn; /***/ }), -/* 258 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51435,10 +53722,10 @@ module.exports = CenterOn; * @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 SetLeft = __webpack_require__(41); +var GetCenterY = __webpack_require__(78); +var GetLeft = __webpack_require__(41); +var SetCenterY = __webpack_require__(79); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned in the left center of the other. @@ -51470,7 +53757,7 @@ module.exports = LeftCenter; /***/ }), -/* 259 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51479,10 +53766,10 @@ module.exports = LeftCenter; * @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 SetRight = __webpack_require__(43); +var GetCenterY = __webpack_require__(78); +var GetRight = __webpack_require__(43); +var SetCenterY = __webpack_require__(79); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the right center of the other. @@ -51514,7 +53801,7 @@ module.exports = RightCenter; /***/ }), -/* 260 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51523,10 +53810,10 @@ module.exports = RightCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterX = __webpack_require__(75); -var GetTop = __webpack_require__(45); -var SetCenterX = __webpack_require__(76); -var SetTop = __webpack_require__(39); +var GetCenterX = __webpack_require__(76); +var GetTop = __webpack_require__(46); +var SetCenterX = __webpack_require__(77); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -51558,7 +53845,7 @@ module.exports = TopCenter; /***/ }), -/* 261 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51567,10 +53854,10 @@ module.exports = TopCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(40); -var GetTop = __webpack_require__(45); -var SetLeft = __webpack_require__(41); -var SetTop = __webpack_require__(39); +var GetLeft = __webpack_require__(41); +var GetTop = __webpack_require__(46); +var SetLeft = __webpack_require__(42); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -51602,7 +53889,7 @@ module.exports = TopLeft; /***/ }), -/* 262 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51611,10 +53898,10 @@ module.exports = TopLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(42); -var GetTop = __webpack_require__(45); -var SetRight = __webpack_require__(43); -var SetTop = __webpack_require__(39); +var GetRight = __webpack_require__(43); +var GetTop = __webpack_require__(46); +var SetRight = __webpack_require__(44); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -51646,7 +53933,7 @@ module.exports = TopRight; /***/ }), -/* 263 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51655,9 +53942,9 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(146); +var CircumferencePoint = __webpack_require__(149); var FromPercent = __webpack_require__(87); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Point = __webpack_require__(4); /** @@ -51689,7 +53976,7 @@ module.exports = GetPoint; /***/ }), -/* 264 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51698,10 +53985,10 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(265); -var CircumferencePoint = __webpack_require__(146); +var Circumference = __webpack_require__(268); +var CircumferencePoint = __webpack_require__(149); var FromPercent = __webpack_require__(87); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle, @@ -51722,7 +54009,7 @@ var GetPoints = function (circle, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Circumference(circle) / stepRate; } @@ -51741,7 +54028,7 @@ module.exports = GetPoints; /***/ }), -/* 265 */ +/* 268 */ /***/ (function(module, exports) { /** @@ -51769,7 +54056,7 @@ module.exports = Circumference; /***/ }), -/* 266 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -51778,7 +54065,7 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 @@ -51879,7 +54166,7 @@ module.exports = AlphaSingle; /***/ }), -/* 267 */ +/* 270 */ /***/ (function(module, exports) { /** @@ -51963,7 +54250,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 268 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52137,7 +54424,7 @@ module.exports = AnimationFrame; /***/ }), -/* 269 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52259,7 +54546,7 @@ module.exports = BlendMode; /***/ }), -/* 270 */ +/* 273 */ /***/ (function(module, exports) { /** @@ -52352,7 +54639,7 @@ module.exports = Depth; /***/ }), -/* 271 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52361,7 +54648,7 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(149); +var GetPoint = __webpack_require__(152); var Perimeter = __webpack_require__(112); // Return an array of points from the perimeter of the rectangle @@ -52387,7 +54674,7 @@ var GetPoints = function (rectangle, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Perimeter(rectangle) / stepRate; } @@ -52406,7 +54693,7 @@ module.exports = GetPoints; /***/ }), -/* 272 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52445,7 +54732,7 @@ module.exports = GetPoint; /***/ }), -/* 273 */ +/* 276 */ /***/ (function(module, exports) { /** @@ -52455,17 +54742,21 @@ module.exports = GetPoint; */ /** - * Rotate a `point` around `x` and `y` by the given `angle`. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. + * + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). * * @function Phaser.Math.RotateAround * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * - * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAround = function (point, x, y, angle) { @@ -52485,7 +54776,7 @@ module.exports = RotateAround; /***/ }), -/* 274 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52494,8 +54785,8 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(275); -var GeometryMask = __webpack_require__(276); +var BitmapMask = __webpack_require__(278); +var GeometryMask = __webpack_require__(279); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -52632,7 +54923,7 @@ module.exports = Mask; /***/ }), -/* 275 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52642,7 +54933,7 @@ module.exports = Mask; */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); /** * @classdesc @@ -52925,7 +55216,7 @@ module.exports = BitmapMask; /***/ }), -/* 276 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53240,7 +55531,7 @@ module.exports = GeometryMask; /***/ }), -/* 277 */ +/* 280 */ /***/ (function(module, exports) { /** @@ -53347,7 +55638,7 @@ module.exports = ScrollFactor; /***/ }), -/* 278 */ +/* 281 */ /***/ (function(module, exports) { /** @@ -53408,7 +55699,7 @@ module.exports = ToJSON; /***/ }), -/* 279 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53417,10 +55708,10 @@ module.exports = ToJSON; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); -var TransformMatrix = __webpack_require__(32); -var WrapAngle = __webpack_require__(232); -var WrapAngleDegrees = __webpack_require__(233); +var MATH_CONST = __webpack_require__(15); +var TransformMatrix = __webpack_require__(29); +var WrapAngle = __webpack_require__(235); +var WrapAngleDegrees = __webpack_require__(236); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -53638,8 +55929,8 @@ 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. + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. * * If you prefer to work in degrees, see the `angle` property instead. * @@ -53947,7 +56238,7 @@ module.exports = Transform; /***/ }), -/* 280 */ +/* 283 */ /***/ (function(module, exports) { /** @@ -54036,7 +56327,7 @@ module.exports = Visible; /***/ }), -/* 281 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54051,16 +56342,16 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(572), - CHANGE_DATA_KEY: __webpack_require__(573), - REMOVE_DATA: __webpack_require__(574), - SET_DATA: __webpack_require__(575) + CHANGE_DATA: __webpack_require__(577), + CHANGE_DATA_KEY: __webpack_require__(578), + REMOVE_DATA: __webpack_require__(579), + SET_DATA: __webpack_require__(580) }; /***/ }), -/* 282 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54074,20 +56365,20 @@ var Point = __webpack_require__(4); /** - * Return an array of points from the perimeter of the rectangle - * each spaced out based on the quantity or step required + * Returns an array of points from the perimeter of the Rectangle, where each point is spaced out based + * on either the `step` value, or the `quantity`. * * @function Phaser.Geom.Rectangle.MarchingAnts * @since 3.0.0 * * @generic {Phaser.Geom.Point[]} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {number} step - [description] - * @param {integer} quantity - [description] - * @param {(array|Phaser.Geom.Point[])} [out] - [description] + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the perimeter points from. + * @param {number} [step] - The distance between each point of the perimeter. Set to `null` if you wish to use the `quantity` parameter instead. + * @param {integer} [quantity] - The total number of points to return. The step is then calculated based on the length of the Rectangle, divided by this value. + * @param {(array|Phaser.Geom.Point[])} [out] - An array in which the perimeter points will be stored. If not given, a new array instance is created. * - * @return {(array|Phaser.Geom.Point[])} [description] + * @return {(array|Phaser.Geom.Point[])} An array containing the perimeter points from the Rectangle. */ var MarchingAnts = function (rect, step, quantity, out) { @@ -54179,7 +56470,7 @@ module.exports = MarchingAnts; /***/ }), -/* 283 */ +/* 286 */ /***/ (function(module, exports) { /** @@ -54219,7 +56510,7 @@ module.exports = RotateLeft; /***/ }), -/* 284 */ +/* 287 */ /***/ (function(module, exports) { /** @@ -54259,7 +56550,7 @@ module.exports = RotateRight; /***/ }), -/* 285 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -54333,7 +56624,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 286 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54342,14 +56633,14 @@ module.exports = BresenhamPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(148); +var Animation = __webpack_require__(151); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(159); -var EventEmitter = __webpack_require__(9); +var CustomMap = __webpack_require__(162); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(111); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(160); +var Pad = __webpack_require__(163); /** * @classdesc @@ -54469,7 +56760,7 @@ var AnimationManager = new Class({ * @param {string} key - The key under which the Animation should be added. The Animation will be updated with it. Must be unique. * @param {Phaser.Animations.Animation} animation - The Animation which should be added to the Animation Manager. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ add: function (key, animation) { @@ -54477,7 +56768,7 @@ var AnimationManager = new Class({ { console.warn('Animation key exists: ' + key); - return; + return this; } animation.key = key; @@ -54600,7 +56891,34 @@ var AnimationManager = new Class({ }, /** - * [description] + * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. + * + * Generates objects with string based frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNames}. + * + * It's a helper method, designed to make it easier for you to extract all of the frame names from texture atlases. + * If you're working with a sprite sheet, see the `generateFrameNumbers` method instead. + * + * Example: + * + * If you have a texture atlases loaded called `gems` and it contains 6 frames called `ruby_0001`, `ruby_0002`, and so on, + * then you can call this method using: `this.anims.generateFrameNames('gems', { prefix: 'ruby_', end: 6, zeroPad: 4 })`. + * + * The `end` value tells it to look for 6 frames, incrementally numbered, all starting with the prefix `ruby_`. The `zeroPad` + * value tells it how many zeroes pad out the numbers. To create an animation using this method, you can do: + * + * ```javascript + * this.anims.create({ + * key: 'ruby', + * repeat: -1, + * frames: this.anims.generateFrameNames('gems', { + * prefix: 'ruby_', + * end: 6, + * zeroPad: 4 + * }) + * }); + * ``` + * + * Please see the animation examples for further details. * * @method Phaser.Animations.AnimationManager#generateFrameNames * @since 3.0.0 @@ -54678,6 +56996,8 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}. + * + * If you're working with a texture atlas, see the `generateFrameNames` method instead. * * @method Phaser.Animations.AnimationManager#generateFrameNumbers * @since 3.0.0 @@ -54795,7 +57115,7 @@ var AnimationManager = new Class({ * @fires Phaser.Animations.Events#PAUSE_ALL * @since 3.0.0 * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ pauseAll: function () { @@ -54818,7 +57138,7 @@ var AnimationManager = new Class({ * @param {string} key - The key of the animation to play on the Game Object. * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ play: function (key, child) { @@ -54831,7 +57151,7 @@ var AnimationManager = new Class({ if (!anim) { - return; + return this; } for (var i = 0; i < child.length; i++) @@ -54843,7 +57163,10 @@ var AnimationManager = new Class({ }, /** - * Remove an animation. + * Removes an Animation from this Animation Manager, based on the given key. + * + * This is a global action. Once an Animation has been removed, no Game Objects + * can carry on using it. * * @method Phaser.Animations.AnimationManager#remove * @fires Phaser.Animations.Events#REMOVE_ANIMATION @@ -54851,7 +57174,7 @@ var AnimationManager = new Class({ * * @param {string} key - The key of the animation to remove. * - * @return {Phaser.Animations.Animation} [description] + * @return {Phaser.Animations.Animation} The Animation instance that was removed from the Animation Manager. */ remove: function (key) { @@ -54874,7 +57197,7 @@ var AnimationManager = new Class({ * @fires Phaser.Animations.Events#RESUME_ALL * @since 3.0.0 * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ resumeAll: function () { @@ -54902,7 +57225,7 @@ var AnimationManager = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ staggerPlay: function (key, children, stagger) { @@ -54917,7 +57240,7 @@ var AnimationManager = new Class({ if (!anim) { - return; + return this; } for (var i = 0; i < children.length; i++) @@ -54929,35 +57252,36 @@ var AnimationManager = new Class({ }, /** - * Get the animation data as javascript object by giving key, or get the data of all animations as array of objects, if key wasn't provided. + * Returns the Animation data as JavaScript object based on the given key. + * Or, if not key is defined, it will return the data of all animations as array of objects. * * @method Phaser.Animations.AnimationManager#toJSON * @since 3.0.0 * - * @param {string} key - [description] + * @param {string} [key] - The animation to get the JSONAnimation data from. If not provided, all animations are returned as an array. * - * @return {Phaser.Types.Animations.JSONAnimations} [description] + * @return {Phaser.Types.Animations.JSONAnimations} The resulting JSONAnimations formatted object. */ toJSON: function (key) { + var output = { + anims: [], + globalTimeScale: this.globalTimeScale + }; + if (key !== undefined && key !== '') { - return this.anims.get(key).toJSON(); + output.anims.push(this.anims.get(key).toJSON()); } else { - var output = { - anims: [], - globalTimeScale: this.globalTimeScale - }; - this.anims.each(function (animationKey, animation) { output.anims.push(animation.toJSON()); }); - - return output; } + + return output; }, /** @@ -54982,7 +57306,7 @@ module.exports = AnimationManager; /***/ }), -/* 287 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54992,9 +57316,9 @@ module.exports = AnimationManager; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(159); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(288); +var CustomMap = __webpack_require__(162); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(291); /** * @classdesc @@ -55047,7 +57371,7 @@ var BaseCache = new Class({ * @param {string} key - The unique key by which the data added to the cache will be referenced. * @param {*} data - The data to be stored in the cache. * - * @return {Phaser.Cache.BaseCache} This BaseCache object. + * @return {this} This BaseCache object. */ add: function (key, data) { @@ -55118,7 +57442,7 @@ var BaseCache = new Class({ * * @param {string} key - The unique key of the item to remove from the cache. * - * @return {Phaser.Cache.BaseCache} This BaseCache object. + * @return {this} This BaseCache object. */ remove: function (key) { @@ -55168,7 +57492,7 @@ module.exports = BaseCache; /***/ }), -/* 288 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55183,14 +57507,14 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(634), - REMOVE: __webpack_require__(635) + ADD: __webpack_require__(639), + REMOVE: __webpack_require__(640) }; /***/ }), -/* 289 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55199,9 +57523,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(287); +var BaseCache = __webpack_require__(290); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); /** * @classdesc @@ -55424,7 +57748,7 @@ module.exports = CacheManager; /***/ }), -/* 290 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55435,12 +57759,12 @@ module.exports = CacheManager; var BaseCamera = __webpack_require__(91); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(165); -var Clamp = __webpack_require__(22); +var CenterOn = __webpack_require__(168); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Effects = __webpack_require__(298); -var Linear = __webpack_require__(115); +var Effects = __webpack_require__(301); +var Linear = __webpack_require__(116); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -55546,6 +57870,16 @@ var Camera = new Class({ */ this.panEffect = new Effects.Pan(this); + /** + * The Camera Rotate To effect handler. + * To rotate this camera see the `Camera.rotateTo` method. + * + * @name Phaser.Cameras.Scene2D.Camera#rotateToEffect + * @type {Phaser.Cameras.Scene2D.Effects.RotateTo} + * @since 3.23.0 + */ + this.rotateToEffect = new Effects.RotateTo(this); + /** * The Camera Zoom effect handler. * To zoom this camera see the `Camera.zoom` method. @@ -55637,6 +57971,24 @@ var Camera = new Class({ */ this.renderToTexture = false; + /** + * If this Camera is rendering to a texture (via `setRenderToTexture`) then you + * have the option to control if it should also render to the Game canvas as well. + * + * By default, a Camera will render both to its texture and to the Game canvas. + * + * However, if you set ths property to `false` it will only render to the texture + * and skip rendering to the Game canvas. + * + * Setting this property if the Camera isn't rendering to a texture has no effect. + * + * @name Phaser.Cameras.Scene2D.Camera#renderToGame + * @type {boolean} + * @default true + * @since 3.23.0 + */ + this.renderToGame = true; + /** * If this Camera has been set to render to a texture then this holds a reference * to the HTML Canvas Element that the Camera is drawing to. @@ -55733,6 +58085,9 @@ var Camera = new Class({ * * You should not enable this unless you plan on actually using the texture it creates * somehow, otherwise you're just doubling the work required to render your game. + * + * If you only require the Camera to render to a texture, and not also to the Game, + * them set the `renderToGame` parameter to `false`. * * To temporarily disable rendering to a texture, toggle the `renderToTexture` boolean. * @@ -55743,11 +58098,14 @@ var Camera = new Class({ * @since 3.13.0 * * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - An optional WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. + * @param {boolean} [renderToGame=true] - If you do not need the Camera to still render to the Game, set this parameter to `false`. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ - setRenderToTexture: function (pipeline) + setRenderToTexture: function (pipeline, renderToGame) { + if (renderToGame === undefined) { renderToGame = true; } + var renderer = this.scene.sys.game.renderer; if (renderer.gl) @@ -55762,6 +58120,7 @@ var Camera = new Class({ } this.renderToTexture = true; + this.renderToGame = renderToGame; if (pipeline) { @@ -55783,7 +58142,7 @@ var Camera = new Class({ * * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - The WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. Or if left empty it will clear the pipeline. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ setPipeline: function (pipeline) { @@ -55814,7 +58173,7 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#clearRenderToTexture * @since 3.13.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ clearRenderToTexture: function () { @@ -55881,7 +58240,7 @@ var Camera = new Class({ * @param {number} [width] - The width of the deadzone rectangle in pixels. If not specified the deadzone is removed. * @param {number} [height] - The height of the deadzone rectangle in pixels. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ setDeadzone: function (width, height) { @@ -55937,7 +58296,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeIn: function (duration, red, green, blue, callback, context) { @@ -55961,7 +58320,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeOut: function (duration, red, green, blue, callback, context) { @@ -55985,7 +58344,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeFrom: function (duration, red, green, blue, force, callback, context) { @@ -56009,7 +58368,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fade: function (duration, red, green, blue, force, callback, context) { @@ -56033,7 +58392,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ flash: function (duration, red, green, blue, force, callback, context) { @@ -56055,7 +58414,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ shake: function (duration, intensity, force, callback, context) { @@ -56081,13 +58440,37 @@ var Camera = new Class({ * the current camera scroll x coordinate and the current camera scroll y coordinate. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ pan: function (x, y, duration, ease, force, callback, context) { return this.panEffect.start(x, y, duration, ease, force, callback, context); }, + /** + * This effect will rotate the Camera so that the viewport finishes at the given angle in radians, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#rotateTo + * @since 3.23.0 + * + * @param {number} radians - The destination angle in radians to rotate the Camera viewport to. If the angle is positive then the rotation is clockwise else anticlockwise + * @param {boolean} [shortestPath=false] - If shortest path is set to true the camera will rotate in the quickest direction clockwise or anti-clockwise. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the rotation. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the rotation effect to start immediately, even if already running. + * @param {CameraRotateCallback} [callback] - This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera rotation angle in radians. + * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + rotateTo: function (radians, shortestPath, duration, ease, force, callback, context) + { + return this.rotateToEffect.start(radians, shortestPath, duration, ease, force, callback, context); + }, + /** * This effect will zoom the Camera to the given scale, over the duration and with the ease specified. * @@ -56105,7 +58488,7 @@ var Camera = new Class({ * the current camera scroll x coordinate and the current camera scroll y coordinate. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ zoomTo: function (zoom, duration, ease, force, callback, context) { @@ -56338,7 +58721,7 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#stopFollow * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ stopFollow: function () { @@ -56354,10 +58737,11 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#resetFX * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ resetFX: function () { + this.rotateToEffect.reset(); this.panEffect.reset(); this.shakeEffect.reset(); this.flashEffect.reset(); @@ -56380,6 +58764,7 @@ var Camera = new Class({ { if (this.visible) { + this.rotateToEffect.update(time, delta); this.panEffect.update(time, delta); this.zoomEffect.update(time, delta); this.shakeEffect.update(time, delta); @@ -56417,7 +58802,7 @@ module.exports = Camera; /***/ }), -/* 291 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56426,7 +58811,7 @@ module.exports = Camera; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); /** * Converts a hex string into a Phaser Color object. @@ -56470,7 +58855,7 @@ module.exports = HexStringToColor; /***/ }), -/* 292 */ +/* 295 */ /***/ (function(module, exports) { /** @@ -56501,7 +58886,7 @@ module.exports = GetColor32; /***/ }), -/* 293 */ +/* 296 */ /***/ (function(module, exports) { /** @@ -56581,7 +58966,7 @@ module.exports = RGBToHSV; /***/ }), -/* 294 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56590,8 +58975,8 @@ module.exports = RGBToHSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); -var IntegerToRGB = __webpack_require__(295); +var Color = __webpack_require__(31); +var IntegerToRGB = __webpack_require__(298); /** * Converts the given color value into an instance of a Color object. @@ -56614,7 +58999,7 @@ module.exports = IntegerToColor; /***/ }), -/* 295 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -56662,7 +59047,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 296 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56671,7 +59056,7 @@ module.exports = IntegerToRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -56692,7 +59077,7 @@ module.exports = ObjectToColor; /***/ }), -/* 297 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56701,7 +59086,7 @@ module.exports = ObjectToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -56738,7 +59123,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 298 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56753,80 +59138,12 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(656), - Flash: __webpack_require__(657), - Pan: __webpack_require__(658), - Shake: __webpack_require__(691), - Zoom: __webpack_require__(692) - -}; - - -/***/ }), -/* 299 */ -/***/ (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.Back - */ - -module.exports = { - - In: __webpack_require__(659), - Out: __webpack_require__(660), - InOut: __webpack_require__(661) - -}; - - -/***/ }), -/* 300 */ -/***/ (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.Bounce - */ - -module.exports = { - - In: __webpack_require__(662), - Out: __webpack_require__(663), - InOut: __webpack_require__(664) - -}; - - -/***/ }), -/* 301 */ -/***/ (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.Circular - */ - -module.exports = { - - In: __webpack_require__(665), - Out: __webpack_require__(666), - InOut: __webpack_require__(667) + Fade: __webpack_require__(663), + Flash: __webpack_require__(664), + Pan: __webpack_require__(665), + Shake: __webpack_require__(698), + RotateTo: __webpack_require__(699), + Zoom: __webpack_require__(700) }; @@ -56842,14 +59159,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Cubic + * @namespace Phaser.Math.Easing.Back */ module.exports = { - In: __webpack_require__(668), - Out: __webpack_require__(669), - InOut: __webpack_require__(670) + In: __webpack_require__(666), + Out: __webpack_require__(667), + InOut: __webpack_require__(668) }; @@ -56865,14 +59182,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Elastic + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(671), - Out: __webpack_require__(672), - InOut: __webpack_require__(673) + In: __webpack_require__(669), + Out: __webpack_require__(670), + InOut: __webpack_require__(671) }; @@ -56888,14 +59205,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Expo + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(674), - Out: __webpack_require__(675), - InOut: __webpack_require__(676) + In: __webpack_require__(672), + Out: __webpack_require__(673), + InOut: __webpack_require__(674) }; @@ -56911,10 +59228,16 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Linear + * @namespace Phaser.Math.Easing.Cubic */ -module.exports = __webpack_require__(677); +module.exports = { + + In: __webpack_require__(675), + Out: __webpack_require__(676), + InOut: __webpack_require__(677) + +}; /***/ }), @@ -56928,7 +59251,7 @@ module.exports = __webpack_require__(677); */ /** - * @namespace Phaser.Math.Easing.Quadratic + * @namespace Phaser.Math.Easing.Elastic */ module.exports = { @@ -56951,7 +59274,7 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Expo */ module.exports = { @@ -56973,17 +59296,7 @@ module.exports = { * @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) - -}; +module.exports = __webpack_require__(684); /***/ }), @@ -56997,14 +59310,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Quadratic */ module.exports = { - In: __webpack_require__(687), - Out: __webpack_require__(688), - InOut: __webpack_require__(689) + In: __webpack_require__(685), + Out: __webpack_require__(686), + InOut: __webpack_require__(687) }; @@ -57020,16 +59333,85 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Stepped + * @namespace Phaser.Math.Easing.Quartic */ -module.exports = __webpack_require__(690); +module.exports = { + + In: __webpack_require__(688), + Out: __webpack_require__(689), + InOut: __webpack_require__(690) + +}; /***/ }), /* 311 */ /***/ (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__(691), + Out: __webpack_require__(692), + InOut: __webpack_require__(693) + +}; + + +/***/ }), +/* 312 */ +/***/ (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__(694), + Out: __webpack_require__(695), + InOut: __webpack_require__(696) + +}; + + +/***/ }), +/* 313 */ +/***/ (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.Stepped + */ + +module.exports = __webpack_require__(697); + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -57037,15 +59419,15 @@ module.exports = __webpack_require__(690); */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); -var Device = __webpack_require__(312); +var CONST = __webpack_require__(33); +var Device = __webpack_require__(315); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(168); +var PhaserMath = __webpack_require__(170); var NOOP = __webpack_require__(1); -var DefaultPlugins = __webpack_require__(173); -var ValueToColor = __webpack_require__(161); +var DefaultPlugins = __webpack_require__(175); +var ValueToColor = __webpack_require__(164); /** * @classdesc @@ -57512,6 +59894,11 @@ var Config = new Class({ */ this.loaderTimeout = GetValue(config, 'loader.timeout', 0); + /** + * @const {boolean} Phaser.Core.Config#loaderWithCredentials - Optional XHR withCredentials value. + */ + this.loaderWithCredentials = GetValue(config, 'loader.withCredentials', false); + /* * Allows `plugins` property to either be an array, in which case it just replaces * the default plugins like previously, or a config object. @@ -57603,7 +59990,7 @@ module.exports = Config; /***/ }), -/* 312 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57637,20 +60024,20 @@ module.exports = Config; module.exports = { - 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) + os: __webpack_require__(117), + browser: __webpack_require__(118), + features: __webpack_require__(169), + input: __webpack_require__(729), + audio: __webpack_require__(730), + video: __webpack_require__(731), + fullscreen: __webpack_require__(732), + canvasFeatures: __webpack_require__(316) }; /***/ }), -/* 313 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57764,7 +60151,7 @@ module.exports = init(); /***/ }), -/* 314 */ +/* 317 */ /***/ (function(module, exports) { /** @@ -57795,7 +60182,7 @@ module.exports = Between; /***/ }), -/* 315 */ +/* 318 */ /***/ (function(module, exports) { /** @@ -57832,7 +60219,39 @@ module.exports = Normalize; /***/ }), -/* 316 */ +/* 319 */ +/***/ (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; + + +/***/ }), +/* 320 */ /***/ (function(module, exports) { /** @@ -57866,7 +60285,7 @@ module.exports = DistanceSquared; /***/ }), -/* 317 */ +/* 321 */ /***/ (function(module, exports) { /** @@ -57900,7 +60319,7 @@ module.exports = GreaterThan; /***/ }), -/* 318 */ +/* 322 */ /***/ (function(module, exports) { /** @@ -57934,7 +60353,7 @@ module.exports = LessThan; /***/ }), -/* 319 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57943,18 +60362,18 @@ module.exports = LessThan; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(320); +var Factorial = __webpack_require__(324); /** - * [description] + * Calculates the Bernstein basis from the three factorial coefficients. * * @function Phaser.Math.Bernstein * @since 3.0.0 * - * @param {number} n - [description] - * @param {number} i - [description] + * @param {number} n - The first value. + * @param {number} i - The second value. * - * @return {number} [description] + * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i) */ var Bernstein = function (n, i) { @@ -57965,7 +60384,7 @@ module.exports = Bernstein; /***/ }), -/* 320 */ +/* 324 */ /***/ (function(module, exports) { /** @@ -58005,7 +60424,7 @@ module.exports = Factorial; /***/ }), -/* 321 */ +/* 325 */ /***/ (function(module, exports) { /** @@ -58075,7 +60494,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 322 */ +/* 326 */ /***/ (function(module, exports) { /** @@ -58134,7 +60553,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 323 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58143,7 +60562,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(158); +var SmoothStep = __webpack_require__(161); /** * A Smooth Step interpolation method. @@ -58167,7 +60586,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 324 */ +/* 328 */ /***/ (function(module, exports) { /** @@ -58197,7 +60616,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 325 */ +/* 329 */ /***/ (function(module, exports) { /** @@ -58241,36 +60660,7 @@ module.exports = SnapCeil; /***/ }), -/* 326 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. - * - * @function Phaser.Math.FloatBetween - * @since 3.0.0 - * - * @param {number} min - The lower bound for the float, inclusive. - * @param {number} max - The upper bound for the float exclusive. - * - * @return {number} A random float within the given range. - */ -var FloatBetween = function (min, max) -{ - return Math.random() * (max - min) + min; -}; - -module.exports = FloatBetween; - - -/***/ }), -/* 327 */ +/* 330 */ /***/ (function(module, exports) { /** @@ -58305,7 +60695,7 @@ module.exports = Rotate; /***/ }), -/* 328 */ +/* 331 */ /***/ (function(module, exports) { /** @@ -58334,7 +60724,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 329 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58389,7 +60779,7 @@ module.exports = TransformXY; /***/ }), -/* 330 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58934,7 +61324,7 @@ module.exports = Vector4; /***/ }), -/* 331 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59447,12 +61837,12 @@ var Matrix3 = new Class({ }, /** - * [description] + * Set the values of this Matrix3 to be normalized from the given Matrix4. * * @method Phaser.Math.Matrix3#normalFromMat4 * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} m - [description] + * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ @@ -59527,7 +61917,7 @@ module.exports = Matrix3; /***/ }), -/* 332 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60091,12 +62481,12 @@ var Matrix4 = new Class({ }, /** - * [description] + * Multiply the values of this Matrix4 by those given in the `src` argument. * * @method Phaser.Math.Matrix4#multiplyLocal * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} src - [description] + * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -60888,9 +63278,9 @@ var Matrix4 = new Class({ * @method Phaser.Math.Matrix4#yawPitchRoll * @since 3.0.0 * - * @param {number} yaw - [description] - * @param {number} pitch - [description] - * @param {number} roll - [description] + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -60989,7 +63379,7 @@ module.exports = Matrix4; /***/ }), -/* 333 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61002,8 +63392,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(172); -var Matrix3 = __webpack_require__(331); +var Vector3 = __webpack_require__(174); +var Matrix3 = __webpack_require__(334); var EPSILON = 0.000001; @@ -61311,13 +63701,13 @@ var Quaternion = new Class({ }, /** - * [description] + * Rotates this Quaternion based on the two given vectors. * * @method Phaser.Math.Quaternion#rotationTo * @since 3.0.0 * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] + * @param {Phaser.Math.Vector3} a - The transform rotation vector. + * @param {Phaser.Math.Vector3} b - The target rotation vector. * * @return {Phaser.Math.Quaternion} This Quaternion. */ @@ -61761,7 +64151,7 @@ module.exports = Quaternion; /***/ }), -/* 334 */ +/* 337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61770,10 +64160,10 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(335); +var CanvasInterpolation = __webpack_require__(338); var CanvasPool = __webpack_require__(26); -var CONST = __webpack_require__(29); -var Features = __webpack_require__(167); +var CONST = __webpack_require__(33); +var Features = __webpack_require__(169); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -61863,8 +64253,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(499); - WebGLRenderer = __webpack_require__(502); + CanvasRenderer = __webpack_require__(504); + WebGLRenderer = __webpack_require__(507); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -61889,7 +64279,7 @@ module.exports = CreateRenderer; /***/ }), -/* 335 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -61952,7 +64342,86 @@ module.exports = CanvasInterpolation; /***/ }), -/* 336 */ +/* 339 */ +/***/ (function(module, exports) { + +module.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'); + + +/***/ }), +/* 340 */ +/***/ (function(module, exports) { + +module.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'); + + +/***/ }), +/* 341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61961,7 +64430,7 @@ module.exports = CanvasInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(29); +var CONST = __webpack_require__(33); /** * Called automatically by Phaser.Game and responsible for creating the console.log debug header. @@ -62082,7 +64551,7 @@ module.exports = DebugHeader; /***/ }), -/* 337 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62094,7 +64563,7 @@ module.exports = DebugHeader; var Class = __webpack_require__(0); var GetValue = __webpack_require__(6); var NOOP = __webpack_require__(1); -var RequestAnimationFrame = __webpack_require__(338); +var RequestAnimationFrame = __webpack_require__(343); // http://www.testufo.com/#test=animation-time-graph @@ -62812,7 +65281,7 @@ module.exports = TimeStep; /***/ }), -/* 338 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63026,7 +65495,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 339 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63035,7 +65504,7 @@ module.exports = RequestAnimationFrame; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(18); +var Events = __webpack_require__(20); /** * The Visibility Handler is responsible for listening out for document level visibility change events. @@ -63117,7 +65586,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 340 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63126,19 +65595,47 @@ module.exports = VisibilityHandler; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(341); +var Arne16 = __webpack_require__(346); var CanvasPool = __webpack_require__(26); var GetValue = __webpack_require__(6); /** - * [description] + * Generates a texture based on the given Create configuration object. + * + * The texture is drawn using a fixed-size indexed palette of 16 colors, where the hex value in the + * data cells map to a single color. For example, if the texture config looked like this: + * + * ```javascript + * var star = [ + * '.....828.....', + * '....72227....', + * '....82228....', + * '...7222227...', + * '2222222222222', + * '8222222222228', + * '.72222222227.', + * '..787777787..', + * '..877777778..', + * '.78778887787.', + * '.27887.78872.', + * '.787.....787.' + * ]; + * + * this.textures.generate('star', { data: star, pixelWidth: 4 }); + * ``` + * + * Then it would generate a texture that is 52 x 48 pixels in size, because each cell of the data array + * represents 1 pixel multiplied by the `pixelWidth` value. The cell values, such as `8`, maps to color + * number 8 in the palette. If a cell contains a period character `.` then it is transparent. + * + * The default palette is Arne16, but you can specify your own using the `palette` property. * * @function Phaser.Create.GenerateTexture * @since 3.0.0 * - * @param {Phaser.Types.Create.GenerateTextureConfig} config - [description] + * @param {Phaser.Types.Create.GenerateTextureConfig} config - The Generate Texture Configuration object. * - * @return {HTMLCanvasElement} [description] + * @return {HTMLCanvasElement} An HTMLCanvasElement which contains the generated texture drawn to it. */ var GenerateTexture = function (config) { @@ -63211,7 +65708,7 @@ module.exports = GenerateTexture; /***/ }), -/* 341 */ +/* 346 */ /***/ (function(module, exports) { /** @@ -63249,7 +65746,7 @@ module.exports = { /***/ }), -/* 342 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63261,8 +65758,8 @@ module.exports = { // 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__(321); -var Curve = __webpack_require__(80); +var CubicBezier = __webpack_require__(325); +var Curve = __webpack_require__(81); var Vector2 = __webpack_require__(3); /** @@ -63476,7 +65973,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 343 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63488,10 +65985,10 @@ module.exports = CubicBezierCurve; // 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__(80); +var Curve = __webpack_require__(81); var DegToRad = __webpack_require__(35); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(171); +var RadToDeg = __webpack_require__(173); var Vector2 = __webpack_require__(3); /** @@ -63641,14 +66138,14 @@ var EllipseCurve = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.Ellipse#getResolution * @since 3.0.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -63739,7 +66236,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The horizontal radius of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setXRadius: function (value) { @@ -63756,7 +66253,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The vertical radius of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setYRadius: function (value) { @@ -63773,7 +66270,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The width of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setWidth: function (value) { @@ -63790,7 +66287,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The height of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setHeight: function (value) { @@ -63807,7 +66304,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The start angle of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setStartAngle: function (value) { @@ -63824,7 +66321,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The end angle of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setEndAngle: function (value) { @@ -63841,7 +66338,7 @@ var EllipseCurve = new Class({ * * @param {boolean} value - The clockwise state of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setClockwise: function (value) { @@ -63858,7 +66355,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The rotation of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setRotation: function (value) { @@ -64100,7 +66597,7 @@ module.exports = EllipseCurve; /***/ }), -/* 344 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64112,8 +66609,8 @@ module.exports = EllipseCurve; // 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__(80); -var FromPoints = __webpack_require__(174); +var Curve = __webpack_require__(81); +var FromPoints = __webpack_require__(176); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -64299,19 +66796,17 @@ var LineCurve = new Class({ return tangent.normalize(); }, - // Override default Curve.getUtoTmapping - /** - * [description] + * Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant. * * @method Phaser.Curves.Line#getUtoTmapping * @since 3.0.0 * - * @param {number} u - [description] - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {number} u - A float between 0 and 1. + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The equidistant value. */ getUtoTmapping: function (u, distance, divisions) { @@ -64405,7 +66900,7 @@ module.exports = LineCurve; /***/ }), -/* 345 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64415,13 +66910,13 @@ module.exports = LineCurve; */ var Class = __webpack_require__(0); -var Curve = __webpack_require__(80); -var QuadraticBezierInterpolation = __webpack_require__(322); +var Curve = __webpack_require__(81); +var QuadraticBezierInterpolation = __webpack_require__(326); var Vector2 = __webpack_require__(3); /** * @classdesc - * [description] + * A quadratic Bézier curve constructed from two control points. * * @class QuadraticBezier * @extends Phaser.Curves.Curve @@ -64451,7 +66946,7 @@ var QuadraticBezier = new Class({ } /** - * [description] + * The start point. * * @name Phaser.Curves.QuadraticBezier#p0 * @type {Phaser.Math.Vector2} @@ -64460,7 +66955,7 @@ var QuadraticBezier = new Class({ this.p0 = p0; /** - * [description] + * The first control point. * * @name Phaser.Curves.QuadraticBezier#p1 * @type {Phaser.Math.Vector2} @@ -64469,7 +66964,7 @@ var QuadraticBezier = new Class({ this.p1 = p1; /** - * [description] + * The second control point. * * @name Phaser.Curves.QuadraticBezier#p2 * @type {Phaser.Math.Vector2} @@ -64498,14 +66993,14 @@ var QuadraticBezier = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.QuadraticBezier#getResolution * @since 3.2.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -64540,7 +67035,10 @@ var QuadraticBezier = new Class({ }, /** - * [description] + * Draws this curve on the given Graphics object. + * + * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is. + * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it. * * @method Phaser.Curves.QuadraticBezier#draw * @since 3.2.0 @@ -64619,7 +67117,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 346 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64630,9 +67128,9 @@ module.exports = QuadraticBezier; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(169); +var CatmullRom = __webpack_require__(171); var Class = __webpack_require__(0); -var Curve = __webpack_require__(80); +var Curve = __webpack_require__(81); var Vector2 = __webpack_require__(3); /** @@ -64680,7 +67178,7 @@ var SplineCurve = new Class({ * * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - The points that configure the curve. * - * @return {Phaser.Curves.Spline} This curve object. + * @return {this} This curve object. */ addPoints: function (points) { @@ -64752,14 +67250,14 @@ var SplineCurve = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.Spline#getResolution * @since 3.0.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -64844,7 +67342,7 @@ module.exports = SplineCurve; /***/ }), -/* 347 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64968,7 +67466,7 @@ module.exports = BaseShader; /***/ }), -/* 348 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64977,32 +67475,32 @@ module.exports = BaseShader; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); -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); +Color.ColorToRGBA = __webpack_require__(809); +Color.ComponentToHex = __webpack_require__(354); +Color.GetColor = __webpack_require__(165); +Color.GetColor32 = __webpack_require__(295); +Color.HexStringToColor = __webpack_require__(294); +Color.HSLToColor = __webpack_require__(810); +Color.HSVColorWheel = __webpack_require__(811); +Color.HSVToRGB = __webpack_require__(166); +Color.HueToComponent = __webpack_require__(355); +Color.IntegerToColor = __webpack_require__(297); +Color.IntegerToRGB = __webpack_require__(298); +Color.Interpolate = __webpack_require__(812); +Color.ObjectToColor = __webpack_require__(299); +Color.RandomRGB = __webpack_require__(813); +Color.RGBStringToColor = __webpack_require__(300); +Color.RGBToHSV = __webpack_require__(296); +Color.RGBToString = __webpack_require__(814); +Color.ValueToColor = __webpack_require__(164); module.exports = Color; /***/ }), -/* 349 */ +/* 354 */ /***/ (function(module, exports) { /** @@ -65032,7 +67530,7 @@ module.exports = ComponentToHex; /***/ }), -/* 350 */ +/* 355 */ /***/ (function(module, exports) { /** @@ -65088,7 +67586,7 @@ module.exports = HueToComponent; /***/ }), -/* 351 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65097,7 +67595,7 @@ module.exports = HueToComponent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(116); +var OS = __webpack_require__(117); /** * @callback ContentLoadedCallback @@ -65151,7 +67649,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 352 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65160,7 +67658,7 @@ module.exports = DOMContentLoaded; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(175); +var CONST = __webpack_require__(177); /** * Attempts to determine the screen orientation using the Orientation API. @@ -65217,7 +67715,7 @@ module.exports = GetScreenOrientation; /***/ }), -/* 353 */ +/* 358 */ /***/ (function(module, exports) { /** @@ -65303,7 +67801,7 @@ module.exports = { /***/ }), -/* 354 */ +/* 359 */ /***/ (function(module, exports) { /** @@ -65356,7 +67854,7 @@ module.exports = { /***/ }), -/* 355 */ +/* 360 */ /***/ (function(module, exports) { /** @@ -65454,7 +67952,7 @@ module.exports = { /***/ }), -/* 356 */ +/* 361 */ /***/ (function(module, exports) { /** @@ -65528,7 +68026,7 @@ module.exports = { /***/ }), -/* 357 */ +/* 362 */ /***/ (function(module, exports) { /** @@ -65579,7 +68077,7 @@ module.exports = GetTarget; /***/ }), -/* 358 */ +/* 363 */ /***/ (function(module, exports) { /** @@ -65636,7 +68134,7 @@ module.exports = ParseXML; /***/ }), -/* 359 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65646,16 +68144,16 @@ module.exports = ParseXML; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(177); -var EventEmitter = __webpack_require__(9); +var CONST = __webpack_require__(179); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(54); -var GameEvents = __webpack_require__(18); -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__(329); +var GameEvents = __webpack_require__(20); +var Keyboard = __webpack_require__(365); +var Mouse = __webpack_require__(366); +var Pointer = __webpack_require__(367); +var Touch = __webpack_require__(368); +var TransformMatrix = __webpack_require__(29); +var TransformXY = __webpack_require__(332); /** * @classdesc @@ -66718,7 +69216,7 @@ module.exports = InputManager; /***/ }), -/* 360 */ +/* 365 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66727,11 +69225,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(121); +var ArrayRemove = __webpack_require__(123); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); var InputEvents = __webpack_require__(54); -var KeyCodes = __webpack_require__(122); +var KeyCodes = __webpack_require__(124); var NOOP = __webpack_require__(0); /** @@ -67168,7 +69666,7 @@ module.exports = KeyboardManager; /***/ }), -/* 361 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67178,7 +69676,7 @@ module.exports = KeyboardManager; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(167); +var Features = __webpack_require__(169); var InputEvents = __webpack_require__(54); var NOOP = __webpack_require__(0); @@ -67404,7 +69902,7 @@ var MouseManager = new Class({ * @method Phaser.Input.Mouse.MouseManager#disableContextMenu * @since 3.0.0 * - * @return {Phaser.Input.Mouse.MouseManager} This Mouse Manager instance. + * @return {this} This Mouse Manager instance. */ disableContextMenu: function () { @@ -67654,7 +70152,7 @@ module.exports = MouseManager; /***/ }), -/* 362 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67663,11 +70161,11 @@ module.exports = MouseManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(314); +var Angle = __webpack_require__(317); var Class = __webpack_require__(0); var Distance = __webpack_require__(53); -var FuzzyEqual = __webpack_require__(144); -var SmoothStepInterpolation = __webpack_require__(323); +var FuzzyEqual = __webpack_require__(106); +var SmoothStepInterpolation = __webpack_require__(327); var Vector2 = __webpack_require__(3); /** @@ -68932,7 +71430,7 @@ module.exports = Pointer; /***/ }), -/* 363 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69144,7 +71642,7 @@ var TouchManager = new Class({ * @method Phaser.Input.Touch.TouchManager#disableContextMenu * @since 3.20.0 * - * @return {Phaser.Input.Touch.TouchManager} This Touch Manager instance. + * @return {this} This Touch Manager instance. */ disableContextMenu: function () { @@ -69345,7 +71843,7 @@ module.exports = TouchManager; /***/ }), -/* 364 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69355,14 +71853,14 @@ module.exports = TouchManager; */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(18); -var EventEmitter = __webpack_require__(9); +var GameEvents = __webpack_require__(20); +var EventEmitter = __webpack_require__(10); var FileTypesManager = __webpack_require__(8); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var Remove = __webpack_require__(121); +var Remove = __webpack_require__(123); /** * @classdesc @@ -69970,7 +72468,7 @@ var PluginManager = new Class({ * * @param {string} key - The key of the plugin to stop. * - * @return {Phaser.Plugins.PluginManager} The Plugin Manager. + * @return {this} The Plugin Manager. */ stop: function (key) { @@ -70247,7 +72745,7 @@ module.exports = PluginManager; /***/ }), -/* 365 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70256,17 +72754,17 @@ module.exports = PluginManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(175); +var CONST = __webpack_require__(177); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(92); -var GameEvents = __webpack_require__(18); -var GetInnerHeight = __webpack_require__(860); -var GetTarget = __webpack_require__(357); -var GetScreenOrientation = __webpack_require__(352); +var GameEvents = __webpack_require__(20); +var GetInnerHeight = __webpack_require__(867); +var GetTarget = __webpack_require__(362); +var GetScreenOrientation = __webpack_require__(357); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(11); -var Size = __webpack_require__(366); +var Size = __webpack_require__(371); var SnapFloor = __webpack_require__(93); var Vector2 = __webpack_require__(3); @@ -70949,7 +73447,7 @@ var ScaleManager = new Class({ if (lock) { - return lock(orientation); + return lock.call(screen, orientation); } return false; @@ -71020,8 +73518,8 @@ var ScaleManager = new Class({ } // The size used for the canvas style, factoring in the scale mode and parent and zoom value - // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change) - this.displaySize.setSize(width, height); + // Update the aspect ratio + this.displaySize.setAspectRatio(width / height); this.canvas.width = this.baseSize.width; this.canvas.height = this.baseSize.height; @@ -71964,7 +74462,7 @@ module.exports = ScaleManager; /***/ }), -/* 366 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71973,7 +74471,7 @@ module.exports = ScaleManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); var SnapFloor = __webpack_require__(93); var Vector2 = __webpack_require__(3); @@ -72742,7 +75240,7 @@ module.exports = Size; /***/ }), -/* 367 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72752,14 +75250,14 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(123); -var Events = __webpack_require__(19); -var GameEvents = __webpack_require__(18); +var CONST = __webpack_require__(125); +var Events = __webpack_require__(22); +var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); -var LoaderEvents = __webpack_require__(81); +var LoaderEvents = __webpack_require__(82); var NOOP = __webpack_require__(1); -var Scene = __webpack_require__(368); -var Systems = __webpack_require__(178); +var Scene = __webpack_require__(373); +var Systems = __webpack_require__(180); /** * @classdesc @@ -73199,6 +75697,8 @@ var SceneManager = new Class({ var sys = scene.sys; var settings = sys.settings; + sys.sceneUpdate = NOOP; + if (scene.init) { scene.init.call(scene, settings.data); @@ -74382,7 +76882,7 @@ module.exports = SceneManager; /***/ }), -/* 368 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74392,7 +76892,7 @@ module.exports = SceneManager; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(178); +var Systems = __webpack_require__(180); /** * @classdesc @@ -74612,16 +77112,6 @@ var Scene = new Class({ */ this.physics; - /** - * 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. - * - * @name Phaser.Scene#impact - * @type {Phaser.Physics.Impact.ImpactPhysics} - * @since 3.0.0 - */ - this.impact; - /** * 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. @@ -74678,7 +77168,7 @@ module.exports = Scene; /***/ }), -/* 369 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74687,10 +77177,10 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(123); +var CONST = __webpack_require__(125); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(107); -var InjectionMap = __webpack_require__(873); +var Merge = __webpack_require__(126); +var InjectionMap = __webpack_require__(880); /** * @namespace Phaser.Scenes.Settings @@ -74774,7 +77264,7 @@ module.exports = Settings; /***/ }), -/* 370 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74784,17 +77274,17 @@ module.exports = Settings; */ var CanvasPool = __webpack_require__(26); -var CanvasTexture = __webpack_require__(371); +var CanvasTexture = __webpack_require__(376); var Class = __webpack_require__(0); -var Color = __webpack_require__(33); -var CONST = __webpack_require__(29); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(119); -var GameEvents = __webpack_require__(18); -var GenerateTexture = __webpack_require__(340); +var Color = __webpack_require__(31); +var CONST = __webpack_require__(33); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(121); +var GameEvents = __webpack_require__(20); +var GenerateTexture = __webpack_require__(345); var GetValue = __webpack_require__(6); -var Parser = __webpack_require__(373); -var Texture = __webpack_require__(180); +var Parser = __webpack_require__(378); +var Texture = __webpack_require__(182); /** * @callback EachTextureCallback @@ -75078,8 +77568,8 @@ var TextureManager = new Class({ * * @param {string} key - The unique string-based key of the Texture. * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture. - * @param {string} [type='image/png'] - [description] - * @param {number} [encoderOptions=0.92] - [description] + * @param {string} [type='image/png'] - A DOMString indicating the image format. The default format type is image/png. + * @param {number} [encoderOptions=0.92] - A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. If this argument is anything else, the default value for image quality is used. The default value is 0.92. Other arguments are ignored. * * @return {string} The base64 encoded data, or an empty string if the texture frame could not be found. */ @@ -75222,14 +77712,44 @@ var TextureManager = new Class({ /** * Creates a new Texture using the given config values. + * * Generated textures consist of a Canvas element to which the texture data is drawn. - * See the Phaser.Create function for the more direct way to create textures. + * + * Generates a texture based on the given Create configuration object. + * + * The texture is drawn using a fixed-size indexed palette of 16 colors, where the hex value in the + * data cells map to a single color. For example, if the texture config looked like this: + * + * ```javascript + * var star = [ + * '.....828.....', + * '....72227....', + * '....82228....', + * '...7222227...', + * '2222222222222', + * '8222222222228', + * '.72222222227.', + * '..787777787..', + * '..877777778..', + * '.78778887787.', + * '.27887.78872.', + * '.787.....787.' + * ]; + * + * this.textures.generate('star', { data: star, pixelWidth: 4 }); + * ``` + * + * Then it would generate a texture that is 52 x 48 pixels in size, because each cell of the data array + * represents 1 pixel multiplied by the `pixelWidth` value. The cell values, such as `8`, maps to color + * number 8 in the palette. If a cell contains a period character `.` then it is transparent. + * + * The default palette is Arne16, but you can specify your own using the `palette` property. * * @method Phaser.Textures.TextureManager#generate * @since 3.0.0 * * @param {string} key - The unique string-based key of the Texture. - * @param {object} config - The configuration object needed to generate the texture. + * @param {Phaser.Types.Create.GenerateTextureConfig} config - The configuration object needed to generate the texture. * * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use. */ @@ -75946,7 +78466,7 @@ module.exports = TextureManager; /***/ }), -/* 371 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75956,11 +78476,11 @@ module.exports = TextureManager; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(22); -var Color = __webpack_require__(33); -var CONST = __webpack_require__(29); -var IsSizePowerOfTwo = __webpack_require__(118); -var Texture = __webpack_require__(180); +var Clamp = __webpack_require__(19); +var Color = __webpack_require__(31); +var CONST = __webpack_require__(33); +var IsSizePowerOfTwo = __webpack_require__(120); +var Texture = __webpack_require__(182); /** * @classdesc @@ -76379,7 +78899,7 @@ var CanvasTexture = new Class({ * @param {integer} [width] - The width of the region to get. Must be an integer. Defaults to the canvas width if not given. * @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`. * - * @return {Phaser.Types.Textures.PixelConfig[]} An array of Pixel objects. + * @return {Phaser.Types.Textures.PixelConfig[][]} A 2d array of Pixel objects. */ getPixels: function (x, y, width, height) { @@ -76546,6 +79066,10 @@ var CanvasTexture = new Class({ // Update the Frame this.frames['__BASE'].setSize(width, height, 0, 0); + // Update this + this.width = width; + this.height = height; + this.refresh(); } @@ -76577,7 +79101,7 @@ module.exports = CanvasTexture; /***/ }), -/* 372 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76588,8 +79112,8 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(118); -var ScaleModes = __webpack_require__(231); +var IsSizePowerOfTwo = __webpack_require__(120); +var ScaleModes = __webpack_require__(234); /** * @classdesc @@ -76918,7 +79442,7 @@ module.exports = TextureSource; /***/ }), -/* 373 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76933,20 +79457,20 @@ module.exports = TextureSource; module.exports = { - 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) + AtlasXML: __webpack_require__(881), + Canvas: __webpack_require__(882), + Image: __webpack_require__(883), + JSONArray: __webpack_require__(884), + JSONHash: __webpack_require__(885), + SpriteSheet: __webpack_require__(886), + SpriteSheetFromAtlas: __webpack_require__(887), + UnityYAML: __webpack_require__(888) }; /***/ }), -/* 374 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76956,9 +79480,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(375); -var NoAudioSoundManager = __webpack_require__(377); -var WebAudioSoundManager = __webpack_require__(379); +var HTML5AudioSoundManager = __webpack_require__(380); +var NoAudioSoundManager = __webpack_require__(384); +var WebAudioSoundManager = __webpack_require__(386); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -76998,7 +79522,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 375 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77008,23 +79532,27 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(124); +var BaseSoundManager = __webpack_require__(127); var Class = __webpack_require__(0); var Events = __webpack_require__(59); -var HTML5AudioSound = __webpack_require__(376); +var HTML5AudioSound = __webpack_require__(383); /** * HTML5 Audio implementation of the Sound Manager. - * - * Note: To play multiple instances of the same HTML5 Audio sound, you need to provide an `instances` value when + * + * To play multiple instances of the same HTML5 Audio sound, you need to provide an `instances` value when * loading the sound with the Loader: - * + * * ```javascript * this.load.audio('explosion', 'explosion.mp3', { * instances: 2 * }); * ``` * + * Not all browsers can play all audio formats. + * + * There is a good guide to what's supported: [Cross-browser audio basics: Audio codec support](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). + * * @class HTML5AudioSoundManager * @extends Phaser.Sound.BaseSoundManager * @memberof Phaser.Sound @@ -77463,7 +79991,128 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 376 */ +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(68); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), +/* 382 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(68); + +/** + * Returns the first element in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. + * + * @function Phaser.Utils.Array.GetFirst + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) + * + * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. + */ +var GetFirst = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + return child; + } + } + } + + return null; +}; + +module.exports = GetFirst; + + +/***/ }), +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77473,9 +80122,10 @@ module.exports = HTML5AudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(125); +var BaseSound = __webpack_require__(128); var Class = __webpack_require__(0); var Events = __webpack_require__(59); +var Clamp = __webpack_require__(19); /** * @classdesc @@ -78020,7 +80670,7 @@ var HTML5AudioSound = new Class({ { if (this.audio) { - this.audio.volume = this.currentConfig.volume * this.manager.volume; + this.audio.volume = Clamp(this.currentConfig.volume * this.manager.volume, 0, 1); } }, @@ -78388,7 +81038,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 377 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78398,18 +81048,18 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(124); +var BaseSoundManager = __webpack_require__(127); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var NoAudioSound = __webpack_require__(378); +var EventEmitter = __webpack_require__(10); +var NoAudioSound = __webpack_require__(385); var NOOP = __webpack_require__(1); /** * @classdesc - * No audio implementation of the sound manager. It is used if audio has been + * No-audio implementation of the Sound Manager. It is used if audio has been * disabled in the game config or the device doesn't support any audio. * - * It represents a graceful degradation of sound manager logic that provides + * It represents a graceful degradation of Sound Manager logic that provides * minimal functionality and prevents Phaser projects that use audio from * breaking on devices that don't support any audio playback technologies. * @@ -78506,7 +81156,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 378 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78516,10 +81166,25 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(125); +var BaseSound = __webpack_require__(128); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var EventEmitter = __webpack_require__(10); +var Extend = __webpack_require__(18); + +var returnFalse = function () +{ + return false; +}; + +var returnNull = function () +{ + return null; +}; + +var returnThis = function () +{ + return this; +}; /** * @classdesc @@ -78531,7 +81196,6 @@ var Extend = __webpack_require__(17); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSound - * @extends Phaser.Sound.BaseSound * @memberof Phaser.Sound * @constructor * @since 3.0.0 @@ -78582,58 +81246,108 @@ var NoAudioSound = new Class({ this.pendingRemove = false; }, + /** + * @method Phaser.Sound.NoAudioSound#addMarker + * @since 3.0.0 + * + * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object. + * + * @return {boolean} false + */ // eslint-disable-next-line no-unused-vars - addMarker: function (marker) - { - return false; - }, + addMarker: returnFalse, + /** + * @method Phaser.Sound.NoAudioSound#updateMarker + * @since 3.0.0 + * + * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object with updated values. + * + * @return {boolean} false + */ // eslint-disable-next-line no-unused-vars - updateMarker: function (marker) - { - return false; - }, + updateMarker: returnFalse, - // eslint-disable-next-line no-unused-vars - removeMarker: function (markerName) - { - return null; - }, + /** + * @method Phaser.Sound.NoAudioSound#removeMarker + * @since 3.0.0 + * + * @param {string} markerName - The name of the marker to remove. + * + * @return {null} null + */ + removeMarker: returnNull, - // eslint-disable-next-line no-unused-vars - play: function (markerName, config) - { - return false; - }, + /** + * @method Phaser.Sound.NoAudioSound#play + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Sound.SoundConfig)} [markerName=''] - If you want to play a marker then provide the marker name here. Alternatively, this parameter can be a SoundConfig object. + * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * + * @return {boolean} false + */ + play: returnFalse, - pause: function () - { - return false; - }, + /** + * @method Phaser.Sound.NoAudioSound#pause + * @since 3.0.0 + * + * @return {boolean} false + */ + pause: returnFalse, - resume: function () - { - return false; - }, + /** + * Resumes the sound. + * + * @method Phaser.Sound.NoAudioSound#resume + * @since 3.0.0 + * + * @return {boolean} false + */ + resume: returnFalse, - stop: function () - { - return false; - }, + /** + * Stop playing this sound. + * + * @method Phaser.Sound.NoAudioSound#stop + * @since 3.0.0 + * + * @return {boolean} false + */ + stop: returnFalse, + /** + * Destroys this sound and all associated events and marks it for removal from the sound manager. + * + * @method Phaser.Sound.NoAudioSound#destroy + * @fires Phaser.Sound.Events#DESTROY + * @since 3.0.0 + */ destroy: function () { - this.manager.remove(this); - BaseSound.prototype.destroy.call(this); - } + }, + + setMute: returnThis, + + setVolume: returnThis, + + setRate: returnThis, + + setDetune: returnThis, + + setSeek: returnThis, + + setLoop: returnThis + }); module.exports = NoAudioSound; /***/ }), -/* 379 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78643,15 +81357,19 @@ module.exports = NoAudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(380); -var BaseSoundManager = __webpack_require__(124); +var Base64ToArrayBuffer = __webpack_require__(387); +var BaseSoundManager = __webpack_require__(127); var Class = __webpack_require__(0); var Events = __webpack_require__(59); -var WebAudioSound = __webpack_require__(381); +var WebAudioSound = __webpack_require__(388); /** * @classdesc - * Web Audio API implementation of the sound manager. + * Web Audio API implementation of the Sound Manager. + * + * Not all browsers can play all audio formats. + * + * There is a good guide to what's supported: [Cross-browser audio basics: Audio codec support](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). * * @class WebAudioSoundManager * @extends Phaser.Sound.BaseSoundManager @@ -78755,7 +81473,7 @@ var WebAudioSoundManager = new Class({ /** * This method takes a new AudioContext reference and then sets * this Sound Manager to use that context for all playback. - * + * * As part of this call it also disconnects the master mute and volume * nodes and then re-creates them on the new given context. * @@ -78818,16 +81536,16 @@ var WebAudioSoundManager = new Class({ /** * Decode audio data into a format ready for playback via Web Audio. - * + * * The audio data can be a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance. - * + * * The `audioKey` is the key that will be used to save the decoded audio to the audio cache. - * + * * Instead of passing a single entry you can instead pass an array of `Phaser.Types.Sound.DecodeAudioConfig` * objects as the first and only argument. - * + * * Decoding is an async process, so be sure to listen for the events to know when decoding has completed. - * + * * Once the audio has decoded it can be added to the Sound Manager or played via its key. * * @method Phaser.Sound.WebAudioSoundManager#decodeAudio @@ -78869,7 +81587,7 @@ var WebAudioSoundManager = new Class({ var success = function (key, audioBuffer) { cache.add(key, audioBuffer); - + this.emit(Events.DECODED, key); remaining--; @@ -78879,7 +81597,7 @@ var WebAudioSoundManager = new Class({ this.emit(Events.DECODED_ALL); } }.bind(this, key); - + var failure = function (key, error) { // eslint-disable-next-line no-console @@ -78921,7 +81639,7 @@ var WebAudioSoundManager = new Class({ body.removeEventListener('touchend', unlockHandler); body.removeEventListener('click', unlockHandler); body.removeEventListener('keydown', unlockHandler); - + _this.unlocked = true; }, function () { @@ -79092,7 +81810,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 380 */ +/* 387 */ /***/ (function(module, exports) { /** @@ -79167,7 +81885,7 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 381 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79177,7 +81895,7 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(125); +var BaseSound = __webpack_require__(128); var Class = __webpack_require__(0); var Events = __webpack_require__(59); @@ -80073,7 +82791,7 @@ module.exports = WebAudioSound; /***/ }), -/* 382 */ +/* 389 */ /***/ (function(module, exports) { /** @@ -80121,7 +82839,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 383 */ +/* 390 */ /***/ (function(module, exports) { /** @@ -80243,7 +82961,7 @@ module.exports = QuickSelect; /***/ }), -/* 384 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80381,7 +83099,7 @@ module.exports = Range; /***/ }), -/* 385 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80390,7 +83108,7 @@ module.exports = Range; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Adds an Animation component to a Sprite and populates it based on the given config. @@ -80470,7 +83188,7 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 386 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80512,7 +83230,7 @@ module.exports = Union; /***/ }), -/* 387 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80523,12 +83241,12 @@ module.exports = Union; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(950); -var GameObject = __webpack_require__(14); +var DOMElementRender = __webpack_require__(955); +var GameObject = __webpack_require__(13); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(176); -var SCENE_EVENTS = __webpack_require__(19); -var Vector4 = __webpack_require__(330); +var RemoveFromDOM = __webpack_require__(178); +var SCENE_EVENTS = __webpack_require__(22); +var Vector4 = __webpack_require__(333); /** * @classdesc @@ -81486,7 +84204,7 @@ module.exports = DOMElement; /***/ }), -/* 388 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81495,8 +84213,8 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(951); -var GameObject = __webpack_require__(14); +var CSSBlendModes = __webpack_require__(956); +var GameObject = __webpack_require__(13); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -81608,7 +84326,7 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 389 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81619,8 +84337,8 @@ module.exports = DOMElementCSSRenderer; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(955); +var GameObject = __webpack_require__(13); +var ExternRender = __webpack_require__(960); /** * @classdesc @@ -81704,7 +84422,7 @@ module.exports = Extern; /***/ }), -/* 390 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81713,9 +84431,9 @@ module.exports = Extern; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(191); +var CircumferencePoint = __webpack_require__(193); var FromPercent = __webpack_require__(87); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Point = __webpack_require__(4); /** @@ -81747,7 +84465,7 @@ module.exports = GetPoint; /***/ }), -/* 391 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81756,10 +84474,10 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(392); -var CircumferencePoint = __webpack_require__(191); +var Circumference = __webpack_require__(399); +var CircumferencePoint = __webpack_require__(193); var FromPercent = __webpack_require__(87); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse, @@ -81782,7 +84500,7 @@ var GetPoints = function (ellipse, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Circumference(ellipse) / stepRate; } @@ -81801,7 +84519,7 @@ module.exports = GetPoints; /***/ }), -/* 392 */ +/* 399 */ /***/ (function(module, exports) { /** @@ -81833,7 +84551,7 @@ module.exports = Circumference; /***/ }), -/* 393 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81842,8 +84560,8 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(190); -var SetTransform = __webpack_require__(27); +var Commands = __webpack_require__(192); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -82083,7 +84801,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 394 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82302,7 +85020,7 @@ module.exports = GravityWell; /***/ }), -/* 395 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82871,7 +85589,7 @@ module.exports = Particle; /***/ }), -/* 396 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82883,17 +85601,17 @@ module.exports = Particle; var BlendModes = __webpack_require__(52); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(397); -var EdgeZone = __webpack_require__(398); -var EmitterOp = __webpack_require__(967); +var DeathZone = __webpack_require__(404); +var EdgeZone = __webpack_require__(405); +var EmitterOp = __webpack_require__(972); var GetFastValue = __webpack_require__(2); -var GetRandom = __webpack_require__(183); -var HasAny = __webpack_require__(399); -var HasValue = __webpack_require__(99); -var Particle = __webpack_require__(395); -var RandomZone = __webpack_require__(400); +var GetRandom = __webpack_require__(185); +var HasAny = __webpack_require__(406); +var HasValue = __webpack_require__(108); +var Particle = __webpack_require__(402); +var RandomZone = __webpack_require__(407); var Rectangle = __webpack_require__(11); -var StableSort = __webpack_require__(128); +var StableSort = __webpack_require__(131); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(58); @@ -83646,7 +86364,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ fromJSON: function (config) { @@ -83803,7 +86521,7 @@ var ParticleEmitter = new Class({ * @param {number} [offsetY=0] - Vertical offset of the particle origin from the Game Object. * @param {boolean} [trackVisible=false] - Whether the emitter's visible state will track the target's visible state. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ startFollow: function (target, offsetX, offsetY, trackVisible) { @@ -83824,7 +86542,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#stopFollow * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ stopFollow: function () { @@ -83885,7 +86603,7 @@ var ParticleEmitter = new Class({ * @param {boolean} [pickRandom=true] - Whether frames should be assigned at random from `frames`. * @param {integer} [quantity=1] - The number of consecutive particles that will receive each frame. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setFrame: function (frames, pickRandom, quantity) { @@ -83940,7 +86658,7 @@ var ParticleEmitter = new Class({ * * @param {boolean} [value=true] - Radial mode (true) or point mode (true). * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setRadial: function (value) { @@ -83961,7 +86679,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setPosition: function (x, y) { @@ -83984,7 +86702,7 @@ var ParticleEmitter = new Class({ * @param {number} width - The width of the boundary. * @param {number} height - The height of the boundary. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setBounds: function (x, y, width, height) { @@ -84019,7 +86737,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeedX: function (value) { @@ -84040,7 +86758,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeedY: function (value) { @@ -84064,7 +86782,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeed: function (value) { @@ -84085,7 +86803,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScaleX: function (value) { @@ -84102,7 +86820,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScaleY: function (value) { @@ -84119,7 +86837,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScale: function (value) { @@ -84137,7 +86855,7 @@ var ParticleEmitter = new Class({ * * @param {number} value - Acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravityX: function (value) { @@ -84154,7 +86872,7 @@ var ParticleEmitter = new Class({ * * @param {number} value - Acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravityY: function (value) { @@ -84172,7 +86890,7 @@ var ParticleEmitter = new Class({ * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravity: function (x, y) { @@ -84190,7 +86908,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setAlpha: function (value) { @@ -84207,7 +86925,7 @@ var ParticleEmitter = new Class({ * * @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. + * @return {this} This Particle Emitter. */ setTint: function (value) { @@ -84224,7 +86942,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setEmitterAngle: function (value) { @@ -84241,7 +86959,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setAngle: function (value) { @@ -84258,7 +86976,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setLifespan: function (value) { @@ -84275,7 +86993,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setQuantity: function (quantity) { @@ -84294,7 +87012,7 @@ var ParticleEmitter = new Class({ * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setFrequency: function (frequency, quantity) { @@ -84322,7 +87040,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setEmitZone: function (zoneConfig) { @@ -84371,7 +87089,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setDeathZone: function (zoneConfig) { @@ -84407,7 +87125,7 @@ var ParticleEmitter = new Class({ * * @param {integer} particleCount - The number of particles to create. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ reserve: function (particleCount) { @@ -84482,7 +87200,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} [context] - The calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ onParticleEmit: function (callback, context) { @@ -84514,7 +87232,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleDeathCallback} callback - The function. * @param {*} [context] - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ onParticleDeath: function (callback, context) { @@ -84543,7 +87261,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ killAll: function () { @@ -84567,7 +87285,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} context - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ forEachAlive: function (callback, context) { @@ -84592,7 +87310,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} context - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ forEachDead: function (callback, context) { @@ -84619,7 +87337,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#start * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ start: function () { @@ -84636,7 +87354,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#stop * @since 3.11.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ stop: function () { @@ -84651,7 +87369,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#pause * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ pause: function () { @@ -84666,7 +87384,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#resume * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ resume: function () { @@ -84681,7 +87399,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#remove * @since 3.22.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ remove: function () { @@ -84696,7 +87414,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSort * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ depthSort: function () { @@ -84716,7 +87434,7 @@ var ParticleEmitter = new Class({ * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ flow: function (frequency, count) { @@ -84942,7 +87660,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 397 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85020,7 +87738,7 @@ module.exports = DeathZone; /***/ }), -/* 398 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85156,7 +87874,7 @@ var EdgeZone = new Class({ * @method Phaser.GameObjects.Particles.Zones.EdgeZone#updateSource * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone. + * @return {this} This Edge Zone. */ updateSource: function () { @@ -85195,7 +87913,7 @@ var EdgeZone = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. * - * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone. + * @return {this} This Edge Zone. */ changeSource: function (source) { @@ -85264,7 +87982,7 @@ module.exports = EdgeZone; /***/ }), -/* 399 */ +/* 406 */ /***/ (function(module, exports) { /** @@ -85301,7 +88019,7 @@ module.exports = HasAny; /***/ }), -/* 400 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85374,7 +88092,7 @@ module.exports = RandomZone; /***/ }), -/* 401 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85385,7 +88103,7 @@ module.exports = RandomZone; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Sprite = __webpack_require__(69); +var Sprite = __webpack_require__(75); /** * @classdesc @@ -85456,7 +88174,7 @@ module.exports = PathFollower; /***/ }), -/* 402 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85465,12 +88183,12 @@ module.exports = PathFollower; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(990); +var ArcRender = __webpack_require__(998); var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); var Earcut = __webpack_require__(66); var GeomCircle = __webpack_require__(65); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Shape = __webpack_require__(30); /** @@ -85865,7 +88583,7 @@ module.exports = Arc; /***/ }), -/* 403 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85875,7 +88593,7 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(993); +var CurveRender = __webpack_require__(1001); var Earcut = __webpack_require__(66); var Rectangle = __webpack_require__(11); var Shape = __webpack_require__(30); @@ -86047,7 +88765,7 @@ module.exports = Curve; /***/ }), -/* 404 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86058,7 +88776,7 @@ module.exports = Curve; var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var EllipseRender = __webpack_require__(996); +var EllipseRender = __webpack_require__(1004); var GeomEllipse = __webpack_require__(95); var Shape = __webpack_require__(30); @@ -86234,7 +88952,7 @@ module.exports = Ellipse; /***/ }), -/* 405 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86245,7 +88963,7 @@ module.exports = Ellipse; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); -var GridRender = __webpack_require__(999); +var GridRender = __webpack_require__(1007); /** * @classdesc @@ -86516,7 +89234,7 @@ module.exports = Grid; /***/ }), -/* 406 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86525,7 +89243,7 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1002); +var IsoBoxRender = __webpack_require__(1010); var Class = __webpack_require__(0); var Shape = __webpack_require__(30); @@ -86731,7 +89449,7 @@ module.exports = IsoBox; /***/ }), -/* 407 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86741,7 +89459,7 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1005); +var IsoTriangleRender = __webpack_require__(1013); var Shape = __webpack_require__(30); /** @@ -86977,7 +89695,7 @@ module.exports = IsoTriangle; /***/ }), -/* 408 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86989,7 +89707,7 @@ module.exports = IsoTriangle; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomLine = __webpack_require__(56); -var LineRender = __webpack_require__(1008); +var LineRender = __webpack_require__(1016); /** * @classdesc @@ -87144,7 +89862,7 @@ module.exports = Line; /***/ }), -/* 409 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87153,13 +89871,13 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1011); +var PolygonRender = __webpack_require__(1019); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var GetAABB = __webpack_require__(410); -var GeomPolygon = __webpack_require__(198); +var GetAABB = __webpack_require__(417); +var GeomPolygon = __webpack_require__(201); var Shape = __webpack_require__(30); -var Smooth = __webpack_require__(413); +var Smooth = __webpack_require__(420); /** * @classdesc @@ -87283,7 +90001,7 @@ module.exports = Polygon; /***/ }), -/* 410 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87339,7 +90057,7 @@ module.exports = GetAABB; /***/ }), -/* 411 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87350,7 +90068,7 @@ module.exports = GetAABB; var Length = __webpack_require__(57); var Line = __webpack_require__(56); -var Perimeter = __webpack_require__(412); +var Perimeter = __webpack_require__(419); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -87374,7 +90092,7 @@ var GetPoints = function (polygon, quantity, stepRate, out) var perimeter = Perimeter(polygon); // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = perimeter / stepRate; } @@ -87416,7 +90134,7 @@ module.exports = GetPoints; /***/ }), -/* 412 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87464,7 +90182,7 @@ module.exports = Perimeter; /***/ }), -/* 413 */ +/* 420 */ /***/ (function(module, exports) { /** @@ -87540,7 +90258,7 @@ module.exports = Smooth; /***/ }), -/* 414 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87552,7 +90270,7 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(11); var Shape = __webpack_require__(30); -var RectangleRender = __webpack_require__(1014); +var RectangleRender = __webpack_require__(1022); /** * @classdesc @@ -87652,7 +90370,7 @@ module.exports = Rectangle; /***/ }), -/* 415 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87661,7 +90379,7 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1017); +var StarRender = __webpack_require__(1025); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var Shape = __webpack_require__(30); @@ -87940,7 +90658,7 @@ module.exports = Star; /***/ }), -/* 416 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87952,7 +90670,7 @@ module.exports = Star; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomTriangle = __webpack_require__(71); -var TriangleRender = __webpack_require__(1020); +var TriangleRender = __webpack_require__(1028); /** * @classdesc @@ -88083,7 +90801,7 @@ module.exports = Triangle; /***/ }), -/* 417 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88170,7 +90888,7 @@ module.exports = GetPoint; /***/ }), -/* 418 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88212,7 +90930,7 @@ var GetPoints = function (triangle, quantity, stepRate, out) var perimeter = length1 + length2 + length3; // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = perimeter / stepRate; } @@ -88263,7 +90981,7 @@ module.exports = GetPoints; /***/ }), -/* 419 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -88346,7 +91064,7 @@ module.exports = SetValue; /***/ }), -/* 420 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88356,7 +91074,7 @@ module.exports = SetValue; */ var Class = __webpack_require__(0); -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * @classdesc @@ -88486,7 +91204,7 @@ var Light = new Class({ * @param {number} b - The blue color. A value between 0 and 1. * @param {number} intensity - The intensity of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ set: function (x, y, radius, r, g, b, intensity) { @@ -88516,7 +91234,7 @@ var Light = new Class({ * @param {number} x - The horizontal scroll factor of the light. * @param {number} y - The vertical scroll factor of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setScrollFactor: function (x, y) { @@ -88537,7 +91255,7 @@ var Light = new Class({ * * @param {number} rgb - The integer RGB color of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setColor: function (rgb) { @@ -88558,7 +91276,7 @@ var Light = new Class({ * * @param {number} intensity - The intensity of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setIntensity: function (intensity) { @@ -88576,7 +91294,7 @@ var Light = new Class({ * @param {number} x - The horizontal position of the light. * @param {number} y - The vertical position of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setPosition: function (x, y) { @@ -88594,7 +91312,7 @@ var Light = new Class({ * * @param {number} radius - The radius of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setRadius: function (radius) { @@ -88609,7 +91327,7 @@ module.exports = Light; /***/ }), -/* 421 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88619,8 +91337,8 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(420); -var Utils = __webpack_require__(10); +var Light = __webpack_require__(427); +var Utils = __webpack_require__(9); /** * @callback LightForEach @@ -88972,7 +91690,7 @@ module.exports = LightsManager; /***/ }), -/* 422 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -88981,8 +91699,8 @@ module.exports = LightsManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(46); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(47); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Geom @@ -88990,14 +91708,14 @@ var Extend = __webpack_require__(17); var Geom = { - 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) + Circle: __webpack_require__(1088), + Ellipse: __webpack_require__(1098), + Intersects: __webpack_require__(430), + Line: __webpack_require__(1117), + Point: __webpack_require__(1139), + Polygon: __webpack_require__(1153), + Rectangle: __webpack_require__(443), + Triangle: __webpack_require__(1184) }; @@ -89008,7 +91726,7 @@ module.exports = Geom; /***/ }), -/* 423 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89023,35 +91741,35 @@ module.exports = Geom; module.exports = { - 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), + CircleToCircle: __webpack_require__(205), + CircleToRectangle: __webpack_require__(206), + GetCircleToCircle: __webpack_require__(1108), + GetCircleToRectangle: __webpack_require__(1109), + GetLineToCircle: __webpack_require__(207), + GetLineToRectangle: __webpack_require__(209), + GetRectangleIntersection: __webpack_require__(1110), + GetRectangleToRectangle: __webpack_require__(1111), + GetRectangleToTriangle: __webpack_require__(1112), + GetTriangleToCircle: __webpack_require__(1113), + GetTriangleToLine: __webpack_require__(435), + GetTriangleToTriangle: __webpack_require__(1114), + LineToCircle: __webpack_require__(208), LineToLine: __webpack_require__(84), - 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) + LineToRectangle: __webpack_require__(431), + PointToLine: __webpack_require__(439), + PointToLineSegment: __webpack_require__(1115), + RectangleToRectangle: __webpack_require__(135), + RectangleToTriangle: __webpack_require__(432), + RectangleToValues: __webpack_require__(1116), + TriangleToCircle: __webpack_require__(434), + TriangleToLine: __webpack_require__(436), + TriangleToTriangle: __webpack_require__(437) }; /***/ }), -/* 424 */ +/* 431 */ /***/ (function(module, exports) { /** @@ -89152,7 +91870,7 @@ module.exports = LineToRectangle; /***/ }), -/* 425 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89162,9 +91880,9 @@ module.exports = LineToRectangle; */ var LineToLine = __webpack_require__(84); -var Contains = __webpack_require__(47); -var ContainsArray = __webpack_require__(207); -var Decompose = __webpack_require__(426); +var Contains = __webpack_require__(48); +var ContainsArray = __webpack_require__(210); +var Decompose = __webpack_require__(433); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -89245,7 +91963,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 426 */ +/* 433 */ /***/ (function(module, exports) { /** @@ -89282,7 +92000,7 @@ module.exports = Decompose; /***/ }), -/* 427 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89291,7 +92009,7 @@ module.exports = Decompose; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(205); +var LineToCircle = __webpack_require__(208); var Contains = __webpack_require__(83); /** @@ -89347,7 +92065,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 428 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89358,7 +92076,7 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(429); +var TriangleToLine = __webpack_require__(436); var LineToLine = __webpack_require__(84); /** @@ -89406,7 +92124,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 429 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89462,7 +92180,7 @@ module.exports = TriangleToLine; /***/ }), -/* 430 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89471,8 +92189,8 @@ module.exports = TriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(207); -var Decompose = __webpack_require__(431); +var ContainsArray = __webpack_require__(210); +var Decompose = __webpack_require__(438); var LineToLine = __webpack_require__(84); /** @@ -89552,7 +92270,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 431 */ +/* 438 */ /***/ (function(module, exports) { /** @@ -89587,7 +92305,7 @@ module.exports = Decompose; /***/ }), -/* 432 */ +/* 439 */ /***/ (function(module, exports) { /** @@ -89657,7 +92375,7 @@ module.exports = PointToLine; /***/ }), -/* 433 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89666,7 +92384,7 @@ module.exports = PointToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Wrap = __webpack_require__(58); var Angle = __webpack_require__(85); @@ -89691,7 +92409,7 @@ module.exports = NormalAngle; /***/ }), -/* 434 */ +/* 441 */ /***/ (function(module, exports) { /** @@ -89719,7 +92437,7 @@ module.exports = GetMagnitude; /***/ }), -/* 435 */ +/* 442 */ /***/ (function(module, exports) { /** @@ -89747,7 +92465,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 436 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89758,49 +92476,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(11); -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__(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.Area = __webpack_require__(1158); +Rectangle.Ceil = __webpack_require__(1159); +Rectangle.CeilAll = __webpack_require__(1160); +Rectangle.CenterOn = __webpack_require__(168); +Rectangle.Clone = __webpack_require__(1161); +Rectangle.Contains = __webpack_require__(48); +Rectangle.ContainsPoint = __webpack_require__(1162); +Rectangle.ContainsRect = __webpack_require__(444); +Rectangle.CopyFrom = __webpack_require__(1163); +Rectangle.Decompose = __webpack_require__(433); +Rectangle.Equals = __webpack_require__(1164); +Rectangle.FitInside = __webpack_require__(1165); +Rectangle.FitOutside = __webpack_require__(1166); +Rectangle.Floor = __webpack_require__(1167); +Rectangle.FloorAll = __webpack_require__(1168); +Rectangle.FromPoints = __webpack_require__(176); +Rectangle.FromXY = __webpack_require__(1169); +Rectangle.GetAspectRatio = __webpack_require__(212); +Rectangle.GetCenter = __webpack_require__(1170); +Rectangle.GetPoint = __webpack_require__(152); +Rectangle.GetPoints = __webpack_require__(274); +Rectangle.GetSize = __webpack_require__(1171); +Rectangle.Inflate = __webpack_require__(1172); +Rectangle.Intersection = __webpack_require__(1173); +Rectangle.MarchingAnts = __webpack_require__(285); +Rectangle.MergePoints = __webpack_require__(1174); +Rectangle.MergeRect = __webpack_require__(1175); +Rectangle.MergeXY = __webpack_require__(1176); +Rectangle.Offset = __webpack_require__(1177); +Rectangle.OffsetPoint = __webpack_require__(1178); +Rectangle.Overlaps = __webpack_require__(1179); 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); +Rectangle.PerimeterPoint = __webpack_require__(1180); +Rectangle.Random = __webpack_require__(155); +Rectangle.RandomOutside = __webpack_require__(1181); +Rectangle.SameDimensions = __webpack_require__(1182); +Rectangle.Scale = __webpack_require__(1183); +Rectangle.Union = __webpack_require__(393); module.exports = Rectangle; /***/ }), -/* 437 */ +/* 444 */ /***/ (function(module, exports) { /** @@ -89840,7 +92559,7 @@ module.exports = ContainsRect; /***/ }), -/* 438 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89884,7 +92603,7 @@ module.exports = Centroid; /***/ }), -/* 439 */ +/* 446 */ /***/ (function(module, exports) { /** @@ -89925,7 +92644,7 @@ module.exports = Offset; /***/ }), -/* 440 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89990,7 +92709,7 @@ module.exports = InCenter; /***/ }), -/* 441 */ +/* 448 */ /***/ (function(module, exports) { /** @@ -90061,7 +92780,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 442 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90186,7 +92905,7 @@ module.exports = Axis; /***/ }), -/* 443 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90196,7 +92915,7 @@ module.exports = Axis; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(211); +var Events = __webpack_require__(214); /** * @classdesc @@ -90332,7 +93051,7 @@ module.exports = Button; /***/ }), -/* 444 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90341,10 +93060,10 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(442); -var Button = __webpack_require__(443); +var Axis = __webpack_require__(449); +var Button = __webpack_require__(450); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Vector2 = __webpack_require__(3); /** @@ -91090,7 +93809,7 @@ module.exports = Gamepad; /***/ }), -/* 445 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91100,8 +93819,8 @@ module.exports = Gamepad; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(133); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(137); /** * @classdesc @@ -91332,7 +94051,7 @@ var Key = new Class({ * * @param {boolean} value - Emit `down` events on repeated key down actions, or just once? * - * @return {Phaser.Input.Keyboard.Key} This Key instance. + * @return {this} This Key instance. */ setEmitOnRepeat: function (value) { @@ -91423,7 +94142,7 @@ var Key = new Class({ * @method Phaser.Input.Keyboard.Key#reset * @since 3.6.0 * - * @return {Phaser.Input.Keyboard.Key} This Key instance. + * @return {this} This Key instance. */ reset: function () { @@ -91492,7 +94211,7 @@ module.exports = Key; /***/ }), -/* 446 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91502,10 +94221,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(133); +var Events = __webpack_require__(137); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1211); -var ResetKeyCombo = __webpack_require__(1213); +var ProcessKeyCombo = __webpack_require__(1223); +var ResetKeyCombo = __webpack_require__(1225); /** * @classdesc @@ -91785,7 +94504,7 @@ module.exports = KeyCombo; /***/ }), -/* 447 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91794,7 +94513,7 @@ module.exports = KeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(212); +var MergeXHRSettings = __webpack_require__(215); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -91820,6 +94539,14 @@ var XHRLoader = function (file, globalXHRSettings) xhr.responseType = file.xhrSettings.responseType; xhr.timeout = config.timeout; + if (config.headers) + { + for (var key in config.headers) + { + xhr.setRequestHeader(key, config.headers[key]); + } + } + if (config.header && config.headerValue) { xhr.setRequestHeader(config.header, config.headerValue); @@ -91835,6 +94562,11 @@ var XHRLoader = function (file, globalXHRSettings) xhr.overrideMimeType(config.overrideMimeType); } + if (config.withCredentials) + { + xhr.withCredentials = true; + } + // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.) xhr.onload = file.onLoad.bind(file, xhr); @@ -91853,7 +94585,7 @@ module.exports = XHRLoader; /***/ }), -/* 448 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91863,11 +94595,11 @@ module.exports = XHRLoader; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(449); +var HTML5AudioFile = __webpack_require__(456); var IsPlainObject = __webpack_require__(7); /** @@ -91875,7 +94607,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -92003,7 +94735,10 @@ AudioFile.getAudioURL = function (game, urls) if (url.indexOf('blob:') === 0 || url.indexOf('data:') === 0) { - return url; + return { + url: url, + type: '' + }; } var audioType = url.match(/\.([a-zA-Z0-9]+)($|\?)/); @@ -92026,7 +94761,7 @@ AudioFile.getAudioURL = function (game, urls) * Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -92041,14 +94776,14 @@ AudioFile.getAudioURL = function (game, urls) * 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 Audio Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Audio Cache. * 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 Audio Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.audio({ * key: 'title', @@ -92070,7 +94805,7 @@ AudioFile.getAudioURL = function (game, urls) * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#audio - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig|Phaser.Types.Loader.FileTypes.AudioFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -92078,7 +94813,7 @@ AudioFile.getAudioURL = function (game, urls) * @param {any} [config] - An object containing an `instances` property for HTML5Audio. Defaults to 1. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('audio', function (key, urls, config, xhrSettings) { @@ -92124,7 +94859,7 @@ module.exports = AudioFile; /***/ }), -/* 449 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92134,10 +94869,10 @@ module.exports = AudioFile; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(81); +var Events = __webpack_require__(82); var File = __webpack_require__(21); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(134); +var GetURL = __webpack_require__(138); var IsPlainObject = __webpack_require__(7); /** @@ -92277,7 +95012,12 @@ var HTML5AudioFile = new Class({ for (var i = 0; i < instances; i++) { var audio = new Audio(); - audio.dataset = {}; + + if (!audio.dataset) + { + audio.dataset = {}; + } + audio.dataset.name = this.key + ('0' + i).slice(-2); audio.dataset.used = 'false'; @@ -92322,7 +95062,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 450 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92332,7 +95072,7 @@ module.exports = HTML5AudioFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -92343,7 +95083,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -92418,7 +95158,7 @@ var ScriptFile = new Class({ * Adds a Script file, or array of Script files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -92433,11 +95173,11 @@ var ScriptFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.script({ * key: 'aliens', @@ -92462,14 +95202,14 @@ var ScriptFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#script - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig|Phaser.Types.Loader.FileTypes.ScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('script', function (key, url, xhrSettings) { @@ -92493,7 +95233,7 @@ module.exports = ScriptFile; /***/ }), -/* 451 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92503,7 +95243,7 @@ module.exports = ScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -92637,14 +95377,14 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('text', function (key, url, xhrSettings) { @@ -92668,7 +95408,7 @@ module.exports = TextFile; /***/ }), -/* 452 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92677,12 +95417,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(453); -var ArcadeSprite = __webpack_require__(136); +var ArcadeImage = __webpack_require__(460); +var ArcadeSprite = __webpack_require__(140); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var PhysicsGroup = __webpack_require__(454); -var StaticPhysicsGroup = __webpack_require__(455); +var PhysicsGroup = __webpack_require__(461); +var StaticPhysicsGroup = __webpack_require__(462); /** * @classdesc @@ -92939,7 +95679,7 @@ module.exports = Factory; /***/ }), -/* 453 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92949,8 +95689,8 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(214); -var Image = __webpack_require__(98); +var Components = __webpack_require__(217); +var Image = __webpack_require__(107); /** * @classdesc @@ -93039,7 +95779,7 @@ module.exports = ArcadeImage; /***/ }), -/* 454 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93048,7 +95788,7 @@ module.exports = ArcadeImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(136); +var ArcadeSprite = __webpack_require__(140); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var GetFastValue = __webpack_require__(2); @@ -93059,7 +95799,7 @@ var IsPlainObject = __webpack_require__(7); * @classdesc * An Arcade Physics Group object. * - * All Game Objects created by this Group will automatically be given dynamic Arcade Physics bodies. + * All Game Objects created by or added to this Group will automatically be given dynamic Arcade Physics bodies, if they have no body. * * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}. * @@ -93324,7 +96064,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 455 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93333,7 +96073,7 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(136); +var ArcadeSprite = __webpack_require__(140); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var GetFastValue = __webpack_require__(2); @@ -93344,7 +96084,7 @@ var IsPlainObject = __webpack_require__(7); * @classdesc * An Arcade Physics Static Group object. * - * All Game Objects created by this Group will automatically be given static Arcade Physics bodies. + * All Game Objects created by or added to this Group will automatically be given static Arcade Physics bodies, if they have no body. * * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Group}. * @@ -93515,7 +96255,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 456 */ +/* 463 */ /***/ (function(module, exports) { /** @@ -93600,7 +96340,7 @@ module.exports = OverlapRect; /***/ }), -/* 457 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93609,31 +96349,31 @@ module.exports = OverlapRect; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(458); -var Clamp = __webpack_require__(22); +var Body = __webpack_require__(465); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Collider = __webpack_require__(459); +var Collider = __webpack_require__(466); var CONST = __webpack_require__(50); var DistanceBetween = __webpack_require__(53); -var EventEmitter = __webpack_require__(9); -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 EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(218); +var FuzzyEqual = __webpack_require__(106); +var FuzzyGreaterThan = __webpack_require__(321); +var FuzzyLessThan = __webpack_require__(322); +var GetOverlapX = __webpack_require__(467); +var GetOverlapY = __webpack_require__(468); var GetValue = __webpack_require__(6); -var ProcessQueue = __webpack_require__(184); -var ProcessTileCallbacks = __webpack_require__(1270); +var ProcessQueue = __webpack_require__(186); +var ProcessTileCallbacks = __webpack_require__(1282); var Rectangle = __webpack_require__(11); -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 RTree = __webpack_require__(469); +var SeparateTile = __webpack_require__(1283); +var SeparateX = __webpack_require__(1288); +var SeparateY = __webpack_require__(1289); +var Set = __webpack_require__(133); +var StaticBody = __webpack_require__(471); +var TileIntersectsBody = __webpack_require__(470); +var TransformMatrix = __webpack_require__(29); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(58); @@ -93759,6 +96499,17 @@ var World = new Class({ */ this.fps = GetValue(config, 'fps', 60); + /** + * Should Physics use a fixed update time-step (true) or sync to the render fps (false)?. + * False value of this property disables fps and timeScale properties. + * + * @name Phaser.Physics.Arcade.World#fixedStep + * @type {boolean} + * @default true + * @since 3.23.0 + */ + this.fixedStep = true; + /** * The amount of elapsed ms since the last frame. * @@ -94532,6 +97283,13 @@ var World = new Class({ // Will a step happen this frame? var willStep = (this._elapsed >= msPerFrame); + if (!this.fixedStep) + { + fixedDelta = delta * 0.001; + willStep = true; + this._elapsed = 0; + } + for (i = 0; i < bodies.length; i++) { body = bodies[i]; @@ -95235,6 +97993,8 @@ var World = new Class({ /** * Tests if Game Objects overlap. * + * See details in {@link Phaser.Physics.Arcade.World#collide}. + * * @method Phaser.Physics.Arcade.World#overlap * @since 3.0.0 * @@ -95245,6 +98005,8 @@ var World = new Class({ * @param {*} [callbackContext] - The context in which to run the callbacks. * * @return {boolean} True if at least one Game Object overlaps another. + * + * @see Phaser.Physics.Arcade.World#collide */ overlap: function (object1, object2, overlapCallback, processCallback, callbackContext) { @@ -95259,7 +98021,7 @@ var World = new Class({ * Performs a collision check and separation between the two physics enabled objects given, which can be single * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups. * - * If you don't require separation then use {@link #overlap} instead. + * If you don't require separation then use {@link Phaser.Physics.Arcade.World#overlap} instead. * * If two Groups or arrays are passed, each member of one will be tested against each member of the other. * @@ -95267,8 +98029,9 @@ var World = new Class({ * * If **only** one Array is passed, the array is iterated and every element in it is tested against the others. * - * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding - * objects are passed to it. + * Two callbacks can be provided; they receive the colliding game objects as arguments. + * If an overlap is detected, the `processCallback` is called first. It can cancel the collision by returning false. + * Next the objects are separated and `collideCallback` is invoked. * * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other. @@ -95525,7 +98288,7 @@ var World = new Class({ { var bodyA = sprite.body; - if (group.length === 0 || !bodyA || !bodyA.enable) + if (group.length === 0 || !bodyA || !bodyA.enable || bodyA.checkCollision.none) { return; } @@ -95553,9 +98316,9 @@ var World = new Class({ { bodyB = results[i]; - if (bodyA === bodyB || !bodyB.enable || !group.contains(bodyB.gameObject)) + if (bodyA === bodyB || !bodyB.enable || bodyB.checkCollision.none || !group.contains(bodyB.gameObject)) { - // Skip if comparing against itself, or if bodyB isn't actually part of the Group + // Skip if comparing against itself, or if bodyB isn't collidable, or if bodyB isn't actually part of the Group continue; } @@ -95738,7 +98501,7 @@ var World = new Class({ { var body = sprite.body; - if (!body.enable) + if (!body.enable || body.checkCollision.none) { return false; } @@ -95989,7 +98752,7 @@ module.exports = World; /***/ }), -/* 458 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96001,10 +98764,10 @@ module.exports = World; var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var Events = __webpack_require__(215); -var RadToDeg = __webpack_require__(171); +var Events = __webpack_require__(218); +var RadToDeg = __webpack_require__(173); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(47); +var RectangleContains = __webpack_require__(48); var Vector2 = __webpack_require__(3); /** @@ -96027,8 +98790,8 @@ var Body = new Class({ function Body (world, gameObject) { - var width = (gameObject.width) ? gameObject.width : 64; - var height = (gameObject.height) ? gameObject.height : 64; + var width = (gameObject.displayWidth) ? gameObject.displayWidth : 64; + var height = (gameObject.displayHeight) ? gameObject.displayHeight : 64; /** * The Arcade Physics simulation this Body belongs to. @@ -96142,7 +98905,10 @@ var Body = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.position = new Vector2(gameObject.x, gameObject.y); + this.position = new Vector2( + gameObject.x - gameObject.scaleX * gameObject.displayOriginX, + gameObject.y - gameObject.scaleY * gameObject.displayOriginY + ); /** * The position of this Body during the previous step. @@ -96155,7 +98921,7 @@ var Body = new Class({ /** * The position of this Body during the previous frame. - * + * * @name Phaser.Physics.Arcade.Body#prevFrame * @type {Phaser.Math.Vector2} * @since 3.20.0 @@ -96272,7 +99038,7 @@ var Body = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight); + this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight); /** * The Body's velocity, in pixels per second. @@ -96324,10 +99090,10 @@ var Body = new Class({ this.allowDrag = true; /** - * Absolute loss of velocity due to movement, in pixels per second squared. + * When `useDamping` is false (the default), this is absolute loss of velocity due to movement, in pixels per second squared (a vector). * The x and y components are applied separately. * - * When `useDamping` is true, this is 1 minus the damping factor. + * When `useDamping` is true, this is 1 minus the damping factor (a number). * 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. @@ -96385,10 +99151,10 @@ var Body = new Class({ /** * The rectangle used for world boundary collisions. - * + * * By default it is set to the world boundary rectangle. Or, if this Body was * created by a Physics Group, then whatever rectangle that Group defined. - * + * * You can also change it by using the `Body.setBoundsRectangle` method. * * @name Phaser.Physics.Arcade.Body#customBoundsRectangle @@ -96406,7 +99172,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#worldboundsEvent + * @see Phaser.Physics.Arcade.World#WORLD_BOUNDS */ this.onWorldBounds = false; @@ -96417,7 +99183,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#collideEvent + * @see Phaser.Physics.Arcade.World#COLLIDE */ this.onCollide = false; @@ -96428,7 +99194,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#overlapEvent + * @see Phaser.Physics.Arcade.World#OVERLAP */ this.onOverlap = false; @@ -96898,23 +99664,27 @@ var Body = new Class({ resetFlags: function () { // Store and reset collision flags - this.wasTouching.none = this.touching.none; - this.wasTouching.up = this.touching.up; - this.wasTouching.down = this.touching.down; - this.wasTouching.left = this.touching.left; - this.wasTouching.right = this.touching.right; + var wasTouching = this.wasTouching; + var touching = this.touching; + var blocked = this.blocked; - this.touching.none = true; - this.touching.up = false; - this.touching.down = false; - this.touching.left = false; - this.touching.right = false; + wasTouching.none = touching.none; + wasTouching.up = touching.up; + wasTouching.down = touching.down; + wasTouching.left = touching.left; + wasTouching.right = touching.right; - this.blocked.none = true; - this.blocked.up = false; - this.blocked.down = false; - this.blocked.left = false; - this.blocked.right = false; + touching.none = true; + touching.up = false; + touching.down = false; + touching.left = false; + touching.right = false; + + blocked.none = true; + blocked.up = false; + blocked.down = false; + blocked.left = false; + blocked.right = false; this.overlapR = 0; this.overlapX = 0; @@ -97096,7 +99866,7 @@ var Body = new Class({ * @since 3.20 * * @param {?Phaser.Geom.Rectangle} [bounds] - The new boundary rectangle. Pass `null` to use the World bounds. - * + * * @return {this} This Body object. */ setBoundsRectangle: function (bounds) @@ -97227,10 +99997,10 @@ var Body = new Class({ if (center && gameObject.getCenter) { - var ox = gameObject.displayWidth / 2; - var oy = gameObject.displayHeight / 2; + var ox = (gameObject.width - width) / 2; + var oy = (gameObject.height - height) / 2; - this.offset.set(ox - this.halfWidth, oy - this.halfHeight); + this.offset.set(ox, oy); } this.isCircle = false; @@ -97459,7 +100229,7 @@ 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. * @@ -97476,7 +100246,7 @@ 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. * @@ -97492,10 +100262,10 @@ var Body = new Class({ /** * 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 @@ -97513,10 +100283,10 @@ var Body = new Class({ /** * 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 @@ -98317,7 +101087,7 @@ module.exports = Body; /***/ }), -/* 459 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98500,7 +101270,7 @@ module.exports = Collider; /***/ }), -/* 460 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98608,7 +101378,7 @@ module.exports = GetOverlapX; /***/ }), -/* 461 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98716,7 +101486,7 @@ module.exports = GetOverlapY; /***/ }), -/* 462 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98726,7 +101496,7 @@ module.exports = GetOverlapY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(383); +var quickselect = __webpack_require__(390); /** * @classdesc @@ -99327,7 +102097,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 463 */ +/* 470 */ /***/ (function(module, exports) { /** @@ -99363,7 +102133,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 464 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99375,7 +102145,7 @@ module.exports = TileIntersectsBody; var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var RectangleContains = __webpack_require__(47); +var RectangleContains = __webpack_require__(48); var Vector2 = __webpack_require__(3); /** @@ -99383,7 +102153,7 @@ var Vector2 = __webpack_require__(3); * A Static Arcade Physics Body. * * A Static Body never moves, and isn't automatically synchronized with its parent Game Object. - * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Body manually. + * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Static Body manually. * * A Static Body can collide with other Bodies, but is never moved by collisions. * @@ -99403,8 +102173,8 @@ var StaticBody = new Class({ function StaticBody (world, gameObject) { - var width = (gameObject.width) ? gameObject.width : 64; - var height = (gameObject.height) ? gameObject.height : 64; + var width = (gameObject.displayWidth) ? gameObject.displayWidth : 64; + var height = (gameObject.displayHeight) ? gameObject.displayHeight : 64; /** * The Arcade Physics simulation this Static Body belongs to. @@ -99463,8 +102233,8 @@ var StaticBody = new Class({ this.isCircle = false; /** - * If this Static Body is circular, this is the unscaled radius of the Static Body's boundary, as set by {@link #setCircle}, in source pixels. - * The true radius is equal to `halfWidth`. + * If this Static Body is circular, this is the radius of the boundary, as set by {@link Phaser.Physics.Arcade.StaticBody#setCircle}, in pixels. + * Equal to `halfWidth`. * * @name Phaser.Physics.Arcade.StaticBody#radius * @type {number} @@ -99474,12 +102244,13 @@ var StaticBody = new Class({ this.radius = 0; /** - * The offset of this Static Body's actual position from any updated position. + * The offset set by {@link Phaser.Physics.Arcade.StaticBody#setCircle} or {@link Phaser.Physics.Arcade.StaticBody#setSize}. * - * Unlike a dynamic Body, a Static Body does not follow its Game Object. As such, this offset is only applied when resizing the Static Body. + * This doesn't affect the Static Body's position, because a Static Body does not follow its Game Object. * * @name Phaser.Physics.Arcade.StaticBody#offset * @type {Phaser.Math.Vector2} + * @readonly * @since 3.0.0 */ this.offset = new Vector2(); @@ -99541,7 +102312,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight); + this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight); /** * A constant zero velocity used by the Arcade Physics simulation for calculations. @@ -99757,7 +102528,7 @@ var StaticBody = new Class({ this.physicsType = CONST.STATIC_BODY; /** - * The calculated change in the Body's horizontal position during the current step. + * The calculated change in the Static Body's horizontal position during the current step. * For a static body this is always zero. * * @name Phaser.Physics.Arcade.StaticBody#_dx @@ -99769,7 +102540,7 @@ var StaticBody = new Class({ this._dx = 0; /** - * The calculated change in the Body's vertical position during the current step. + * The calculated change in the Static Body's vertical position during the current step. * For a static body this is always zero. * * @name Phaser.Physics.Arcade.StaticBody#_dy @@ -99818,7 +102589,7 @@ var StaticBody = new Class({ }, /** - * Syncs the Body's position and size with its parent Game Object. + * Syncs the Static Body's position and size with its parent Game Object. * * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject * @since 3.1.0 @@ -99847,13 +102618,13 @@ var StaticBody = new Class({ }, /** - * Sets the offset of the body. + * Positions the Static Body at an offset from its Game Object. * * @method Phaser.Physics.Arcade.StaticBody#setOffset * @since 3.4.0 * - * @param {number} x - The horizontal offset of the Body from the Game Object's center. - * @param {number} y - The vertical offset of the Body from the Game Object's center. + * @param {number} x - The horizontal offset of the Static Body from the Game Object's `x`. + * @param {number} y - The vertical offset of the Static Body from the Game Object's `y`. * * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. */ @@ -99879,15 +102650,16 @@ var StaticBody = new Class({ }, /** - * Sets the size of the body. + * Sets the size of the Static Body. + * When `center` is true, also repositions it. * Resets the width and height to match current frame, if no width and height provided and a frame is found. * * @method Phaser.Physics.Arcade.StaticBody#setSize * @since 3.0.0 * - * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width. - * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height. - * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method. + * @param {integer} [width] - The width of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width. + * @param {integer} [height] - The height of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height. + * @param {boolean} [center=true] - Place the Static Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method. * * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. */ @@ -99940,7 +102712,7 @@ var StaticBody = new Class({ }, /** - * Sets this Static Body to have a circular body and sets its sizes and position. + * Sets this Static Body to have a circular body and sets its size and position. * * @method Phaser.Physics.Arcade.StaticBody#setCircle * @since 3.0.0 @@ -100350,10 +103122,8 @@ module.exports = StaticBody; /***/ }), -/* 465 */, -/* 466 */, -/* 467 */, -/* 468 */ +/* 472 */, +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100483,7 +103253,7 @@ module.exports = BasePlugin; /***/ }), -/* 469 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100528,7 +103298,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 470 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100537,7 +103307,7 @@ module.exports = ReplaceByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(103); +var IsInLayerBounds = __webpack_require__(101); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns @@ -100571,7 +103341,7 @@ module.exports = HasTileAt; /***/ }), -/* 471 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100581,8 +103351,8 @@ module.exports = HasTileAt; */ var Tile = __webpack_require__(74); -var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(217); +var IsInLayerBounds = __webpack_require__(101); +var CalculateFacesAt = __webpack_require__(220); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -100634,7 +103404,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 472 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100643,11 +103413,11 @@ module.exports = RemoveTileAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var Parse2DArray = __webpack_require__(220); -var ParseCSV = __webpack_require__(473); -var ParseJSONTiled = __webpack_require__(474); -var ParseWeltmeister = __webpack_require__(485); +var Formats = __webpack_require__(32); +var Parse2DArray = __webpack_require__(223); +var ParseCSV = __webpack_require__(478); +var ParseJSONTiled = __webpack_require__(479); +var ParseWeltmeister = __webpack_require__(490); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -100704,7 +103474,7 @@ module.exports = Parse; /***/ }), -/* 473 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100713,8 +103483,8 @@ module.exports = Parse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var Parse2DArray = __webpack_require__(220); +var Formats = __webpack_require__(32); +var Parse2DArray = __webpack_require__(223); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -100752,7 +103522,7 @@ module.exports = ParseCSV; /***/ }), -/* 474 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100761,14 +103531,14 @@ module.exports = ParseCSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var MapData = __webpack_require__(105); -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); +var Formats = __webpack_require__(32); +var MapData = __webpack_require__(103); +var ParseTileLayers = __webpack_require__(480); +var ParseImageLayers = __webpack_require__(482); +var ParseTilesets = __webpack_require__(483); +var ParseObjectLayers = __webpack_require__(486); +var BuildTilesetIndex = __webpack_require__(488); +var AssignTileProperties = __webpack_require__(489); /** * Parses a Tiled JSON object into a new MapData object. @@ -100830,7 +103600,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 475 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100839,12 +103609,12 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(476); +var Base64Decode = __webpack_require__(481); var GetFastValue = __webpack_require__(2); -var LayerData = __webpack_require__(104); -var ParseGID = __webpack_require__(221); +var LayerData = __webpack_require__(102); +var ParseGID = __webpack_require__(224); var Tile = __webpack_require__(74); -var CreateGroupLayer = __webpack_require__(222); +var CreateGroupLayer = __webpack_require__(225); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -100962,7 +103732,7 @@ var ParseTileLayers = function (json, insertNull) tileHeight: json.tileheight, alpha: (curGroupState.opacity * curl.opacity), visible: (curGroupState.visible && curl.visible), - properties: GetFastValue(curl, 'properties', {}) + properties: GetFastValue(curl, 'properties', []) }); for (var c = 0; c < curl.height; c++) @@ -101035,7 +103805,7 @@ var ParseTileLayers = function (json, insertNull) tileHeight: json.tileheight, alpha: (curGroupState.opacity * curl.opacity), visible: (curGroupState.visible && curl.visible), - properties: GetFastValue(curl, 'properties', {}) + properties: GetFastValue(curl, 'properties', []) }); var row = []; @@ -101088,7 +103858,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 476 */ +/* 481 */ /***/ (function(module, exports) { /** @@ -101131,7 +103901,7 @@ module.exports = Base64Decode; /***/ }), -/* 477 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101141,7 +103911,7 @@ module.exports = Base64Decode; */ var GetFastValue = __webpack_require__(2); -var CreateGroupLayer = __webpack_require__(222); +var CreateGroupLayer = __webpack_require__(225); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -101219,7 +103989,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 478 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101228,9 +103998,9 @@ module.exports = ParseImageLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(141); -var ImageCollection = __webpack_require__(479); -var ParseObject = __webpack_require__(223); +var Tileset = __webpack_require__(104); +var ImageCollection = __webpack_require__(484); +var ParseObject = __webpack_require__(226); /** * Tilesets and Image Collections @@ -101238,9 +104008,9 @@ var ParseObject = __webpack_require__(223); * @function Phaser.Tilemaps.Parsers.Tiled.ParseTilesets * @since 3.0.0 * - * @param {object} json - [description] + * @param {object} json - The Tiled JSON data. * - * @return {object} [description] + * @return {object} An object containing the tileset and image collection data. */ var ParseTilesets = function (json) { @@ -101388,7 +104158,7 @@ module.exports = ParseTilesets; /***/ }), -/* 479 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101560,7 +104330,7 @@ module.exports = ImageCollection; /***/ }), -/* 480 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101569,7 +104339,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(99); +var HasValue = __webpack_require__(108); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -101604,7 +104374,7 @@ module.exports = Pick; /***/ }), -/* 481 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101614,9 +104384,9 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(2); -var ParseObject = __webpack_require__(223); -var ObjectLayer = __webpack_require__(482); -var CreateGroupLayer = __webpack_require__(222); +var ParseObject = __webpack_require__(226); +var ObjectLayer = __webpack_require__(487); +var CreateGroupLayer = __webpack_require__(225); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -101703,7 +104473,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 482 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101825,8 +104595,8 @@ module.exports = ObjectLayer; /***/ }), -/* 483 */ -/***/ (function(module, exports) { +/* 488 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -101834,23 +104604,44 @@ module.exports = ObjectLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Tileset = __webpack_require__(104); + /** * Master list of tiles -> x, y, index in tileset. * * @function Phaser.Tilemaps.Parsers.Tiled.BuildTilesetIndex * @since 3.0.0 * - * @param {Phaser.Tilemaps.MapData} mapData - [description] + * @param {Phaser.Tilemaps.MapData} mapData - The Map Data object. * - * @return {array} [description] + * @return {array} An array of Tileset objects. */ var BuildTilesetIndex = function (mapData) { + var i; + var set; var tiles = []; - for (var i = 0; i < mapData.tilesets.length; i++) + for (i = 0; i < mapData.imageCollections.length; i++) { - var set = mapData.tilesets[i]; + var collection = mapData.imageCollections[i]; + var images = collection.images; + + for (var j = 0; j < images.length; j++) + { + var image = images[j]; + + set = new Tileset(image.image, image.gid, collection.imageWidth, collection.imageHeight, 0, 0); + + set.updateTileData(collection.imageWidth, collection.imageHeight); + + mapData.tilesets.push(set); + } + } + + for (i = 0; i < mapData.tilesets.length; i++) + { + set = mapData.tilesets[i]; var x = set.tileMargin; var y = set.tileMargin; @@ -101898,7 +104689,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 484 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101907,7 +104698,7 @@ module.exports = BuildTilesetIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * Copy properties from tileset to tiles. @@ -101915,7 +104706,7 @@ var Extend = __webpack_require__(17); * @function Phaser.Tilemaps.Parsers.Tiled.AssignTileProperties * @since 3.0.0 * - * @param {Phaser.Tilemaps.MapData} mapData - [description] + * @param {Phaser.Tilemaps.MapData} mapData - The Map Data object. */ var AssignTileProperties = function (mapData) { @@ -101971,7 +104762,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 485 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -101980,10 +104771,10 @@ module.exports = AssignTileProperties; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(486); -var ParseTilesets = __webpack_require__(487); +var Formats = __webpack_require__(32); +var MapData = __webpack_require__(103); +var ParseTileLayers = __webpack_require__(491); +var ParseTilesets = __webpack_require__(492); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -102000,7 +104791,7 @@ var ParseTilesets = __webpack_require__(487); * consumption. However if your map is small or you need to update the tiles dynamically, then leave * the default value set. * - * @return {?object} [description] + * @return {?Phaser.Tilemaps.MapData} The created MapData object, or `null` if the data can't be parsed. */ var ParseWeltmeister = function (name, json, insertNull) { @@ -102038,7 +104829,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 486 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102047,19 +104838,21 @@ module.exports = ParseWeltmeister; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LayerData = __webpack_require__(104); +var LayerData = __webpack_require__(102); var Tile = __webpack_require__(74); /** - * [description] + * Parses all tilemap layers in an Impact JSON object into new LayerData objects. * * @function Phaser.Tilemaps.Parsers.Impact.ParseTileLayers * @since 3.0.0 * - * @param {object} json - [description] - * @param {boolean} insertNull - [description] + * @param {object} json - The Impact JSON object. + * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map + * data are handled (see {@link Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled}). * - * @return {array} [description] + * @return {Phaser.Tilemaps.LayerData[]} - An array of LayerData objects, one for each entry in + * json.layers with the type 'tilelayer'. */ var ParseTileLayers = function (json, insertNull) { @@ -102122,7 +104915,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 487 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102131,17 +104924,17 @@ module.exports = ParseTileLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(141); +var Tileset = __webpack_require__(104); /** - * [description] + * Tilesets and Image Collections * * @function Phaser.Tilemaps.Parsers.Impact.ParseTilesets * @since 3.0.0 * - * @param {object} json - [description] + * @param {object} json - The Impact JSON data. * - * @return {array} [description] + * @return {array} An array of Tilesets. */ var ParseTilesets = function (json) { @@ -102173,7 +104966,7 @@ module.exports = ParseTilesets; /***/ }), -/* 488 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102184,16 +104977,16 @@ module.exports = ParseTilesets; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DynamicTilemapLayer = __webpack_require__(489); -var Extend = __webpack_require__(17); -var Formats = __webpack_require__(31); -var LayerData = __webpack_require__(104); -var Rotate = __webpack_require__(327); -var SpliceOne = __webpack_require__(79); -var StaticTilemapLayer = __webpack_require__(490); +var DynamicTilemapLayer = __webpack_require__(494); +var Extend = __webpack_require__(18); +var Formats = __webpack_require__(32); +var LayerData = __webpack_require__(102); +var Rotate = __webpack_require__(330); +var SpliceOne = __webpack_require__(80); +var StaticTilemapLayer = __webpack_require__(495); var Tile = __webpack_require__(74); -var TilemapComponents = __webpack_require__(137); -var Tileset = __webpack_require__(141); +var TilemapComponents = __webpack_require__(141); +var Tileset = __webpack_require__(104); /** * @callback TilemapFilterCallback @@ -102849,9 +105642,10 @@ var Tilemap = new Class({ if (obj.height) { sprite.displayHeight = obj.height; } // Origin is (0, 1) in Tiled, so find the offset that matches the Sprite's origin. + // Do not offset objects with zero dimensions (e.g. points). var offset = { - x: sprite.originX * sprite.displayWidth, - y: (sprite.originY - 1) * sprite.displayHeight + x: sprite.originX * obj.width, + y: (sprite.originY - 1) * obj.height }; // If the object is rotated, then the origin offset also needs to be rotated. @@ -104062,7 +106856,6 @@ var Tilemap = new Class({ * * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon. * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing. - * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used. * * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid. */ @@ -104730,7 +107523,7 @@ module.exports = Tilemap; /***/ }), -/* 489 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104741,9 +107534,9 @@ module.exports = Tilemap; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1333); -var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(137); +var DynamicTilemapLayerRender = __webpack_require__(1343); +var GameObject = __webpack_require__(13); +var TilemapComponents = __webpack_require__(141); /** * @classdesc @@ -106051,7 +108844,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 490 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106062,12 +108855,12 @@ module.exports = DynamicTilemapLayer; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(18); -var GameObject = __webpack_require__(14); -var StaticTilemapLayerRender = __webpack_require__(1336); -var TilemapComponents = __webpack_require__(137); -var TransformMatrix = __webpack_require__(32); -var Utils = __webpack_require__(10); +var GameEvents = __webpack_require__(20); +var GameObject = __webpack_require__(13); +var StaticTilemapLayerRender = __webpack_require__(1346); +var TilemapComponents = __webpack_require__(141); +var TransformMatrix = __webpack_require__(29); +var Utils = __webpack_require__(9); /** * @classdesc @@ -107545,7 +110338,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 491 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107858,7 +110651,7 @@ module.exports = TimerEvent; /***/ }), -/* 492 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107867,7 +110660,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1345); +var RESERVED = __webpack_require__(1355); /** * Internal function used by the Tween Builder to return an array of properties @@ -107919,7 +110712,7 @@ module.exports = GetProps; /***/ }), -/* 493 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107967,7 +110760,7 @@ module.exports = GetTweens; /***/ }), -/* 494 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107976,15 +110769,15 @@ module.exports = GetTweens; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(227); -var GetAdvancedValue = __webpack_require__(15); +var Defaults = __webpack_require__(230); +var GetAdvancedValue = __webpack_require__(14); var GetBoolean = __webpack_require__(88); -var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(142); +var GetEaseFunction = __webpack_require__(69); +var GetNewValue = __webpack_require__(145); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(226); -var Tween = __webpack_require__(228); -var TweenData = __webpack_require__(230); +var GetValueOp = __webpack_require__(229); +var Tween = __webpack_require__(231); +var TweenData = __webpack_require__(233); /** * Creates a new Number Tween. @@ -108097,7 +110890,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 495 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108106,9 +110899,9 @@ module.exports = NumberTweenBuilder; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetEaseFunction = __webpack_require__(82); +var GetEaseFunction = __webpack_require__(69); var GetValue = __webpack_require__(6); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * Creates a Stagger function to be used by a Tween property. @@ -108343,7 +111136,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 496 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108353,16 +111146,16 @@ module.exports = StaggerBuilder; */ var Clone = __webpack_require__(67); -var Defaults = __webpack_require__(227); -var GetAdvancedValue = __webpack_require__(15); +var Defaults = __webpack_require__(230); +var GetAdvancedValue = __webpack_require__(14); var GetBoolean = __webpack_require__(88); -var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(142); -var GetTargets = __webpack_require__(225); -var GetTweens = __webpack_require__(493); +var GetEaseFunction = __webpack_require__(69); +var GetNewValue = __webpack_require__(145); +var GetTargets = __webpack_require__(228); +var GetTweens = __webpack_require__(498); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(497); -var TweenBuilder = __webpack_require__(143); +var Timeline = __webpack_require__(502); +var TweenBuilder = __webpack_require__(146); /** * Builds a Timeline of Tweens based on a configuration object. @@ -108495,7 +111288,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 497 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108505,9 +111298,9 @@ module.exports = TimelineBuilder; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(229); -var TweenBuilder = __webpack_require__(143); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(232); +var TweenBuilder = __webpack_require__(146); var TWEEN_CONST = __webpack_require__(89); /** @@ -109400,7 +112193,7 @@ module.exports = Timeline; /***/ }), -/* 498 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109409,7 +112202,7 @@ module.exports = Timeline; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = __webpack_require__(148); +var BaseAnimation = __webpack_require__(151); var Class = __webpack_require__(0); var Events = __webpack_require__(111); @@ -109702,14 +112495,14 @@ var Animation = new Class({ /** * Sets an animation to be played immediately after the current one completes. - * + * * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. - * + * * An animation set to repeat forever will never enter a completed state. - * + * * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. - * + * * Call this method with no arguments to reset the chained animation. * * @method Phaser.GameObjects.Components.Animation#chain @@ -109901,7 +112694,7 @@ var Animation = new Class({ /** * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. - * + * * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. * * @method Phaser.GameObjects.Components.Animation#play @@ -109975,9 +112768,9 @@ var Animation = new Class({ * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. * * @method Phaser.GameObjects.Components.Animation#_startAnimation - * @fires Phaser.Animations.Events#START_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_START_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_START_KEY_ANIMATION_EVENT + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.12.0 * * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. @@ -110182,9 +112975,9 @@ var Animation = new Class({ * Restarts the current animation from its beginning, optionally including its delay value. * * @method Phaser.GameObjects.Components.Animation#restart - * @fires Phaser.Animations.Events#RESTART_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_RESTART_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_RESTART_KEY_ANIMATION_EVENT + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART * @since 3.0.0 * * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. @@ -110221,9 +113014,9 @@ var Animation = new Class({ /** * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. - * + * * If no animation is set, no event will be dispatched. - * + * * If there is another animation queued (via the `chain` method) then it will start playing immediately. * * @method Phaser.GameObjects.Components.Animation#stop @@ -110247,7 +113040,7 @@ var Animation = new Class({ anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); - + gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); } @@ -110425,13 +113218,16 @@ var Animation = new Class({ gameObject.setSizeToFrame(); - if (animationFrame.frame.customPivot) + if (gameObject._originComponent) { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } } return gameObject; @@ -110441,8 +113237,8 @@ var Animation = new Class({ * Internal frame change handler. * * @method Phaser.GameObjects.Components.Animation#updateFrame - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE_EVENT - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE_EVENT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE * @private * @since 3.0.0 * @@ -110475,7 +113271,7 @@ var Animation = new Class({ /** * Advances the animation to the next frame, regardless of the time or animation state. * If the animation is set to repeat, or yoyo, this will still take effect. - * + * * Calling this does not change the direction of the animation. I.e. if it was currently * playing in reverse, calling this method doesn't then change the direction to forwards. * @@ -110497,7 +113293,7 @@ var Animation = new Class({ /** * Advances the animation to the previous frame, regardless of the time or animation state. * If the animation is set to repeat, or yoyo, this will still take effect. - * + * * Calling this does not change the direction of the animation. I.e. if it was currently * playing in forwards, calling this method doesn't then change the direction to backwards. * @@ -110575,7 +113371,7 @@ module.exports = Animation; /***/ }), -/* 499 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110585,13 +113381,13 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(500); -var CameraEvents = __webpack_require__(48); +var CanvasSnapshot = __webpack_require__(505); +var CameraEvents = __webpack_require__(36); var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); -var GetBlendModes = __webpack_require__(501); +var CONST = __webpack_require__(33); +var GetBlendModes = __webpack_require__(506); var ScaleEvents = __webpack_require__(92); -var TransformMatrix = __webpack_require__(32); +var TransformMatrix = __webpack_require__(29); /** * @classdesc @@ -111036,7 +113832,10 @@ var CanvasRenderer = new Class({ { camera.emit(CameraEvents.POST_RENDER, camera); - scene.sys.context.drawImage(camera.canvas, cx, cy); + if (camera.renderToGame) + { + scene.sys.context.drawImage(camera.canvas, cx, cy); + } } }, @@ -111369,7 +114168,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 500 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111379,7 +114178,7 @@ module.exports = CanvasRenderer; */ var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); var GetFastValue = __webpack_require__(2); /** @@ -111462,7 +114261,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 501 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111472,7 +114271,7 @@ module.exports = CanvasSnapshot; */ var modes = __webpack_require__(52); -var CanvasFeatures = __webpack_require__(313); +var CanvasFeatures = __webpack_require__(316); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -111526,7 +114325,7 @@ module.exports = GetBlendModes; /***/ }), -/* 502 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -111537,23 +114336,24 @@ module.exports = GetBlendModes; */ var BaseCamera = __webpack_require__(91); -var CameraEvents = __webpack_require__(48); +var CameraEvents = __webpack_require__(36); var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); -var GameEvents = __webpack_require__(18); -var IsSizePowerOfTwo = __webpack_require__(118); +var CONST = __webpack_require__(33); +var GameEvents = __webpack_require__(20); +var IsSizePowerOfTwo = __webpack_require__(120); var NOOP = __webpack_require__(1); var ScaleEvents = __webpack_require__(92); -var SpliceOne = __webpack_require__(79); -var TextureEvents = __webpack_require__(119); -var TransformMatrix = __webpack_require__(32); -var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(503); +var SpliceOne = __webpack_require__(80); +var TextureEvents = __webpack_require__(121); +var TransformMatrix = __webpack_require__(29); +var Utils = __webpack_require__(9); +var WebGLSnapshot = __webpack_require__(508); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(504); -var ForwardDiffuseLightPipeline = __webpack_require__(505); -var TextureTintPipeline = __webpack_require__(235); +var BitmapMaskPipeline = __webpack_require__(509); +var ForwardDiffuseLightPipeline = __webpack_require__(510); +var TextureTintPipeline = __webpack_require__(237); +var TextureTintStripPipeline = __webpack_require__(511); /** * @callback WebGLContextCallback @@ -112242,6 +115042,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 })); @@ -113452,6 +116253,8 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { + this.setPipeline(this.pipelines.TextureTintPipeline); + var TextureTintPipeline = this.pipelines.TextureTintPipeline; camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); @@ -113469,33 +116272,36 @@ var WebGLRenderer = new Class({ camera.emit(CameraEvents.POST_RENDER, camera); - TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + if (camera.renderToGame) + { + TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); - var getTint = Utils.getTintAppendFloatAlpha; - - var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; - - pipeline.batchTexture( - camera, - camera.glTexture, - camera.width, camera.height, - camera.x, camera.y, - camera.width, camera.height, - camera.zoom, camera.zoom, - camera.rotation, - camera.flipX, !camera.flipY, - 1, 1, - 0, 0, - 0, 0, camera.width, camera.height, - getTint(camera._tintTL, camera._alphaTL), - getTint(camera._tintTR, camera._alphaTR), - getTint(camera._tintBL, camera._alphaBL), - getTint(camera._tintBR, camera._alphaBR), - (camera._isTinted && camera.tintFill), - 0, 0, - this.defaultCamera, - null - ); + var getTint = Utils.getTintAppendFloatAlpha; + + var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + + pipeline.batchTexture( + camera, + camera.glTexture, + camera.width, camera.height, + camera.x, camera.y, + camera.width, camera.height, + camera.zoom, camera.zoom, + camera.rotation, + camera.flipX, !camera.flipY, + 1, 1, + 0, 0, + 0, 0, camera.width, camera.height, + getTint(camera._tintTL, camera._alphaTL), + getTint(camera._tintTR, camera._alphaTR), + getTint(camera._tintBL, camera._alphaBL), + getTint(camera._tintBR, camera._alphaBR), + (camera._isTinted && camera.tintFill), + 0, 0, + this.defaultCamera, + null + ); + } // Force clear the current texture so that items next in the batch (like Graphics) don't try and use it this.setBlankTexture(true); @@ -114073,14 +116879,16 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets a 1f uniform value on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] + * @param {number} x - The 1f value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -114094,15 +116902,17 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the 2f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The 2f x value to set on the named uniform. + * @param {number} y - The 2f y value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -114116,16 +116926,18 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the 3f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} z - [description] + * @param {number} x - The 3f x value to set on the named uniform. + * @param {number} y - The 3f y value to set on the named uniform. + * @param {number} z - The 3f z value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -114139,17 +116951,19 @@ var WebGLRenderer = new Class({ }, /** - * Sets uniform of a WebGLProgram + * Sets the 4f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - X component - * @param {number} y - Y component - * @param {number} z - Z component - * @param {number} w - W component + * @param {number} x - The 4f x value to set on the named uniform. + * @param {number} y - The 4f y value to set on the named uniform. + * @param {number} z - The 4f z value to set on the named uniform. + * @param {number} w - The 4f w value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -114163,7 +116977,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 1fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v * @since 3.13.0 @@ -114184,7 +117000,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 2fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v * @since 3.13.0 @@ -114205,7 +117023,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 3fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v * @since 3.13.0 @@ -114226,7 +117046,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 4fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v * @since 3.13.0 @@ -114248,14 +117070,16 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets a 1i uniform value on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - [description] + * @param {integer} x - The 1i value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -114269,15 +117093,17 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 2i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component - * @param {integer} y - The new Y component + * @param {integer} x - The 2i x value to set on the named uniform. + * @param {integer} y - The 2i y value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -114291,16 +117117,18 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 3i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component - * @param {integer} y - The new Y component - * @param {integer} z - The new Z component + * @param {integer} x - The 3i x value to set on the named uniform. + * @param {integer} y - The 3i y value to set on the named uniform. + * @param {integer} z - The 3i z value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -114314,17 +117142,19 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 4i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - X component - * @param {integer} y - Y component - * @param {integer} z - Z component - * @param {integer} w - W component + * @param {integer} x - The 4i x value to set on the named uniform. + * @param {integer} y - The 4i y value to set on the named uniform. + * @param {integer} z - The 4i z value to set on the named uniform. + * @param {integer} w - The 4i w value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -114338,7 +117168,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a 2x2 matrix uniform variable in the given WebGLProgram. + * Sets the value of a matrix 2fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2 * @since 3.0.0 @@ -114346,7 +117178,7 @@ var WebGLRenderer = new Class({ * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. - * @param {Float32Array} matrix - The new matrix value. + * @param {Float32Array} matrix - A Float32Array or sequence of 4 float values. * * @return {this} This WebGL Renderer instance. */ @@ -114360,15 +117192,17 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the value of a matrix 3fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - [description] - * @param {Float32Array} matrix - [description] + * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. + * @param {Float32Array} matrix - A Float32Array or sequence of 9 float values. * * @return {this} This WebGL Renderer instance. */ @@ -114382,15 +117216,17 @@ var WebGLRenderer = new Class({ }, /** - * Sets uniform of a WebGLProgram + * Sets the value of a matrix 4fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Is the matrix transposed - * @param {Float32Array} matrix - Matrix data + * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. + * @param {Float32Array} matrix - A Float32Array or sequence of 16 float values. * * @return {this} This WebGL Renderer instance. */ @@ -114480,7 +117316,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 503 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114490,7 +117326,7 @@ module.exports = WebGLRenderer; */ var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); var GetFastValue = __webpack_require__(2); /** @@ -114590,7 +117426,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 504 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114601,9 +117437,9 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(776); -var ShaderSourceVS = __webpack_require__(777); -var WebGLPipeline = __webpack_require__(234); +var ShaderSourceFS = __webpack_require__(785); +var ShaderSourceVS = __webpack_require__(786); +var WebGLPipeline = __webpack_require__(147); /** * @classdesc @@ -114721,21 +117557,23 @@ var BitmapMaskPipeline = new Class({ }, /** - * [description] + * Resizes this pipeline and updates the projection. * * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize * @since 3.0.0 * - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} resolution - [description] + * @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.resolutionDirty = true; + return this; }, @@ -114748,7 +117586,7 @@ var BitmapMaskPipeline = new Class({ * * @param {Phaser.GameObjects.GameObject} mask - GameObject used as mask. * @param {Phaser.GameObjects.GameObject} maskedObject - GameObject masked by the mask GameObject. - * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera rendering the current mask. */ beginMask: function (mask, maskedObject, camera) { @@ -114853,7 +117691,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 505 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114864,8 +117702,8 @@ module.exports = BitmapMaskPipeline; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(778); -var TextureTintPipeline = __webpack_require__(235); +var ShaderSourceFS = __webpack_require__(787); +var TextureTintPipeline = __webpack_require__(237); var LIGHT_COUNT = 10; @@ -115374,761 +118212,421 @@ module.exports = ForwardDiffuseLightPipeline; /***/ }), -/* 506 */ -/***/ (function(module, exports) { +/* 511 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(2); +var ModelViewProjection = __webpack_require__(238); +var ShaderSourceFS = __webpack_require__(339); +var ShaderSourceVS = __webpack_require__(340); +var TransformMatrix = __webpack_require__(29); +var WebGLPipeline = __webpack_require__(147); + /** - * Implements a model view projection matrices. - * Pipelines can implement this for doing 2D and 3D rendering. + * @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. * - * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection - * @since 3.0.0 + * @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 ModelViewProjection = { +var TextureTintStripPipeline = new Class({ - /** - * Dirty flag for checking if model matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - modelMatrixDirty: false, + Extends: WebGLPipeline, - /** - * Dirty flag for checking if view matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - viewMatrixDirty: false, + Mixins: [ + ModelViewProjection + ], - /** - * Dirty flag for checking if projection matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - projectionMatrixDirty: false, + initialize: - /** - * Model matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - modelMatrix: null, - - /** - * View matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - viewMatrix: null, - - /** - * Projection matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - projectionMatrix: null, - - /** - * Initializes MVP matrices with an identity matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit - * @since 3.0.0 - */ - mvpInit: function () + function TextureTintStripPipeline (config) { - this.modelMatrixDirty = true; - this.viewMatrixDirty = true; - this.projectionMatrixDirty = true; - - 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 - ]); - + 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; }, /** - * If dirty flags are set then the matrices are uploaded to the GPU. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate - * @since 3.0.0 + * 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. */ - mvpUpdate: function () + resize: function (width, height, resolution) { - var program = this.program; + WebGLPipeline.prototype.resize.call(this, width, height, resolution); - if (this.modelMatrixDirty) - { - this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); - this.modelMatrixDirty = false; - } - - if (this.viewMatrixDirty) - { - this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); - this.viewMatrixDirty = false; - } + this.projOrtho(0, this.width, this.height, 0, -1000.0, 1000.0); - if (this.projectionMatrixDirty) + 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.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); - this.projectionMatrixDirty = false; + this.pushBatch(texture, unit); } return this; }, /** - * Loads an identity matrix to the model matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity - * @since 3.0.0 + * 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`. */ - modelIdentity: function () + requireTextureBatch: function (texture, unit) { - var modelMatrix = this.modelMatrix; - - modelMatrix[0] = 1; - modelMatrix[1] = 0; - modelMatrix[2] = 0; - modelMatrix[3] = 0; - modelMatrix[4] = 0; - modelMatrix[5] = 1; - modelMatrix[6] = 0; - modelMatrix[7] = 0; - modelMatrix[8] = 0; - modelMatrix[9] = 0; - modelMatrix[10] = 1; - modelMatrix[11] = 0; - modelMatrix[12] = 0; - modelMatrix[13] = 0; - modelMatrix[14] = 0; - modelMatrix[15] = 1; + var batches = this.batches; + var batchLength = batches.length; - this.modelMatrixDirty = true; - - return this; + 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; }, /** - * Scale model matrix + * 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 * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. + * @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. */ - modelScale: function (x, y, z) + pushBatch: function (texture, unit) { - var modelMatrix = this.modelMatrix; + if (unit === 0) + { + this.batches.push({ + first: this.vertexCount, + texture: texture, + textures: [] + }); + } + else + { + var textures = []; - modelMatrix[0] = modelMatrix[0] * x; - modelMatrix[1] = modelMatrix[1] * x; - modelMatrix[2] = modelMatrix[2] * x; - modelMatrix[3] = modelMatrix[3] * x; - modelMatrix[4] = modelMatrix[4] * y; - modelMatrix[5] = modelMatrix[5] * y; - modelMatrix[6] = modelMatrix[6] * y; - modelMatrix[7] = modelMatrix[7] * y; - modelMatrix[8] = modelMatrix[8] * z; - modelMatrix[9] = modelMatrix[9] * z; - modelMatrix[10] = modelMatrix[10] * z; - modelMatrix[11] = modelMatrix[11] * z; - - this.modelMatrixDirty = true; + textures[unit - 1] = texture; - return this; + this.batches.push({ + first: this.vertexCount, + texture: null, + textures: textures + }); + } }, /** - * Translate model matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate - * @since 3.0.0 + * Uploads the vertex data and emits a draw call for the current batch of vertices. * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#flush + * @since 3.23.0 * - * @return {this} This Model View Projection. + * @return {this} This WebGLPipeline instance. */ - modelTranslate: function (x, y, z) + flush: function () { - var modelMatrix = this.modelMatrix; + if (this.flushLocked) + { + return this; + } - modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12]; - modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13]; - modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14]; - modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15]; + this.flushLocked = true; - this.modelMatrixDirty = true; + var gl = this.gl; + var vertexCount = this.vertexCount; + var topology = this.topology; + var vertexSize = this.vertexSize; + var renderer = this.renderer; - return this; - }, + var batches = this.batches; + var batchCount = batches.length; + var batchVertexCount = 0; + var batch = null; + var batchNext; + var textureIndex; + var nTexture; - /** - * Rotates the model matrix in the X axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateX: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a10 = modelMatrix[4]; - var a11 = modelMatrix[5]; - var a12 = modelMatrix[6]; - var a13 = modelMatrix[7]; - var a20 = modelMatrix[8]; - var a21 = modelMatrix[9]; - var a22 = modelMatrix[10]; - var a23 = modelMatrix[11]; + if (batchCount === 0 || vertexCount === 0) + { + this.flushLocked = false; - modelMatrix[4] = a10 * c + a20 * s; - modelMatrix[5] = a11 * c + a21 * s; - modelMatrix[6] = a12 * c + a22 * s; - modelMatrix[7] = a13 * c + a23 * s; - modelMatrix[8] = a20 * c - a10 * s; - modelMatrix[9] = a21 * c - a11 * s; - modelMatrix[10] = a22 * c - a12 * s; - modelMatrix[11] = a23 * c - a13 * s; + return this; + } - this.modelMatrixDirty = true; + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - return this; - }, + // Process the TEXTURE BATCHES - /** - * Rotates the model matrix in the Y axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateY: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = modelMatrix[0]; - var a01 = modelMatrix[1]; - var a02 = modelMatrix[2]; - var a03 = modelMatrix[3]; - var a20 = modelMatrix[8]; - var a21 = modelMatrix[9]; - var a22 = modelMatrix[10]; - var a23 = modelMatrix[11]; + for (var index = 0; index < batchCount - 1; index++) + { + batch = batches[index]; + batchNext = batches[index + 1]; - modelMatrix[0] = a00 * c - a20 * s; - modelMatrix[1] = a01 * c - a21 * s; - modelMatrix[2] = a02 * c - a22 * s; - modelMatrix[3] = a03 * c - a23 * s; - modelMatrix[8] = a00 * s + a20 * c; - modelMatrix[9] = a01 * s + a21 * c; - modelMatrix[10] = a02 * s + a22 * c; - modelMatrix[11] = a03 * s + a23 * c; + // 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]; - this.modelMatrixDirty = true; - - return this; - }, - - /** - * Rotates the model matrix in the Z axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateZ: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = modelMatrix[0]; - var a01 = modelMatrix[1]; - var a02 = modelMatrix[2]; - var a03 = modelMatrix[3]; - var a10 = modelMatrix[4]; - var a11 = modelMatrix[5]; - var a12 = modelMatrix[6]; - var a13 = modelMatrix[7]; + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex, false); + } + } - modelMatrix[0] = a00 * c + a10 * s; - modelMatrix[1] = a01 * c + a11 * s; - modelMatrix[2] = a02 * c + a12 * s; - modelMatrix[3] = a03 * c + a13 * s; - modelMatrix[4] = a10 * c - a00 * s; - modelMatrix[5] = a11 * c - a01 * s; - modelMatrix[6] = a12 * c - a02 * s; - modelMatrix[7] = a13 * c - a03 * s; + gl.activeTexture(gl.TEXTURE0); + } - this.modelMatrixDirty = true; + batchVertexCount = batchNext.first - batch.first; - return this; - }, + // Bail out if texture property is null (i.e. if a texture unit > 0) + if (batch.texture === null || batchVertexCount <= 0) + { + continue; + } - /** - * Loads identity matrix into the view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity - * @since 3.0.0 - * - * @return {this} This Model View Projection. - */ - viewIdentity: function () - { - var viewMatrix = this.viewMatrix; - - viewMatrix[0] = 1; - viewMatrix[1] = 0; - viewMatrix[2] = 0; - viewMatrix[3] = 0; - viewMatrix[4] = 0; - viewMatrix[5] = 1; - viewMatrix[6] = 0; - viewMatrix[7] = 0; - viewMatrix[8] = 0; - viewMatrix[9] = 0; - viewMatrix[10] = 1; - viewMatrix[11] = 0; - viewMatrix[12] = 0; - viewMatrix[13] = 0; - viewMatrix[14] = 0; - viewMatrix[15] = 1; + renderer.setTexture2D(batch.texture, 0, false); - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Scales view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. - */ - viewScale: function (x, y, z) - { - var viewMatrix = this.viewMatrix; + gl.drawArrays(topology, batch.first, batchVertexCount); + } - viewMatrix[0] = viewMatrix[0] * x; - viewMatrix[1] = viewMatrix[1] * x; - viewMatrix[2] = viewMatrix[2] * x; - viewMatrix[3] = viewMatrix[3] * x; - viewMatrix[4] = viewMatrix[4] * y; - viewMatrix[5] = viewMatrix[5] * y; - viewMatrix[6] = viewMatrix[6] * y; - viewMatrix[7] = viewMatrix[7] * y; - viewMatrix[8] = viewMatrix[8] * z; - viewMatrix[9] = viewMatrix[9] * z; - viewMatrix[10] = viewMatrix[10] * z; - viewMatrix[11] = viewMatrix[11] * z; - - this.viewMatrixDirty = true; + // Left over data + batch = batches[batchCount - 1]; - return this; - }, + // Multi-texture check (for non-zero texture units) - /** - * Translates view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. - */ - viewTranslate: function (x, y, z) - { - var viewMatrix = this.viewMatrix; + if (batch.textures.length > 0) + { + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + nTexture = batch.textures[textureIndex]; - viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12]; - viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13]; - viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14]; - viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15]; + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex, false); + } + } - this.viewMatrixDirty = true; + gl.activeTexture(gl.TEXTURE0); + } - return this; - }, - - /** - * Rotates view matrix in the X axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateX: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a10 = viewMatrix[4]; - var a11 = viewMatrix[5]; - var a12 = viewMatrix[6]; - var a13 = viewMatrix[7]; - var a20 = viewMatrix[8]; - var a21 = viewMatrix[9]; - var a22 = viewMatrix[10]; - var a23 = viewMatrix[11]; + batchVertexCount = vertexCount - batch.first; - viewMatrix[4] = a10 * c + a20 * s; - viewMatrix[5] = a11 * c + a21 * s; - viewMatrix[6] = a12 * c + a22 * s; - viewMatrix[7] = a13 * c + a23 * s; - viewMatrix[8] = a20 * c - a10 * s; - viewMatrix[9] = a21 * c - a11 * s; - viewMatrix[10] = a22 * c - a12 * s; - viewMatrix[11] = a23 * c - a13 * s; + if (batch.texture && batchVertexCount > 0) + { + renderer.setTexture2D(batch.texture, 0, false); - this.viewMatrixDirty = true; + gl.drawArrays(topology, batch.first, batchVertexCount); + } - return this; - }, - - /** - * Rotates view matrix in the Y axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateY: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = viewMatrix[0]; - var a01 = viewMatrix[1]; - var a02 = viewMatrix[2]; - var a03 = viewMatrix[3]; - var a20 = viewMatrix[8]; - var a21 = viewMatrix[9]; - var a22 = viewMatrix[10]; - var a23 = viewMatrix[11]; + this.vertexCount = 0; - viewMatrix[0] = a00 * c - a20 * s; - viewMatrix[1] = a01 * c - a21 * s; - viewMatrix[2] = a02 * c - a22 * s; - viewMatrix[3] = a03 * c - a23 * s; - viewMatrix[8] = a00 * s + a20 * c; - viewMatrix[9] = a01 * s + a21 * c; - viewMatrix[10] = a02 * s + a22 * c; - viewMatrix[11] = a03 * s + a23 * c; + batches.length = 0; - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Rotates view matrix in the Z axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateZ: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = viewMatrix[0]; - var a01 = viewMatrix[1]; - var a02 = viewMatrix[2]; - var a03 = viewMatrix[3]; - var a10 = viewMatrix[4]; - var a11 = viewMatrix[5]; - var a12 = viewMatrix[6]; - var a13 = viewMatrix[7]; - - viewMatrix[0] = a00 * c + a10 * s; - viewMatrix[1] = a01 * c + a11 * s; - viewMatrix[2] = a02 * c + a12 * s; - viewMatrix[3] = a03 * c + a13 * s; - viewMatrix[4] = a10 * c - a00 * s; - viewMatrix[5] = a11 * c - a01 * s; - viewMatrix[6] = a12 * c - a02 * s; - viewMatrix[7] = a13 * c - a03 * s; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D - * @since 3.0.0 - * - * @param {Float32Array} matrix2D - The Matrix2D. - * - * @return {this} This Model View Projection. - */ - viewLoad2D: function (matrix2D) - { - var vm = this.viewMatrix; - - vm[0] = matrix2D[0]; - vm[1] = matrix2D[1]; - vm[2] = 0.0; - vm[3] = 0.0; - vm[4] = matrix2D[2]; - vm[5] = matrix2D[3]; - vm[6] = 0.0; - vm[7] = 0.0; - vm[8] = matrix2D[4]; - vm[9] = matrix2D[5]; - vm[10] = 1.0; - vm[11] = 0.0; - vm[12] = 0.0; - vm[13] = 0.0; - vm[14] = 0.0; - vm[15] = 1.0; - - this.viewMatrixDirty = true; - - return this; - }, - - - /** - * Copies a 4x4 matrix into the view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad - * @since 3.0.0 - * - * @param {Float32Array} matrix - The Matrix2D. - * - * @return {this} This Model View Projection. - */ - viewLoad: function (matrix) - { - var vm = this.viewMatrix; - - vm[0] = matrix[0]; - vm[1] = matrix[1]; - vm[2] = matrix[2]; - vm[3] = matrix[3]; - vm[4] = matrix[4]; - vm[5] = matrix[5]; - vm[6] = matrix[6]; - vm[7] = matrix[7]; - vm[8] = matrix[8]; - vm[9] = matrix[9]; - vm[10] = matrix[10]; - vm[11] = matrix[11]; - vm[12] = matrix[12]; - vm[13] = matrix[13]; - vm[14] = matrix[14]; - vm[15] = matrix[15]; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Loads identity matrix into the projection matrix. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity - * @since 3.0.0 - * - * @return {this} This Model View Projection. - */ - projIdentity: function () - { - var projectionMatrix = this.projectionMatrix; - - projectionMatrix[0] = 1; - projectionMatrix[1] = 0; - projectionMatrix[2] = 0; - projectionMatrix[3] = 0; - projectionMatrix[4] = 0; - projectionMatrix[5] = 1; - projectionMatrix[6] = 0; - projectionMatrix[7] = 0; - projectionMatrix[8] = 0; - projectionMatrix[9] = 0; - projectionMatrix[10] = 1; - projectionMatrix[11] = 0; - projectionMatrix[12] = 0; - projectionMatrix[13] = 0; - projectionMatrix[14] = 0; - projectionMatrix[15] = 1; - - this.projectionMatrixDirty = true; - - return this; - }, - - /** - * Sets up an orthographic projection matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho - * @since 3.0.0 - * - * @param {number} left - The left value. - * @param {number} right - The right value. - * @param {number} bottom - The bottom value. - * @param {number} top - The top value. - * @param {number} near - The near value. - * @param {number} far - The far value. - * - * @return {this} This Model View Projection. - */ - projOrtho: function (left, right, bottom, top, near, far) - { - var projectionMatrix = this.projectionMatrix; - var leftRight = 1.0 / (left - right); - var bottomTop = 1.0 / (bottom - top); - var nearFar = 1.0 / (near - far); - - projectionMatrix[0] = -2.0 * leftRight; - projectionMatrix[1] = 0.0; - projectionMatrix[2] = 0.0; - projectionMatrix[3] = 0.0; - projectionMatrix[4] = 0.0; - projectionMatrix[5] = -2.0 * bottomTop; - projectionMatrix[6] = 0.0; - projectionMatrix[7] = 0.0; - projectionMatrix[8] = 0.0; - projectionMatrix[9] = 0.0; - projectionMatrix[10] = 2.0 * nearFar; - projectionMatrix[11] = 0.0; - projectionMatrix[12] = (left + right) * leftRight; - projectionMatrix[13] = (top + bottom) * bottomTop; - projectionMatrix[14] = (far + near) * nearFar; - projectionMatrix[15] = 1.0; - - this.projectionMatrixDirty = true; - - return this; - }, - - /** - * Sets up a perspective projection matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp - * @since 3.0.0 - * - * @param {number} fovY - The fov value. - * @param {number} aspectRatio - The aspectRatio value. - * @param {number} near - The near value. - * @param {number} far - The far value. - * - * @return {this} This Model View Projection. - */ - projPersp: function (fovY, aspectRatio, near, far) - { - var projectionMatrix = this.projectionMatrix; - var fov = 1.0 / Math.tan(fovY / 2.0); - var nearFar = 1.0 / (near - far); - - projectionMatrix[0] = fov / aspectRatio; - projectionMatrix[1] = 0.0; - projectionMatrix[2] = 0.0; - projectionMatrix[3] = 0.0; - projectionMatrix[4] = 0.0; - projectionMatrix[5] = fov; - projectionMatrix[6] = 0.0; - projectionMatrix[7] = 0.0; - projectionMatrix[8] = 0.0; - projectionMatrix[9] = 0.0; - projectionMatrix[10] = (far + near) * nearFar; - projectionMatrix[11] = -1.0; - projectionMatrix[12] = 0.0; - projectionMatrix[13] = 0.0; - projectionMatrix[14] = (2.0 * far * near) * nearFar; - projectionMatrix[15] = 0.0; - - this.projectionMatrixDirty = true; + this.flushLocked = false; return this; } -}; -module.exports = ModelViewProjection; +}); + +module.exports = TextureTintStripPipeline; /***/ }), -/* 507 */, -/* 508 */, -/* 509 */, -/* 510 */, -/* 511 */ +/* 512 */, +/* 513 */, +/* 514 */, +/* 515 */, +/* 516 */ /***/ (function(module, exports) { var g; @@ -116154,21 +118652,21 @@ module.exports = g; /***/ }), -/* 512 */ +/* 517 */ /***/ (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); +__webpack_require__(521); +__webpack_require__(522); +__webpack_require__(523); +__webpack_require__(524); +__webpack_require__(525); /***/ }), -/* 513 */ +/* 518 */ /***/ (function(module, exports) { /** @@ -116208,7 +118706,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 514 */ +/* 519 */ /***/ (function(module, exports) { /** @@ -116224,7 +118722,7 @@ if (!Array.isArray) /***/ }), -/* 515 */ +/* 520 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -116411,7 +118909,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 516 */ +/* 521 */ /***/ (function(module, exports) { /** @@ -116426,7 +118924,7 @@ if (!window.console) /***/ }), -/* 517 */ +/* 522 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -116438,7 +118936,7 @@ if (!Math.trunc) { /***/ }), -/* 518 */ +/* 523 */ /***/ (function(module, exports) { /** @@ -116475,7 +118973,7 @@ if (!Math.trunc) { /***/ }), -/* 519 */ +/* 524 */ /***/ (function(module, exports) { // References: @@ -116532,7 +119030,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 520 */ +/* 525 */ /***/ (function(module, exports) { /** @@ -116585,7 +119083,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 521 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116594,7 +119092,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var QuickSet = __webpack_require__(239); +var QuickSet = __webpack_require__(242); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. @@ -116633,7 +119131,7 @@ module.exports = AlignTo; /***/ }), -/* 522 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116674,7 +119172,7 @@ module.exports = Angle; /***/ }), -/* 523 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -116713,7 +119211,7 @@ module.exports = Call; /***/ }), -/* 524 */ +/* 529 */ /***/ (function(module, exports) { /** @@ -116771,7 +119269,7 @@ module.exports = GetFirst; /***/ }), -/* 525 */ +/* 530 */ /***/ (function(module, exports) { /** @@ -116829,7 +119327,7 @@ module.exports = GetLast; /***/ }), -/* 526 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116838,8 +119336,8 @@ module.exports = GetLast; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(252); -var CONST = __webpack_require__(106); +var AlignIn = __webpack_require__(255); +var CONST = __webpack_require__(105); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); var Zone = __webpack_require__(110); @@ -116928,7 +119426,7 @@ module.exports = GridAlign; /***/ }), -/* 527 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116937,7 +119435,7 @@ module.exports = GridAlign; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 @@ -117223,7 +119721,7 @@ module.exports = Alpha; /***/ }), -/* 528 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -117250,7 +119748,7 @@ module.exports = 'add'; /***/ }), -/* 529 */ +/* 534 */ /***/ (function(module, exports) { /** @@ -117278,7 +119776,7 @@ module.exports = 'complete'; /***/ }), -/* 530 */ +/* 535 */ /***/ (function(module, exports) { /** @@ -117305,7 +119803,7 @@ module.exports = 'repeat'; /***/ }), -/* 531 */ +/* 536 */ /***/ (function(module, exports) { /** @@ -117333,7 +119831,7 @@ module.exports = 'restart'; /***/ }), -/* 532 */ +/* 537 */ /***/ (function(module, exports) { /** @@ -117361,7 +119859,7 @@ module.exports = 'start'; /***/ }), -/* 533 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -117385,7 +119883,7 @@ module.exports = 'pauseall'; /***/ }), -/* 534 */ +/* 539 */ /***/ (function(module, exports) { /** @@ -117409,7 +119907,7 @@ module.exports = 'remove'; /***/ }), -/* 535 */ +/* 540 */ /***/ (function(module, exports) { /** @@ -117432,7 +119930,7 @@ module.exports = 'resumeall'; /***/ }), -/* 536 */ +/* 541 */ /***/ (function(module, exports) { /** @@ -117461,7 +119959,7 @@ module.exports = 'animationcomplete'; /***/ }), -/* 537 */ +/* 542 */ /***/ (function(module, exports) { /** @@ -117489,7 +119987,7 @@ module.exports = 'animationcomplete-'; /***/ }), -/* 538 */ +/* 543 */ /***/ (function(module, exports) { /** @@ -117518,7 +120016,7 @@ module.exports = 'animationrepeat-'; /***/ }), -/* 539 */ +/* 544 */ /***/ (function(module, exports) { /** @@ -117546,7 +120044,7 @@ module.exports = 'animationrestart-'; /***/ }), -/* 540 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -117574,7 +120072,7 @@ module.exports = 'animationstart-'; /***/ }), -/* 541 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -117603,7 +120101,7 @@ module.exports = 'animationupdate-'; /***/ }), -/* 542 */ +/* 547 */ /***/ (function(module, exports) { /** @@ -117633,7 +120131,7 @@ module.exports = 'animationrepeat'; /***/ }), -/* 543 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -117662,7 +120160,7 @@ module.exports = 'animationrestart'; /***/ }), -/* 544 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -117691,7 +120189,7 @@ module.exports = 'animationstart'; /***/ }), -/* 545 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -117721,7 +120219,7 @@ module.exports = 'animationupdate'; /***/ }), -/* 546 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -117870,7 +120368,7 @@ module.exports = ComputedSize; /***/ }), -/* 547 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -117995,7 +120493,7 @@ module.exports = Crop; /***/ }), -/* 548 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -118159,7 +120657,7 @@ module.exports = Flip; /***/ }), -/* 549 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -118169,7 +120667,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(11); -var RotateAround = __webpack_require__(273); +var RotateAround = __webpack_require__(276); var Vector2 = __webpack_require__(3); /** @@ -118518,7 +121016,7 @@ module.exports = GetBounds; /***/ }), -/* 550 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -118541,7 +121039,7 @@ module.exports = 'blur'; /***/ }), -/* 551 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -118563,7 +121061,7 @@ module.exports = 'boot'; /***/ }), -/* 552 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -118586,7 +121084,7 @@ module.exports = 'contextlost'; /***/ }), -/* 553 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -118609,7 +121107,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 554 */ +/* 559 */ /***/ (function(module, exports) { /** @@ -118632,7 +121130,7 @@ module.exports = 'destroy'; /***/ }), -/* 555 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -118654,7 +121152,7 @@ module.exports = 'focus'; /***/ }), -/* 556 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -118680,7 +121178,7 @@ module.exports = 'hidden'; /***/ }), -/* 557 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -118701,7 +121199,7 @@ module.exports = 'pause'; /***/ }), -/* 558 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -118727,7 +121225,7 @@ module.exports = 'postrender'; /***/ }), -/* 559 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -118752,7 +121250,7 @@ module.exports = 'poststep'; /***/ }), -/* 560 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -118777,7 +121275,7 @@ module.exports = 'prerender'; /***/ }), -/* 561 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -118802,7 +121300,7 @@ module.exports = 'prestep'; /***/ }), -/* 562 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -118824,7 +121322,7 @@ module.exports = 'ready'; /***/ }), -/* 563 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -118845,7 +121343,7 @@ module.exports = 'resume'; /***/ }), -/* 564 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -118870,7 +121368,7 @@ module.exports = 'step'; /***/ }), -/* 565 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -118894,7 +121392,7 @@ module.exports = 'visible'; /***/ }), -/* 566 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -119097,7 +121595,7 @@ module.exports = Origin; /***/ }), -/* 567 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119172,6 +121670,15 @@ var PathFollower = { */ pathVector: null, + /** + * The distance the follower has traveled from the previous point to the current one, at the last update. + * + * @name Phaser.GameObjects.PathFollower#pathDelta + * @type {Phaser.Math.Vector2} + * @since 3.23.0 + */ + pathDelta: null, + /** * The Tween used for following the Path. * @@ -119212,7 +121719,7 @@ var PathFollower = { * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time. * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ setPath: function (path, config) { @@ -119244,7 +121751,7 @@ var PathFollower = { * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path. * @param {number} [offset=0] - Rotation offset in degrees. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ setRotateToPath: function (value, offset) { @@ -119283,7 +121790,7 @@ var PathFollower = { * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object. * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ startFollow: function (config, startAt) { @@ -119337,6 +121844,13 @@ var PathFollower = { this.pathVector = new Vector2(); } + if (!this.pathDelta) + { + this.pathDelta = new Vector2(); + } + + this.pathDelta.reset(); + this.pathTween = this.scene.sys.tweens.addCounter(config); // The starting point of the path, relative to this follower @@ -119373,7 +121887,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#pauseFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ pauseFollow: function () { @@ -119395,7 +121909,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#resumeFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ resumeFollow: function () { @@ -119417,7 +121931,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#stopFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ stopFollow: function () { @@ -119446,14 +121960,18 @@ var PathFollower = { if (tween) { var tweenData = tween.data[0]; + var pathDelta = this.pathDelta; var pathVector = this.pathVector; - if (tweenData.state !== TWEEN_CONST.COMPLETE) + pathDelta.copy(pathVector).negate(); + + if (tweenData.state === TWEEN_CONST.COMPLETE) { this.path.getPoint(1, pathVector); + pathDelta.add(pathVector); pathVector.add(this.pathOffset); - + this.setPosition(pathVector.x, pathVector.y); return; @@ -119466,6 +121984,7 @@ var PathFollower = { this.path.getPoint(tween.getValue(), pathVector); + pathDelta.add(pathVector); pathVector.add(this.pathOffset); var oldX = this.x; @@ -119503,7 +122022,7 @@ module.exports = PathFollower; /***/ }), -/* 568 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -119690,7 +122209,7 @@ module.exports = Size; /***/ }), -/* 569 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -119820,7 +122339,7 @@ module.exports = Texture; /***/ }), -/* 570 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -120028,7 +122547,7 @@ module.exports = TextureCrop; /***/ }), -/* 571 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -120368,7 +122887,7 @@ module.exports = Tint; /***/ }), -/* 572 */ +/* 577 */ /***/ (function(module, exports) { /** @@ -120400,7 +122919,7 @@ module.exports = 'changedata'; /***/ }), -/* 573 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -120430,7 +122949,7 @@ module.exports = 'changedata-'; /***/ }), -/* 574 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -120458,7 +122977,7 @@ module.exports = 'removedata'; /***/ }), -/* 575 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -120486,7 +123005,7 @@ module.exports = 'setdata'; /***/ }), -/* 576 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -120511,7 +123030,7 @@ module.exports = 'destroy'; /***/ }), -/* 577 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -120543,7 +123062,7 @@ module.exports = 'complete'; /***/ }), -/* 578 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -120572,7 +123091,7 @@ module.exports = 'created'; /***/ }), -/* 579 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -120598,7 +123117,7 @@ module.exports = 'error'; /***/ }), -/* 580 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -120630,7 +123149,7 @@ module.exports = 'loop'; /***/ }), -/* 581 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -120658,7 +123177,7 @@ module.exports = 'play'; /***/ }), -/* 582 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -120683,7 +123202,7 @@ module.exports = 'seeked'; /***/ }), -/* 583 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -120709,7 +123228,7 @@ module.exports = 'seeking'; /***/ }), -/* 584 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -120735,7 +123254,7 @@ module.exports = 'stop'; /***/ }), -/* 585 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -120761,7 +123280,7 @@ module.exports = 'timeout'; /***/ }), -/* 586 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -120787,7 +123306,7 @@ module.exports = 'unlocked'; /***/ }), -/* 587 */ +/* 592 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120828,7 +123347,7 @@ module.exports = IncAlpha; /***/ }), -/* 588 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120869,7 +123388,7 @@ module.exports = IncX; /***/ }), -/* 589 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120916,7 +123435,7 @@ module.exports = IncXY; /***/ }), -/* 590 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120957,7 +123476,7 @@ module.exports = IncY; /***/ }), -/* 591 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -121006,7 +123525,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 592 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -121058,7 +123577,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 593 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121067,7 +123586,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(150); +var GetPoints = __webpack_require__(153); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -121102,7 +123621,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 594 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121111,9 +123630,9 @@ module.exports = PlaceOnLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(282); -var RotateLeft = __webpack_require__(283); -var RotateRight = __webpack_require__(284); +var MarchingAnts = __webpack_require__(285); +var RotateLeft = __webpack_require__(286); +var RotateRight = __webpack_require__(287); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -121160,7 +123679,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 595 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121169,7 +123688,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(285); +var BresenhamPoints = __webpack_require__(288); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -121221,7 +123740,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 596 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -121258,7 +123777,7 @@ module.exports = PlayAnimation; /***/ }), -/* 597 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121267,7 +123786,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(147); +var Random = __webpack_require__(150); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -121298,7 +123817,7 @@ module.exports = RandomCircle; /***/ }), -/* 598 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121307,7 +123826,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(154); +var Random = __webpack_require__(157); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -121338,7 +123857,7 @@ module.exports = RandomEllipse; /***/ }), -/* 599 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121347,7 +123866,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(151); +var Random = __webpack_require__(154); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -121378,7 +123897,7 @@ module.exports = RandomLine; /***/ }), -/* 600 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121387,7 +123906,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(152); +var Random = __webpack_require__(155); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -121416,7 +123935,7 @@ module.exports = RandomRectangle; /***/ }), -/* 601 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121425,7 +123944,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(155); +var Random = __webpack_require__(158); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -121456,7 +123975,7 @@ module.exports = RandomTriangle; /***/ }), -/* 602 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121497,7 +124016,7 @@ module.exports = Rotate; /***/ }), -/* 603 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121506,7 +124025,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(156); +var RotateAroundDistance = __webpack_require__(159); var DistanceBetween = __webpack_require__(53); /** @@ -121543,7 +124062,7 @@ module.exports = RotateAround; /***/ }), -/* 604 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121552,7 +124071,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(156); +var MathRotateAroundDistance = __webpack_require__(159); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -121592,7 +124111,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 605 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121633,7 +124152,7 @@ module.exports = ScaleX; /***/ }), -/* 606 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121680,7 +124199,7 @@ module.exports = ScaleXY; /***/ }), -/* 607 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121721,7 +124240,7 @@ module.exports = ScaleY; /***/ }), -/* 608 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121762,7 +124281,7 @@ module.exports = SetAlpha; /***/ }), -/* 609 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121802,7 +124321,7 @@ module.exports = SetBlendMode; /***/ }), -/* 610 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121843,7 +124362,7 @@ module.exports = SetDepth; /***/ }), -/* 611 */ +/* 616 */ /***/ (function(module, exports) { /** @@ -121882,7 +124401,7 @@ module.exports = SetHitArea; /***/ }), -/* 612 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121929,7 +124448,7 @@ module.exports = SetOrigin; /***/ }), -/* 613 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121970,7 +124489,7 @@ module.exports = SetRotation; /***/ }), -/* 614 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122017,7 +124536,7 @@ module.exports = SetScale; /***/ }), -/* 615 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122058,7 +124577,7 @@ module.exports = SetScaleX; /***/ }), -/* 616 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122099,7 +124618,7 @@ module.exports = SetScaleY; /***/ }), -/* 617 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122146,7 +124665,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 618 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122187,7 +124706,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 619 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122228,7 +124747,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 620 */ +/* 625 */ /***/ (function(module, exports) { /** @@ -122267,7 +124786,7 @@ module.exports = SetTint; /***/ }), -/* 621 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122305,7 +124824,7 @@ module.exports = SetVisible; /***/ }), -/* 622 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122346,7 +124865,7 @@ module.exports = SetX; /***/ }), -/* 623 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122393,7 +124912,7 @@ module.exports = SetXY; /***/ }), -/* 624 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122434,7 +124953,7 @@ module.exports = SetY; /***/ }), -/* 625 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122564,7 +125083,7 @@ module.exports = ShiftPosition; /***/ }), -/* 626 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122597,7 +125116,7 @@ module.exports = Shuffle; /***/ }), -/* 627 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122606,7 +125125,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(157); +var MathSmootherStep = __webpack_require__(160); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -122655,7 +125174,7 @@ module.exports = SmootherStep; /***/ }), -/* 628 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122664,7 +125183,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(158); +var MathSmoothStep = __webpack_require__(161); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -122713,7 +125232,7 @@ module.exports = SmoothStep; /***/ }), -/* 629 */ +/* 634 */ /***/ (function(module, exports) { /** @@ -122776,7 +125295,7 @@ module.exports = Spread; /***/ }), -/* 630 */ +/* 635 */ /***/ (function(module, exports) { /** @@ -122812,7 +125331,7 @@ module.exports = ToggleVisible; /***/ }), -/* 631 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122861,7 +125380,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 632 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122876,16 +125395,16 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(148), - AnimationFrame: __webpack_require__(268), - AnimationManager: __webpack_require__(286), + Animation: __webpack_require__(151), + AnimationFrame: __webpack_require__(271), + AnimationManager: __webpack_require__(289), Events: __webpack_require__(111) }; /***/ }), -/* 633 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122900,15 +125419,15 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(287), - CacheManager: __webpack_require__(289), - Events: __webpack_require__(288) + BaseCache: __webpack_require__(290), + CacheManager: __webpack_require__(292), + Events: __webpack_require__(291) }; /***/ }), -/* 634 */ +/* 639 */ /***/ (function(module, exports) { /** @@ -122933,7 +125452,7 @@ module.exports = 'add'; /***/ }), -/* 635 */ +/* 640 */ /***/ (function(module, exports) { /** @@ -122958,7 +125477,7 @@ module.exports = 'remove'; /***/ }), -/* 636 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122977,14 +125496,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(637), - Scene2D: __webpack_require__(640) + Controls: __webpack_require__(642), + Scene2D: __webpack_require__(645) }; /***/ }), -/* 637 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122999,14 +125518,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(638), - SmoothedKeyControl: __webpack_require__(639) + FixedKeyControl: __webpack_require__(643), + SmoothedKeyControl: __webpack_require__(644) }; /***/ }), -/* 638 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123190,7 +125709,7 @@ var FixedKeyControl = new Class({ * @method Phaser.Cameras.Controls.FixedKeyControl#start * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ start: function () { @@ -123205,7 +125724,7 @@ var FixedKeyControl = new Class({ * @method Phaser.Cameras.Controls.FixedKeyControl#stop * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ stop: function () { @@ -123222,7 +125741,7 @@ var FixedKeyControl = new Class({ * * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to. * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ setCamera: function (camera) { @@ -123312,7 +125831,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 639 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123590,7 +126109,7 @@ var SmoothedKeyControl = new Class({ * @method Phaser.Cameras.Controls.SmoothedKeyControl#start * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ start: function () { @@ -123605,7 +126124,7 @@ var SmoothedKeyControl = new Class({ * @method Phaser.Cameras.Controls.SmoothedKeyControl#stop * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ stop: function () { @@ -123622,7 +126141,7 @@ var SmoothedKeyControl = new Class({ * * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to. * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ setCamera: function (camera) { @@ -123795,7 +126314,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 640 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123810,17 +126329,17 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(290), + Camera: __webpack_require__(293), BaseCamera: __webpack_require__(91), - CameraManager: __webpack_require__(693), - Effects: __webpack_require__(298), - Events: __webpack_require__(48) + CameraManager: __webpack_require__(701), + Effects: __webpack_require__(301), + Events: __webpack_require__(36) }; /***/ }), -/* 641 */ +/* 646 */ /***/ (function(module, exports) { /** @@ -123843,7 +126362,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 642 */ +/* 647 */ /***/ (function(module, exports) { /** @@ -123869,7 +126388,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 643 */ +/* 648 */ /***/ (function(module, exports) { /** @@ -123899,7 +126418,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 644 */ +/* 649 */ /***/ (function(module, exports) { /** @@ -123925,7 +126444,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 645 */ +/* 650 */ /***/ (function(module, exports) { /** @@ -123955,7 +126474,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 646 */ +/* 651 */ /***/ (function(module, exports) { /** @@ -123979,7 +126498,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 647 */ +/* 652 */ /***/ (function(module, exports) { /** @@ -124007,7 +126526,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 648 */ +/* 653 */ /***/ (function(module, exports) { /** @@ -124031,7 +126550,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 649 */ +/* 654 */ /***/ (function(module, exports) { /** @@ -124058,7 +126577,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 650 */ +/* 655 */ /***/ (function(module, exports) { /** @@ -124084,7 +126603,7 @@ module.exports = 'postrender'; /***/ }), -/* 651 */ +/* 656 */ /***/ (function(module, exports) { /** @@ -124110,7 +126629,57 @@ module.exports = 'prerender'; /***/ }), -/* 652 */ +/* 657 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Camera Rotate Complete Event. + * + * This event is dispatched by a Camera instance when the Rotate Effect completes. + * + * @event Phaser.Cameras.Scene2D.Events#ROTATE_COMPLETE + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on. + * @param {Phaser.Cameras.Scene2D.Effects.RotateTo} effect - A reference to the effect instance. + */ +module.exports = 'camerarotatecomplete'; + + +/***/ }), +/* 658 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Camera Rotate Start Event. + * + * This event is dispatched by a Camera instance when the Rotate Effect starts. + * + * @event Phaser.Cameras.Scene2D.Events#ROTATE_START + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on. + * @param {Phaser.Cameras.Scene2D.Effects.RotateTo} effect - A reference to the effect instance. + * @param {integer} duration - The duration of the effect. + * @param {number} destination - The destination value. + */ +module.exports = 'camerarotatestart'; + + +/***/ }), +/* 659 */ /***/ (function(module, exports) { /** @@ -124134,7 +126703,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 653 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -124160,7 +126729,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 654 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -124184,7 +126753,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 655 */ +/* 662 */ /***/ (function(module, exports) { /** @@ -124210,7 +126779,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 656 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124219,9 +126788,9 @@ module.exports = 'camerazoomstart'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(48); +var Events = __webpack_require__(36); /** * @classdesc @@ -124598,7 +127167,7 @@ module.exports = Fade; /***/ }), -/* 657 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124607,9 +127176,9 @@ module.exports = Fade; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(48); +var Events = __webpack_require__(36); /** * @classdesc @@ -124949,7 +127518,7 @@ module.exports = Flash; /***/ }), -/* 658 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124958,10 +127527,10 @@ module.exports = Flash; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(166); -var Events = __webpack_require__(48); +var EaseMap = __webpack_require__(115); +var Events = __webpack_require__(36); var Vector2 = __webpack_require__(3); /** @@ -125274,7 +127843,7 @@ module.exports = Pan; /***/ }), -/* 659 */ +/* 666 */ /***/ (function(module, exports) { /** @@ -125305,7 +127874,7 @@ module.exports = In; /***/ }), -/* 660 */ +/* 667 */ /***/ (function(module, exports) { /** @@ -125336,7 +127905,7 @@ module.exports = Out; /***/ }), -/* 661 */ +/* 668 */ /***/ (function(module, exports) { /** @@ -125376,7 +127945,7 @@ module.exports = InOut; /***/ }), -/* 662 */ +/* 669 */ /***/ (function(module, exports) { /** @@ -125421,7 +127990,7 @@ module.exports = In; /***/ }), -/* 663 */ +/* 670 */ /***/ (function(module, exports) { /** @@ -125464,7 +128033,7 @@ module.exports = Out; /***/ }), -/* 664 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -125528,7 +128097,7 @@ module.exports = InOut; /***/ }), -/* 665 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -125556,7 +128125,7 @@ module.exports = In; /***/ }), -/* 666 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -125584,7 +128153,7 @@ module.exports = Out; /***/ }), -/* 667 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -125619,7 +128188,7 @@ module.exports = InOut; /***/ }), -/* 668 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -125647,7 +128216,7 @@ module.exports = In; /***/ }), -/* 669 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -125675,7 +128244,7 @@ module.exports = Out; /***/ }), -/* 670 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -125710,7 +128279,7 @@ module.exports = InOut; /***/ }), -/* 671 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -125765,7 +128334,7 @@ module.exports = In; /***/ }), -/* 672 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -125820,7 +128389,7 @@ module.exports = Out; /***/ }), -/* 673 */ +/* 680 */ /***/ (function(module, exports) { /** @@ -125882,7 +128451,7 @@ module.exports = InOut; /***/ }), -/* 674 */ +/* 681 */ /***/ (function(module, exports) { /** @@ -125910,7 +128479,7 @@ module.exports = In; /***/ }), -/* 675 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -125938,7 +128507,7 @@ module.exports = Out; /***/ }), -/* 676 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -125973,7 +128542,7 @@ module.exports = InOut; /***/ }), -/* 677 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -125985,7 +128554,7 @@ module.exports = InOut; /** * Linear easing (no variation). * - * @function Phaser.Math.Easing.Linear.Linear + * @function Phaser.Math.Easing.Linear * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -126001,7 +128570,7 @@ module.exports = Linear; /***/ }), -/* 678 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -126029,7 +128598,7 @@ module.exports = In; /***/ }), -/* 679 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -126057,7 +128626,7 @@ module.exports = Out; /***/ }), -/* 680 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -126092,7 +128661,7 @@ module.exports = InOut; /***/ }), -/* 681 */ +/* 688 */ /***/ (function(module, exports) { /** @@ -126120,7 +128689,7 @@ module.exports = In; /***/ }), -/* 682 */ +/* 689 */ /***/ (function(module, exports) { /** @@ -126148,7 +128717,7 @@ module.exports = Out; /***/ }), -/* 683 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -126183,7 +128752,7 @@ module.exports = InOut; /***/ }), -/* 684 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -126211,7 +128780,7 @@ module.exports = In; /***/ }), -/* 685 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -126239,7 +128808,7 @@ module.exports = Out; /***/ }), -/* 686 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -126274,7 +128843,7 @@ module.exports = InOut; /***/ }), -/* 687 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -126313,7 +128882,7 @@ module.exports = In; /***/ }), -/* 688 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -126352,7 +128921,7 @@ module.exports = Out; /***/ }), -/* 689 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -126391,7 +128960,7 @@ module.exports = InOut; /***/ }), -/* 690 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -126403,7 +128972,7 @@ module.exports = InOut; /** * Stepped easing. * - * @function Phaser.Math.Easing.Stepped.Stepped + * @function Phaser.Math.Easing.Stepped * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -126433,7 +129002,7 @@ module.exports = Stepped; /***/ }), -/* 691 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126442,9 +129011,9 @@ module.exports = Stepped; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(48); +var Events = __webpack_require__(36); var Vector2 = __webpack_require__(3); /** @@ -126752,7 +129321,440 @@ module.exports = Shake; /***/ }), -/* 692 */ +/* 699 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Jason Nicholls + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(19); +var Class = __webpack_require__(0); +var Events = __webpack_require__(36); +var EaseMap = __webpack_require__(115); + +/** + * @classdesc + * A Camera Rotate effect. + * + * This effect will rotate the Camera so that the its viewport finishes at the given angle in radians, + * over the duration and with the ease specified. + * + * Camera rotation always takes place based on the Camera viewport. By default, rotation happens + * in the center of the viewport. You can adjust this with the `originX` and `originY` properties. + * + * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not + * rotate the Camera viewport itself, which always remains an axis-aligned rectangle. + * + * Only the camera is rotates. None of the objects it is displaying are impacted, i.e. their positions do + * not change. + * + * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback, + * which is invoked each frame for the duration of the effect if required. + * + * @class RotateTo + * @memberof Phaser.Cameras.Scene2D.Effects + * @constructor + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon. + */ +var RotateTo = new Class({ + + initialize: + + function RotateTo (camera) + { + /** + * The Camera this effect belongs to. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#camera + * @type {Phaser.Cameras.Scene2D.Camera} + * @readonly + * @since 3.23.0 + */ + this.camera = camera; + + /** + * Is this effect actively running? + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#isRunning + * @type {boolean} + * @readonly + * @default false + * @since 3.23.0 + */ + this.isRunning = false; + + /** + * The duration of the effect, in milliseconds. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#duration + * @type {integer} + * @readonly + * @default 0 + * @since 3.23.0 + */ + this.duration = 0; + + /** + * The starting angle to rotate the camera from. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#source + * @type {number} + * @since 3.23.0 + */ + this.source = 0; + + /** + * The constantly updated value based on the force. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#current + * @type {number} + * @since 3.23.0 + */ + this.current = 0; + + /** + * The destination angle in radians to rotate the camera to. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#destination + * @type {number} + * @since 3.23.0 + */ + this.destination = 0; + + /** + * The ease function to use during the Rotate. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#ease + * @type {function} + * @since 3.23.0 + */ + this.ease; + + /** + * If this effect is running this holds the current percentage of the progress, a value between 0 and 1. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#progress + * @type {number} + * @since 3.23.0 + */ + this.progress = 0; + + /** + * Effect elapsed timer. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_elapsed + * @type {number} + * @private + * @since 3.23.0 + */ + this._elapsed = 0; + + /** + * @callback CameraRotateCallback + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera on which the effect is running. + * @param {number} progress - The progress of the effect. A value between 0 and 1. + * @param {number} angle - The Camera's new angle in radians. + */ + + /** + * This callback is invoked every frame for the duration of the effect. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_onUpdate + * @type {?CameraRotateCallback} + * @private + * @default null + * @since 3.23.0 + */ + this._onUpdate; + + /** + * On Complete callback scope. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_onUpdateScope + * @type {any} + * @private + * @since 3.23.0 + */ + this._onUpdateScope; + + /** + * The direction of the rotation. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#clockwise + * @type {boolean} + * @since 3.23.0 + */ + this.clockwise = true; + + /** + * The shortest direction to the target rotation. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#shortestPath + * @type {boolean} + * @since 3.23.0 + */ + this.shortestPath = false; + }, + + /** + * This effect will scroll the Camera so that the center of its viewport finishes at the given angle, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#start + * @fires Phaser.Cameras.Scene2D.Events#ROTATE_START + * @fires Phaser.Cameras.Scene2D.Events#ROTATE_COMPLETE + * @since 3.23.0 + * + * @param {number} radians - The destination angle in radians to rotate the Camera viewport to. If the angle is positive then the rotation is clockwise else anticlockwise + * @param {boolean} [shortestPath=false] - If shortest path is set to true the camera will rotate in the quickest direction clockwise or anti-clockwise. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the Rotate. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the rotation effect to start immediately, even if already running. + * @param {CameraRotateCallback} [callback] - This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera scroll x coordinate and the current camera scroll y coordinate. + * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + * + * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started. + */ + start: function (radians, shortestPath, duration, ease, force, callback, context) + { + if (duration === undefined) { duration = 1000; } + if (ease === undefined) { ease = EaseMap.Linear; } + if (force === undefined) { force = false; } + if (callback === undefined) { callback = null; } + if (context === undefined) { context = this.camera.scene; } + if (shortestPath === undefined) { shortestPath = false; } + + this.shortestPath = shortestPath; + + var tmpDestination = radians; + + if (radians < 0) + { + tmpDestination = -1 * radians; + this.clockwise = false; + } + else + { + this.clockwise = true; + } + + var maxRad = (360 * Math.PI) / 180; + + tmpDestination = tmpDestination - (Math.floor(tmpDestination / maxRad) * maxRad); + + var cam = this.camera; + + if (!force && this.isRunning) + { + return cam; + } + + this.isRunning = true; + this.duration = duration; + this.progress = 0; + + // Starting from + this.source = cam.rotation; + + // Destination + this.destination = tmpDestination; + + // Using this ease + if (typeof ease === 'string' && EaseMap.hasOwnProperty(ease)) + { + this.ease = EaseMap[ease]; + } + else if (typeof ease === 'function') + { + this.ease = ease; + } + + this._elapsed = 0; + + this._onUpdate = callback; + this._onUpdateScope = context; + + + if (this.shortestPath) + { + // The shortest path is true so calculate the quickest direction + var cwDist = 0; + var acwDist = 0; + + if (this.destination > this.source) + { + cwDist = Math.abs(this.destination - this.source); + } + else + { + cwDist = (Math.abs(this.destination + maxRad) - this.source); + } + + if (this.source > this.destination) + { + acwDist = Math.abs(this.source - this.destination); + } + else + { + acwDist = (Math.abs(this.source + maxRad) - this.destination); + } + + if (cwDist < acwDist) + { + this.clockwise = true; + } + else if (cwDist > acwDist) + { + this.clockwise = false; + } + } + + this.camera.emit(Events.ROTATE_START, this.camera, this, duration, tmpDestination); + + return cam; + }, + + /** + * The main update loop for this effect. Called automatically by the Camera. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#update + * @since 3.23.0 + * + * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + if (!this.isRunning) + { + return; + } + + this._elapsed += delta; + + var progress = Clamp(this._elapsed / this.duration, 0, 1); + + this.progress = progress; + + var cam = this.camera; + + if (this._elapsed < this.duration) + { + var v = this.ease(progress); + + this.current = cam.rotation; + var distance = 0; + var maxRad = (360 * Math.PI) / 180; + var target = this.destination; + var current = this.current; + + if (this.clockwise === false) + { + target = this.current; + current = this.destination; + } + + if (target >= current) + { + distance = Math.abs(target - current); + } + else + { + distance = (Math.abs(target + maxRad) - current); + } + + var r = 0; + + if (this.clockwise) + { + r = (cam.rotation + (distance * v)); + } + else + { + r = (cam.rotation - (distance * v)); + } + + cam.rotation = r; + + if (this._onUpdate) + { + this._onUpdate.call(this._onUpdateScope, cam, progress, r); + } + } + else + { + cam.rotation = this.destination; + + if (this._onUpdate) + { + this._onUpdate.call(this._onUpdateScope, cam, progress, this.destination); + } + + this.effectComplete(); + } + }, + + /** + * Called internally when the effect completes. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#effectComplete + * @since 3.23.0 + */ + effectComplete: function () + { + this._onUpdate = null; + this._onUpdateScope = null; + + this.isRunning = false; + + this.camera.emit(Events.ROTATE_COMPLETE, this.camera, this); + }, + + /** + * Resets this camera effect. + * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#reset + * @since 3.23.0 + */ + reset: function () + { + this.isRunning = false; + + this._onUpdate = null; + this._onUpdateScope = null; + }, + + /** + * Destroys this effect, releasing it from the Camera. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#destroy + * @since 3.23.0 + */ + destroy: function () + { + this.reset(); + + this.camera = null; + this.source = null; + this.destination = null; + } + +}); + +module.exports = RotateTo; + + +/***/ }), +/* 700 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126761,10 +129763,10 @@ module.exports = Shake; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(166); -var Events = __webpack_require__(48); +var EaseMap = __webpack_require__(115); +var Events = __webpack_require__(36); /** * @classdesc @@ -127045,7 +130047,7 @@ module.exports = Zoom; /***/ }), -/* 693 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127054,13 +130056,13 @@ module.exports = Zoom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(290); +var Camera = __webpack_require__(293); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var RectangleContains = __webpack_require__(47); +var RectangleContains = __webpack_require__(48); var ScaleEvents = __webpack_require__(92); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -127445,7 +130447,7 @@ var CameraManager = new Class({ * * @param {(Phaser.Types.Cameras.Scene2D.CameraConfig|Phaser.Types.Cameras.Scene2D.CameraConfig[])} config - A Camera configuration object, or an array of them, to be added to this Camera Manager. * - * @return {Phaser.Cameras.Scene2D.CameraManager} This Camera Manager instance. + * @return {this} This Camera Manager instance. */ fromJSON: function (config) { @@ -127793,7 +130795,7 @@ module.exports = CameraManager; /***/ }), -/* 694 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -127812,7 +130814,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 695 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -127831,7 +130833,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 696 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -127850,7 +130852,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 697 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -127870,7 +130872,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 698 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -127891,7 +130893,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 699 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -127922,7 +130924,7 @@ module.exports = 'resize'; /***/ }), -/* 700 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -127947,7 +130949,7 @@ module.exports = 'boot'; /***/ }), -/* 701 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -127976,7 +130978,7 @@ module.exports = 'create'; /***/ }), -/* 702 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -128003,7 +131005,7 @@ module.exports = 'destroy'; /***/ }), -/* 703 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -128030,7 +131032,7 @@ module.exports = 'pause'; /***/ }), -/* 704 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -128067,7 +131069,7 @@ module.exports = 'postupdate'; /***/ }), -/* 705 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -128104,7 +131106,7 @@ module.exports = 'preupdate'; /***/ }), -/* 706 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -128132,7 +131134,7 @@ module.exports = 'ready'; /***/ }), -/* 707 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -128168,7 +131170,7 @@ module.exports = 'render'; /***/ }), -/* 708 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -128195,7 +131197,7 @@ module.exports = 'resume'; /***/ }), -/* 709 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -128225,7 +131227,7 @@ module.exports = 'shutdown'; /***/ }), -/* 710 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -128252,7 +131254,7 @@ module.exports = 'sleep'; /***/ }), -/* 711 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -128277,7 +131279,7 @@ module.exports = 'start'; /***/ }), -/* 712 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -128313,7 +131315,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 713 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -128350,7 +131352,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 714 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -128384,7 +131386,7 @@ module.exports = 'transitionout'; /***/ }), -/* 715 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -128424,7 +131426,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 716 */ +/* 724 */ /***/ (function(module, exports) { /** @@ -128459,7 +131461,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 717 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -128496,7 +131498,7 @@ module.exports = 'update'; /***/ }), -/* 718 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -128523,7 +131525,7 @@ module.exports = 'wake'; /***/ }), -/* 719 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128538,18 +131540,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(311), - CreateRenderer: __webpack_require__(334), - DebugHeader: __webpack_require__(336), - Events: __webpack_require__(18), - TimeStep: __webpack_require__(337), - VisibilityHandler: __webpack_require__(339) + Config: __webpack_require__(314), + CreateRenderer: __webpack_require__(337), + DebugHeader: __webpack_require__(341), + Events: __webpack_require__(20), + TimeStep: __webpack_require__(342), + VisibilityHandler: __webpack_require__(344) }; /***/ }), -/* 720 */ +/* 728 */ /***/ (function(module, exports) { // shim for using process in browser @@ -128739,7 +131741,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 721 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128748,7 +131750,7 @@ process.umask = function() { return 0; }; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(117); +var Browser = __webpack_require__(118); /** * Determines the input support of the browser running this Phaser Game instance. @@ -128814,7 +131816,7 @@ module.exports = init(); /***/ }), -/* 722 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128823,7 +131825,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(117); +var Browser = __webpack_require__(118); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -128939,7 +131941,7 @@ module.exports = init(); /***/ }), -/* 723 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -129026,7 +132028,7 @@ module.exports = init(); /***/ }), -/* 724 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -129130,7 +132132,7 @@ module.exports = init(); /***/ }), -/* 725 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129145,23 +132147,25 @@ module.exports = init(); module.exports = { - 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) + Between: __webpack_require__(317), + BetweenPoints: __webpack_require__(734), + BetweenPointsY: __webpack_require__(735), + BetweenY: __webpack_require__(736), + CounterClockwise: __webpack_require__(737), + Normalize: __webpack_require__(318), + Random: __webpack_require__(738), + RandomDegrees: __webpack_require__(739), + Reverse: __webpack_require__(740), + RotateTo: __webpack_require__(741), + ShortestBetween: __webpack_require__(742), + Wrap: __webpack_require__(235), + WrapDegrees: __webpack_require__(236) }; /***/ }), -/* 726 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -129178,8 +132182,8 @@ module.exports = { * @function Phaser.Math.Angle.BetweenPoints * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -129192,7 +132196,7 @@ module.exports = BetweenPoints; /***/ }), -/* 727 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -129210,8 +132214,8 @@ module.exports = BetweenPoints; * @function Phaser.Math.Angle.BetweenPointsY * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -129224,7 +132228,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 728 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -129258,7 +132262,7 @@ module.exports = BetweenY; /***/ }), -/* 729 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129267,7 +132271,7 @@ module.exports = BetweenY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(15); /** * Takes an angle in Phasers default clockwise format and converts it so that @@ -129303,7 +132307,65 @@ module.exports = CounterClockwise; /***/ }), -/* 730 */ +/* 738 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(119); + +/** + * Returns a random angle in the range [-pi, pi]. + * + * @function Phaser.Math.Angle.Random + * @since 3.23.0 + * + * @return {number} The angle, in radians. + */ +var Random = function () +{ + return FloatBetween(-Math.PI, Math.PI); +}; + +module.exports = Random; + + +/***/ }), +/* 739 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(119); + +/** + * Returns a random angle in the range [-180, 180]. + * + * @function Phaser.Math.Angle.RandomDegrees + * @since 3.23.0 + * + * @return {number} The angle, in degrees. + */ +var RandomDegrees = function () +{ + return FloatBetween(-180, 180); +}; + +module.exports = RandomDegrees; + + +/***/ }), +/* 740 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129312,7 +132374,7 @@ module.exports = CounterClockwise; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(315); +var Normalize = __webpack_require__(318); /** * Reverse the given angle. @@ -129333,7 +132395,7 @@ module.exports = Reverse; /***/ }), -/* 731 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129342,7 +132404,7 @@ module.exports = Reverse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. @@ -129400,7 +132462,7 @@ module.exports = RotateTo; /***/ }), -/* 732 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -129449,7 +132511,7 @@ module.exports = ShortestBetween; /***/ }), -/* 733 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129465,50 +132527,18 @@ module.exports = ShortestBetween; module.exports = { 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) + BetweenPoints: __webpack_require__(319), + BetweenPointsSquared: __webpack_require__(744), + Chebyshev: __webpack_require__(745), + Power: __webpack_require__(746), + Snake: __webpack_require__(747), + Squared: __webpack_require__(320) }; /***/ }), -/* 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 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -129540,7 +132570,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 736 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -129574,7 +132604,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 737 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -129608,7 +132638,7 @@ module.exports = DistancePower; /***/ }), -/* 738 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -129642,7 +132672,7 @@ module.exports = SnakeDistance; /***/ }), -/* 739 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129657,24 +132687,24 @@ module.exports = SnakeDistance; module.exports = { - 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) + 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) }; /***/ }), -/* 740 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129689,17 +132719,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(741), - Equal: __webpack_require__(144), - Floor: __webpack_require__(742), - GreaterThan: __webpack_require__(317), - LessThan: __webpack_require__(318) + Ceil: __webpack_require__(750), + Equal: __webpack_require__(106), + Floor: __webpack_require__(751), + GreaterThan: __webpack_require__(321), + LessThan: __webpack_require__(322) }; /***/ }), -/* 741 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -129730,7 +132760,7 @@ module.exports = Ceil; /***/ }), -/* 742 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -129761,7 +132791,7 @@ module.exports = Floor; /***/ }), -/* 743 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129776,19 +132806,19 @@ module.exports = Floor; module.exports = { - 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) + Bezier: __webpack_require__(753), + CatmullRom: __webpack_require__(754), + CubicBezier: __webpack_require__(325), + Linear: __webpack_require__(755), + QuadraticBezier: __webpack_require__(326), + SmoothStep: __webpack_require__(327), + SmootherStep: __webpack_require__(756) }; /***/ }), -/* 744 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129797,7 +132827,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(319); +var Bernstein = __webpack_require__(323); /** * A bezier interpolation method. @@ -129827,7 +132857,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 745 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129836,7 +132866,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(169); +var CatmullRom = __webpack_require__(171); /** * A Catmull-Rom interpolation method. @@ -129884,7 +132914,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 746 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129893,7 +132923,7 @@ module.exports = CatmullRomInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(115); +var Linear = __webpack_require__(116); /** * A linear interpolation method. @@ -129931,7 +132961,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 747 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129940,7 +132970,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(157); +var SmootherStep = __webpack_require__(160); /** * A Smoother Step interpolation method. @@ -129964,7 +132994,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 748 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129979,15 +133009,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(324), - IsSize: __webpack_require__(118), - IsValue: __webpack_require__(749) + GetNext: __webpack_require__(328), + IsSize: __webpack_require__(120), + IsValue: __webpack_require__(758) }; /***/ }), -/* 749 */ +/* 758 */ /***/ (function(module, exports) { /** @@ -130015,7 +133045,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 750 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130030,15 +133060,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(325), + Ceil: __webpack_require__(329), Floor: __webpack_require__(93), - To: __webpack_require__(751) + To: __webpack_require__(760) }; /***/ }), -/* 751 */ +/* 760 */ /***/ (function(module, exports) { /** @@ -130081,7 +133111,7 @@ module.exports = SnapTo; /***/ }), -/* 752 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130591,7 +133621,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 753 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -130626,7 +133656,7 @@ module.exports = Average; /***/ }), -/* 754 */ +/* 763 */ /***/ (function(module, exports) { /** @@ -130663,7 +133693,7 @@ module.exports = CeilTo; /***/ }), -/* 755 */ +/* 764 */ /***/ (function(module, exports) { /** @@ -130692,7 +133722,7 @@ module.exports = Difference; /***/ }), -/* 756 */ +/* 765 */ /***/ (function(module, exports) { /** @@ -130729,7 +133759,7 @@ module.exports = FloorTo; /***/ }), -/* 757 */ +/* 766 */ /***/ (function(module, exports) { /** @@ -130762,7 +133792,7 @@ module.exports = GetSpeed; /***/ }), -/* 758 */ +/* 767 */ /***/ (function(module, exports) { /** @@ -130793,7 +133823,7 @@ module.exports = IsEven; /***/ }), -/* 759 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -130822,7 +133852,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 760 */ +/* 769 */ /***/ (function(module, exports) { /** @@ -130852,7 +133882,7 @@ module.exports = MaxAdd; /***/ }), -/* 761 */ +/* 770 */ /***/ (function(module, exports) { /** @@ -130882,7 +133912,7 @@ module.exports = MinSub; /***/ }), -/* 762 */ +/* 771 */ /***/ (function(module, exports) { /** @@ -130941,7 +133971,7 @@ module.exports = Percent; /***/ }), -/* 763 */ +/* 772 */ /***/ (function(module, exports) { /** @@ -130981,7 +134011,7 @@ module.exports = RandomXY; /***/ }), -/* 764 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -131020,7 +134050,7 @@ module.exports = RandomXYZ; /***/ }), -/* 765 */ +/* 774 */ /***/ (function(module, exports) { /** @@ -131057,7 +134087,7 @@ module.exports = RandomXYZW; /***/ }), -/* 766 */ +/* 775 */ /***/ (function(module, exports) { /** @@ -131109,7 +134139,7 @@ module.exports = RoundTo; /***/ }), -/* 767 */ +/* 776 */ /***/ (function(module, exports) { /** @@ -131162,7 +134192,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 768 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131220,7 +134250,7 @@ module.exports = ToXY; /***/ }), -/* 769 */ +/* 778 */ /***/ (function(module, exports) { /** @@ -131250,7 +134280,7 @@ module.exports = Within; /***/ }), -/* 770 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131259,9 +134289,9 @@ module.exports = Within; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(172); -var Matrix4 = __webpack_require__(332); -var Quaternion = __webpack_require__(333); +var Vector3 = __webpack_require__(174); +var Matrix4 = __webpack_require__(335); +var Quaternion = __webpack_require__(336); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -131298,7 +134328,7 @@ module.exports = RotateVec3; /***/ }), -/* 771 */ +/* 780 */ /***/ (function(module, exports) { /** @@ -131324,7 +134354,7 @@ module.exports = 'addtexture'; /***/ }), -/* 772 */ +/* 781 */ /***/ (function(module, exports) { /** @@ -131350,7 +134380,7 @@ module.exports = 'onerror'; /***/ }), -/* 773 */ +/* 782 */ /***/ (function(module, exports) { /** @@ -131379,7 +134409,7 @@ module.exports = 'onload'; /***/ }), -/* 774 */ +/* 783 */ /***/ (function(module, exports) { /** @@ -131402,7 +134432,7 @@ module.exports = 'ready'; /***/ }), -/* 775 */ +/* 784 */ /***/ (function(module, exports) { /** @@ -131430,7 +134460,7 @@ module.exports = 'removetexture'; /***/ }), -/* 776 */ +/* 785 */ /***/ (function(module, exports) { module.exports = [ @@ -131466,7 +134496,7 @@ module.exports = [ /***/ }), -/* 777 */ +/* 786 */ /***/ (function(module, exports) { module.exports = [ @@ -131485,7 +134515,7 @@ module.exports = [ /***/ }), -/* 778 */ +/* 787 */ /***/ (function(module, exports) { module.exports = [ @@ -131544,86 +134574,7 @@ module.exports = [ /***/ }), -/* 779 */ -/***/ (function(module, exports) { - -module.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'); - - -/***/ }), -/* 780 */ -/***/ (function(module, exports) { - -module.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'); - - -/***/ }), -/* 781 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131638,14 +134589,14 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(340), - Palettes: __webpack_require__(782) + GenerateTexture: __webpack_require__(345), + Palettes: __webpack_require__(789) }; /***/ }), -/* 782 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131660,17 +134611,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(341), - C64: __webpack_require__(783), - CGA: __webpack_require__(784), - JMP: __webpack_require__(785), - MSX: __webpack_require__(786) + ARNE16: __webpack_require__(346), + C64: __webpack_require__(790), + CGA: __webpack_require__(791), + JMP: __webpack_require__(792), + MSX: __webpack_require__(793) }; /***/ }), -/* 783 */ +/* 790 */ /***/ (function(module, exports) { /** @@ -131708,7 +134659,7 @@ module.exports = { /***/ }), -/* 784 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -131746,7 +134697,7 @@ module.exports = { /***/ }), -/* 785 */ +/* 792 */ /***/ (function(module, exports) { /** @@ -131784,7 +134735,7 @@ module.exports = { /***/ }), -/* 786 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -131822,7 +134773,7 @@ module.exports = { /***/ }), -/* 787 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131836,19 +134787,19 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(788), + Path: __webpack_require__(795), - CubicBezier: __webpack_require__(342), - Curve: __webpack_require__(80), - Ellipse: __webpack_require__(343), - Line: __webpack_require__(344), - QuadraticBezier: __webpack_require__(345), - Spline: __webpack_require__(346) + CubicBezier: __webpack_require__(347), + Curve: __webpack_require__(81), + Ellipse: __webpack_require__(348), + Line: __webpack_require__(349), + QuadraticBezier: __webpack_require__(350), + Spline: __webpack_require__(351) }; /***/ }), -/* 788 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131860,16 +134811,16 @@ module.exports = { // 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__(342); -var EllipseCurve = __webpack_require__(343); +var CubicBezierCurve = __webpack_require__(347); +var EllipseCurve = __webpack_require__(348); var GameObjectFactory = __webpack_require__(5); -var LineCurve = __webpack_require__(344); -var MovePathTo = __webpack_require__(789); -var QuadraticBezierCurve = __webpack_require__(345); +var LineCurve = __webpack_require__(349); +var MovePathTo = __webpack_require__(796); +var QuadraticBezierCurve = __webpack_require__(350); var Rectangle = __webpack_require__(11); -var SplineCurve = __webpack_require__(346); +var SplineCurve = __webpack_require__(351); var Vector2 = __webpack_require__(3); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * @classdesc @@ -131990,7 +134941,7 @@ var Path = new Class({ * * @param {Phaser.Curves.Curve} curve - The Curve to append. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ add: function (curve) { @@ -132009,7 +134960,7 @@ var Path = new Class({ * @param {boolean} [clockwise=false] - `true` to create a clockwise circle as opposed to a counter-clockwise circle. * @param {number} [rotation=0] - The rotation of the circle in degrees. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ circleTo: function (radius, clockwise, rotation) { @@ -132028,7 +134979,7 @@ var Path = new Class({ * @method Phaser.Curves.Path#closePath * @since 3.0.0 * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ closePath: function () { @@ -132058,7 +135009,7 @@ var Path = new Class({ * @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. + * @return {this} This Path object. */ cubicBezierTo: function (x, y, control1X, control1Y, control2X, control2Y) { @@ -132097,7 +135048,7 @@ var Path = new Class({ * @param {number} [controlX] - If `x` is not a `Vector2`, the X coordinate of the first control point. * @param {number} [controlY] - If `x` is not a `Vector2`, the Y coordinate of the first control point. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ quadraticBezierTo: function (x, y, controlX, controlY) { @@ -132163,7 +135114,7 @@ var Path = new Class({ * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`). * @param {number} [rotation=0] - The rotation of the ellipse, in degrees. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ ellipseTo: function (xRadius, yRadius, startAngle, endAngle, clockwise, rotation) { @@ -132192,7 +135143,7 @@ var Path = new Class({ * * @param {Phaser.Types.Curves.JSONPath} data - The JSON object containing the Path data. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ fromJSON: function (data) { @@ -132546,6 +135497,46 @@ var Path = new Class({ return out.copy(this.startPoint); }, + /** + * Gets a unit vector tangent at a relative position on the path. + * + * @method Phaser.Curves.Path#getTangent + * @since 3.23.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] + * + * @param {number} t - The relative position on the path, [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) + */ + getTangent: function (t, out) + { + if (out === undefined) { out = new Vector2(); } + + var d = t * this.getLength(); + var curveLengths = this.getCurveLengths(); + var i = 0; + + while (i < curveLengths.length) + { + if (curveLengths[i] >= d) + { + var diff = curveLengths[i] - d; + var curve = this.curves[i]; + + var segmentLength = curve.getLength(); + var u = (segmentLength === 0) ? 0 : 1 - diff / segmentLength; + + return curve.getTangentAt(u, out); + } + + i++; + } + + return null; + }, + /** * Creates a line curve from the previous end point to x/y. * @@ -132555,7 +135546,7 @@ var Path = new Class({ * @param {(number|Phaser.Math.Vector2)} x - The X coordinate of the line's end point, or a `Vector2` containing the entire end point. * @param {number} [y] - The Y coordinate of the line's end point, if a number was passed as the X parameter. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ lineTo: function (x, y) { @@ -132581,7 +135572,7 @@ var Path = new Class({ * * @param {Phaser.Math.Vector2[]} points - The points the newly created spline curve should consist of. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ splineTo: function (points) { @@ -132601,7 +135592,7 @@ var Path = new Class({ * @param {(number|Phaser.Math.Vector2)} x - The X coordinate of the position to move the path's end point to, or a `Vector2` containing the entire new end point. * @param {number} y - The Y coordinate of the position to move the path's end point to, if a number was passed as the X coordinate. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ moveTo: function (x, y) { @@ -132697,7 +135688,7 @@ module.exports = Path; /***/ }), -/* 789 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132837,7 +135828,7 @@ module.exports = MoveTo; /***/ }), -/* 790 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132853,14 +135844,14 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(113), - DataManagerPlugin: __webpack_require__(791), - Events: __webpack_require__(281) + DataManagerPlugin: __webpack_require__(798), + Events: __webpack_require__(284) }; /***/ }), -/* 791 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132872,7 +135863,7 @@ module.exports = { var Class = __webpack_require__(0); var DataManager = __webpack_require__(113); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -132987,7 +135978,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 792 */ +/* 799 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133002,18 +135993,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(793), - BaseShader: __webpack_require__(347), - Bounds: __webpack_require__(796), - Canvas: __webpack_require__(799), - Color: __webpack_require__(348), - Masks: __webpack_require__(808) + Align: __webpack_require__(800), + BaseShader: __webpack_require__(352), + Bounds: __webpack_require__(803), + Canvas: __webpack_require__(806), + Color: __webpack_require__(353), + Masks: __webpack_require__(815) }; /***/ }), -/* 793 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133022,8 +136013,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(106); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(105); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Display.Align @@ -133031,8 +136022,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(794), - To: __webpack_require__(795) + In: __webpack_require__(801), + To: __webpack_require__(802) }; @@ -133043,7 +136034,7 @@ module.exports = Align; /***/ }), -/* 794 */ +/* 801 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133058,22 +136049,22 @@ module.exports = Align; module.exports = { - 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) + BottomCenter: __webpack_require__(256), + BottomLeft: __webpack_require__(257), + BottomRight: __webpack_require__(258), + Center: __webpack_require__(259), + LeftCenter: __webpack_require__(261), + QuickSet: __webpack_require__(255), + RightCenter: __webpack_require__(262), + TopCenter: __webpack_require__(263), + TopLeft: __webpack_require__(264), + TopRight: __webpack_require__(265) }; /***/ }), -/* 795 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133088,25 +136079,25 @@ module.exports = { module.exports = { - 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) + BottomCenter: __webpack_require__(243), + BottomLeft: __webpack_require__(244), + BottomRight: __webpack_require__(245), + LeftBottom: __webpack_require__(246), + LeftCenter: __webpack_require__(247), + LeftTop: __webpack_require__(248), + QuickSet: __webpack_require__(242), + RightBottom: __webpack_require__(249), + RightCenter: __webpack_require__(250), + RightTop: __webpack_require__(251), + TopCenter: __webpack_require__(252), + TopLeft: __webpack_require__(253), + TopRight: __webpack_require__(254) }; /***/ }), -/* 796 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133121,27 +136112,27 @@ module.exports = { module.exports = { - CenterOn: __webpack_require__(257), - GetBottom: __webpack_require__(38), - GetCenterX: __webpack_require__(75), - GetCenterY: __webpack_require__(77), - GetLeft: __webpack_require__(40), - GetOffsetX: __webpack_require__(797), - GetOffsetY: __webpack_require__(798), - GetRight: __webpack_require__(42), - GetTop: __webpack_require__(45), - SetBottom: __webpack_require__(44), - SetCenterX: __webpack_require__(76), - SetCenterY: __webpack_require__(78), - SetLeft: __webpack_require__(41), - SetRight: __webpack_require__(43), - SetTop: __webpack_require__(39) + CenterOn: __webpack_require__(260), + GetBottom: __webpack_require__(39), + GetCenterX: __webpack_require__(76), + GetCenterY: __webpack_require__(78), + GetLeft: __webpack_require__(41), + GetOffsetX: __webpack_require__(804), + GetOffsetY: __webpack_require__(805), + GetRight: __webpack_require__(43), + GetTop: __webpack_require__(46), + SetBottom: __webpack_require__(45), + SetCenterX: __webpack_require__(77), + SetCenterY: __webpack_require__(79), + SetLeft: __webpack_require__(42), + SetRight: __webpack_require__(44), + SetTop: __webpack_require__(40) }; /***/ }), -/* 797 */ +/* 804 */ /***/ (function(module, exports) { /** @@ -133171,7 +136162,7 @@ module.exports = GetOffsetX; /***/ }), -/* 798 */ +/* 805 */ /***/ (function(module, exports) { /** @@ -133201,7 +136192,7 @@ module.exports = GetOffsetY; /***/ }), -/* 799 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133216,17 +136207,17 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(335), + CanvasInterpolation: __webpack_require__(338), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(164), - TouchAction: __webpack_require__(800), - UserSelect: __webpack_require__(801) + Smoothing: __webpack_require__(167), + TouchAction: __webpack_require__(807), + UserSelect: __webpack_require__(808) }; /***/ }), -/* 800 */ +/* 807 */ /***/ (function(module, exports) { /** @@ -133261,7 +136252,7 @@ module.exports = TouchAction; /***/ }), -/* 801 */ +/* 808 */ /***/ (function(module, exports) { /** @@ -133308,7 +136299,7 @@ module.exports = UserSelect; /***/ }), -/* 802 */ +/* 809 */ /***/ (function(module, exports) { /** @@ -133348,7 +136339,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 803 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133357,8 +136348,8 @@ module.exports = ColorToRGBA; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); -var HueToComponent = __webpack_require__(350); +var Color = __webpack_require__(31); +var HueToComponent = __webpack_require__(355); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -133398,7 +136389,7 @@ module.exports = HSLToColor; /***/ }), -/* 804 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133407,7 +136398,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(163); +var HSVToRGB = __webpack_require__(166); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -133439,7 +136430,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 805 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133448,7 +136439,7 @@ module.exports = HSVColorWheel; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(115); +var Linear = __webpack_require__(116); /** * @namespace Phaser.Display.Color.Interpolate @@ -133547,7 +136538,7 @@ module.exports = { /***/ }), -/* 806 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133556,8 +136547,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(170); -var Color = __webpack_require__(33); +var Between = __webpack_require__(172); +var Color = __webpack_require__(31); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -133583,7 +136574,7 @@ module.exports = RandomRGB; /***/ }), -/* 807 */ +/* 814 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133592,7 +136583,7 @@ module.exports = RandomRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(349); +var ComponentToHex = __webpack_require__(354); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -133627,7 +136618,7 @@ module.exports = RGBToString; /***/ }), -/* 808 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133642,14 +136633,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(275), - GeometryMask: __webpack_require__(276) + BitmapMask: __webpack_require__(278), + GeometryMask: __webpack_require__(279) }; /***/ }), -/* 809 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133664,13 +136655,13 @@ module.exports = { var Dom = { - 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) + AddToDOM: __webpack_require__(122), + DOMContentLoaded: __webpack_require__(356), + GetScreenOrientation: __webpack_require__(357), + GetTarget: __webpack_require__(362), + ParseXML: __webpack_require__(363), + RemoveFromDOM: __webpack_require__(178), + RequestAnimationFrame: __webpack_require__(343) }; @@ -133678,7 +136669,7 @@ module.exports = Dom; /***/ }), -/* 810 */ +/* 817 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133691,11 +136682,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(811) }; +module.exports = { EventEmitter: __webpack_require__(818) }; /***/ }), -/* 811 */ +/* 818 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133705,7 +136696,7 @@ module.exports = { EventEmitter: __webpack_require__(811) }; */ var Class = __webpack_require__(0); -var EE = __webpack_require__(9); +var EE = __webpack_require__(10); var PluginCache = __webpack_require__(23); /** @@ -133879,7 +136870,7 @@ module.exports = EventEmitter; /***/ }), -/* 812 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133888,33 +136879,33 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(120); -var AnimationManager = __webpack_require__(286); -var CacheManager = __webpack_require__(289); +var AddToDOM = __webpack_require__(122); +var AnimationManager = __webpack_require__(289); +var CacheManager = __webpack_require__(292); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Config = __webpack_require__(311); -var CreateDOMContainer = __webpack_require__(813); -var CreateRenderer = __webpack_require__(334); +var Config = __webpack_require__(314); +var CreateDOMContainer = __webpack_require__(820); +var CreateRenderer = __webpack_require__(337); 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__(359); +var DebugHeader = __webpack_require__(341); +var Device = __webpack_require__(315); +var DOMContentLoaded = __webpack_require__(356); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(20); +var InputManager = __webpack_require__(364); 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); +var PluginManager = __webpack_require__(369); +var ScaleManager = __webpack_require__(370); +var SceneManager = __webpack_require__(372); +var TextureEvents = __webpack_require__(121); +var TextureManager = __webpack_require__(375); +var TimeStep = __webpack_require__(342); +var VisibilityHandler = __webpack_require__(344); if (true) { - var SoundManagerCreator = __webpack_require__(374); + var SoundManagerCreator = __webpack_require__(379); } if (false) @@ -134259,7 +137250,7 @@ var Game = new Class({ * * @method Phaser.Game#texturesReady * @private - * @fires Phaser.Game#ready + * @fires Phaser.Game#READY * @since 3.12.0 */ texturesReady: function () @@ -134313,11 +137304,11 @@ var Game = new Class({ * It will then render each Scene in turn, via the Renderer. This process emits `prerender` and `postrender` events. * * @method Phaser.Game#step - * @fires Phaser.Core.Events#PRE_STEP_EVENT - * @fires Phaser.Core.Events#STEP_EVENT - * @fires Phaser.Core.Events#POST_STEP_EVENT - * @fires Phaser.Core.Events#PRE_RENDER_EVENT - * @fires Phaser.Core.Events#POST_RENDER_EVENT + * @fires Phaser.Core.Events#PRE_STEP + * @fires Phaser.Core.Events#STEP + * @fires Phaser.Core.Events#POST_STEP + * @fires Phaser.Core.Events#PRE_RENDER + * @fires Phaser.Core.Events#POST_RENDER * @since 3.0.0 * * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. @@ -134380,8 +137371,8 @@ var Game = new Class({ * This process emits `prerender` and `postrender` events, even though nothing actually displays. * * @method Phaser.Game#headlessStep - * @fires Phaser.Game#prerenderEvent - * @fires Phaser.Game#postrenderEvent + * @fires Phaser.Game#PRE_RENDER + * @fires Phaser.Game#POST_RENDER * @since 3.2.0 * * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. @@ -134542,7 +137533,7 @@ var Game = new Class({ runDestroy: function () { this.scene.destroy(); - + this.events.emit(Events.DESTROY); this.events.removeAllListeners(); @@ -134582,7 +137573,7 @@ module.exports = Game; /***/ }), -/* 813 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134591,7 +137582,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(120); +var AddToDOM = __webpack_require__(122); var CreateDOMContainer = function (game) { @@ -134626,7 +137617,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 814 */ +/* 821 */ /***/ (function(module, exports) { /** @@ -134647,7 +137638,7 @@ module.exports = 'boot'; /***/ }), -/* 815 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -134668,7 +137659,7 @@ module.exports = 'destroy'; /***/ }), -/* 816 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -134696,7 +137687,7 @@ module.exports = 'dragend'; /***/ }), -/* 817 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -134727,7 +137718,7 @@ module.exports = 'dragenter'; /***/ }), -/* 818 */ +/* 825 */ /***/ (function(module, exports) { /** @@ -134759,7 +137750,7 @@ module.exports = 'drag'; /***/ }), -/* 819 */ +/* 826 */ /***/ (function(module, exports) { /** @@ -134790,7 +137781,7 @@ module.exports = 'dragleave'; /***/ }), -/* 820 */ +/* 827 */ /***/ (function(module, exports) { /** @@ -134824,7 +137815,7 @@ module.exports = 'dragover'; /***/ }), -/* 821 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -134854,7 +137845,7 @@ module.exports = 'dragstart'; /***/ }), -/* 822 */ +/* 829 */ /***/ (function(module, exports) { /** @@ -134883,7 +137874,7 @@ module.exports = 'drop'; /***/ }), -/* 823 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -134910,7 +137901,7 @@ module.exports = 'gameout'; /***/ }), -/* 824 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -134937,7 +137928,7 @@ module.exports = 'gameover'; /***/ }), -/* 825 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -134978,7 +137969,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 826 */ +/* 833 */ /***/ (function(module, exports) { /** @@ -135009,7 +138000,7 @@ module.exports = 'dragend'; /***/ }), -/* 827 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -135039,7 +138030,7 @@ module.exports = 'dragenter'; /***/ }), -/* 828 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -135070,7 +138061,7 @@ module.exports = 'drag'; /***/ }), -/* 829 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -135100,7 +138091,7 @@ module.exports = 'dragleave'; /***/ }), -/* 830 */ +/* 837 */ /***/ (function(module, exports) { /** @@ -135133,7 +138124,7 @@ module.exports = 'dragover'; /***/ }), -/* 831 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -135167,7 +138158,7 @@ module.exports = 'dragstart'; /***/ }), -/* 832 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -135197,7 +138188,7 @@ module.exports = 'drop'; /***/ }), -/* 833 */ +/* 840 */ /***/ (function(module, exports) { /** @@ -135238,7 +138229,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 834 */ +/* 841 */ /***/ (function(module, exports) { /** @@ -135279,7 +138270,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 835 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -135320,7 +138311,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 836 */ +/* 843 */ /***/ (function(module, exports) { /** @@ -135361,7 +138352,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 837 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -135402,7 +138393,7 @@ module.exports = 'pointermove'; /***/ }), -/* 838 */ +/* 845 */ /***/ (function(module, exports) { /** @@ -135441,7 +138432,7 @@ module.exports = 'pointerout'; /***/ }), -/* 839 */ +/* 846 */ /***/ (function(module, exports) { /** @@ -135482,7 +138473,7 @@ module.exports = 'pointerover'; /***/ }), -/* 840 */ +/* 847 */ /***/ (function(module, exports) { /** @@ -135523,7 +138514,7 @@ module.exports = 'pointerup'; /***/ }), -/* 841 */ +/* 848 */ /***/ (function(module, exports) { /** @@ -135565,7 +138556,7 @@ module.exports = 'wheel'; /***/ }), -/* 842 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -135606,7 +138597,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 843 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -135650,7 +138641,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 844 */ +/* 851 */ /***/ (function(module, exports) { /** @@ -135671,7 +138662,7 @@ module.exports = 'boot'; /***/ }), -/* 845 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -135696,7 +138687,7 @@ module.exports = 'process'; /***/ }), -/* 846 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -135717,7 +138708,7 @@ module.exports = 'update'; /***/ }), -/* 847 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -135752,7 +138743,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 848 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -135786,7 +138777,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 849 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -135821,7 +138812,7 @@ module.exports = 'pointermove'; /***/ }), -/* 850 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -135856,7 +138847,7 @@ module.exports = 'pointerout'; /***/ }), -/* 851 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -135891,7 +138882,7 @@ module.exports = 'pointerover'; /***/ }), -/* 852 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -135926,7 +138917,7 @@ module.exports = 'pointerup'; /***/ }), -/* 853 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -135960,7 +138951,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 854 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -135998,7 +138989,7 @@ module.exports = 'wheel'; /***/ }), -/* 855 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -136022,7 +139013,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 856 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -136044,7 +139035,7 @@ module.exports = 'preupdate'; /***/ }), -/* 857 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -136065,7 +139056,7 @@ module.exports = 'shutdown'; /***/ }), -/* 858 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -136087,7 +139078,7 @@ module.exports = 'start'; /***/ }), -/* 859 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -136112,7 +139103,7 @@ module.exports = 'update'; /***/ }), -/* 860 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -136171,7 +139162,7 @@ module.exports = GetInnerHeight; /***/ }), -/* 861 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -136201,7 +139192,7 @@ module.exports = 'addfile'; /***/ }), -/* 862 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -136229,7 +139220,7 @@ module.exports = 'complete'; /***/ }), -/* 863 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -136258,7 +139249,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 864 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -136312,7 +139303,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 865 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -136337,7 +139328,7 @@ module.exports = 'loaderror'; /***/ }), -/* 866 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -136363,7 +139354,7 @@ module.exports = 'load'; /***/ }), -/* 867 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -136390,7 +139381,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 868 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -136419,7 +139410,7 @@ module.exports = 'postprocess'; /***/ }), -/* 869 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -136444,7 +139435,7 @@ module.exports = 'progress'; /***/ }), -/* 870 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -136471,7 +139462,7 @@ module.exports = 'start'; /***/ }), -/* 871 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136481,7 +139472,7 @@ module.exports = 'start'; */ var GetFastValue = __webpack_require__(2); -var UppercaseFirst = __webpack_require__(179); +var UppercaseFirst = __webpack_require__(181); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -136533,7 +139524,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 872 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136580,7 +139571,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 873 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136641,7 +139632,7 @@ module.exports = InjectionMap; /***/ }), -/* 874 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -136722,7 +139713,7 @@ module.exports = AtlasXML; /***/ }), -/* 875 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -136757,7 +139748,7 @@ module.exports = Canvas; /***/ }), -/* 876 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -136792,7 +139783,7 @@ module.exports = Image; /***/ }), -/* 877 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136863,11 +139854,13 @@ var JSONArray = function (texture, sourceIndex, json) newFrame.updateUVsInverted(); } - if (src.anchor) + var pivot = src.anchor || src.pivot; + + if (pivot) { newFrame.customPivot = true; - newFrame.pivotX = src.anchor.x; - newFrame.pivotY = src.anchor.y; + newFrame.pivotX = pivot.x; + newFrame.pivotY = pivot.y; } // Copy over any extra data @@ -136899,7 +139892,7 @@ module.exports = JSONArray; /***/ }), -/* 878 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136940,7 +139933,7 @@ var JSONHash = function (texture, sourceIndex, json) texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height); // By this stage frames is a fully parsed Object - var frames = json['frames']; + var frames = json.frames; var newFrame; for (var key in frames) @@ -136969,6 +139962,15 @@ var JSONHash = function (texture, sourceIndex, json) newFrame.updateUVsInverted(); } + var pivot = src.anchor || src.pivot; + + if (pivot) + { + newFrame.customPivot = true; + newFrame.pivotX = pivot.x; + newFrame.pivotY = pivot.y; + } + // Copy over any extra data newFrame.customData = Clone(src); } @@ -136998,7 +140000,7 @@ module.exports = JSONHash; /***/ }), -/* 879 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137022,15 +140024,15 @@ var GetFastValue = __webpack_require__(2); * * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to. * @param {integer} sourceIndex - The index of the TextureSource. - * @param {integer} x - [description] - * @param {integer} y - [description] - * @param {integer} width - [description] - * @param {integer} height - [description] + * @param {integer} x - The top-left coordinate of the Sprite Sheet. Defaults to zero. Used when extracting sheets from atlases. + * @param {integer} y - The top-left coordinate of the Sprite Sheet. Defaults to zero. Used when extracting sheets from atlases. + * @param {integer} width - The width of the source image. + * @param {integer} height - The height of the source image. * @param {object} config - An object describing how to parse the Sprite Sheet. * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet. * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided. - * @param {number} [config.startFrame=0] - [description] - * @param {number} [config.endFrame=-1] - [description] + * @param {number} [config.startFrame=0] - The frame to start extracting from. Defaults to zero. + * @param {number} [config.endFrame=-1] - The frame to finish extracting at. Defaults to -1, which means 'all frames'. * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here. * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here. * @@ -137123,7 +140125,7 @@ module.exports = SpriteSheet; /***/ }), -/* 880 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137314,7 +140316,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 881 */ +/* 888 */ /***/ (function(module, exports) { /** @@ -137484,7 +140486,7 @@ TextureImporter: /***/ }), -/* 882 */ +/* 889 */ /***/ (function(module, exports) { /** @@ -137515,7 +140517,7 @@ module.exports = 'complete'; /***/ }), -/* 883 */ +/* 890 */ /***/ (function(module, exports) { /** @@ -137545,7 +140547,7 @@ module.exports = 'decoded'; /***/ }), -/* 884 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -137577,7 +140579,7 @@ module.exports = 'decodedall'; /***/ }), -/* 885 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -137609,7 +140611,7 @@ module.exports = 'destroy'; /***/ }), -/* 886 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -137642,7 +140644,7 @@ module.exports = 'detune'; /***/ }), -/* 887 */ +/* 894 */ /***/ (function(module, exports) { /** @@ -137670,7 +140672,7 @@ module.exports = 'detune'; /***/ }), -/* 888 */ +/* 895 */ /***/ (function(module, exports) { /** @@ -137697,7 +140699,7 @@ module.exports = 'mute'; /***/ }), -/* 889 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -137725,7 +140727,7 @@ module.exports = 'rate'; /***/ }), -/* 890 */ +/* 897 */ /***/ (function(module, exports) { /** @@ -137752,7 +140754,7 @@ module.exports = 'volume'; /***/ }), -/* 891 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -137786,7 +140788,7 @@ module.exports = 'loop'; /***/ }), -/* 892 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -137820,7 +140822,7 @@ module.exports = 'looped'; /***/ }), -/* 893 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -137853,7 +140855,7 @@ module.exports = 'mute'; /***/ }), -/* 894 */ +/* 901 */ /***/ (function(module, exports) { /** @@ -137880,7 +140882,7 @@ module.exports = 'pauseall'; /***/ }), -/* 895 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -137912,7 +140914,7 @@ module.exports = 'pause'; /***/ }), -/* 896 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -137943,7 +140945,7 @@ module.exports = 'play'; /***/ }), -/* 897 */ +/* 904 */ /***/ (function(module, exports) { /** @@ -137976,7 +140978,7 @@ module.exports = 'rate'; /***/ }), -/* 898 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -138003,7 +141005,7 @@ module.exports = 'resumeall'; /***/ }), -/* 899 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -138036,7 +141038,7 @@ module.exports = 'resume'; /***/ }), -/* 900 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -138069,7 +141071,7 @@ module.exports = 'seek'; /***/ }), -/* 901 */ +/* 908 */ /***/ (function(module, exports) { /** @@ -138096,7 +141098,7 @@ module.exports = 'stopall'; /***/ }), -/* 902 */ +/* 909 */ /***/ (function(module, exports) { /** @@ -138128,7 +141130,7 @@ module.exports = 'stop'; /***/ }), -/* 903 */ +/* 910 */ /***/ (function(module, exports) { /** @@ -138155,7 +141157,7 @@ module.exports = 'unlocked'; /***/ }), -/* 904 */ +/* 911 */ /***/ (function(module, exports) { /** @@ -138188,7 +141190,7 @@ module.exports = 'volume'; /***/ }), -/* 905 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138205,100 +141207,103 @@ var GameObjects = { Events: __webpack_require__(90), - DisplayList: __webpack_require__(906), + DisplayList: __webpack_require__(913), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(934), + UpdateList: __webpack_require__(939), Components: __webpack_require__(12), - BuildGameObject: __webpack_require__(28), - BuildGameObjectAnimation: __webpack_require__(385), - GameObject: __webpack_require__(14), - 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), + BuildGameObject: __webpack_require__(27), + BuildGameObjectAnimation: __webpack_require__(392), + GameObject: __webpack_require__(13), + BitmapText: __webpack_require__(132), + Blitter: __webpack_require__(188), + Container: __webpack_require__(189), + DOMElement: __webpack_require__(394), + DynamicBitmapText: __webpack_require__(190), + Extern: __webpack_require__(396), + Graphics: __webpack_require__(191), Group: __webpack_require__(97), - Image: __webpack_require__(98), - Particles: __webpack_require__(966), - PathFollower: __webpack_require__(401), - RenderTexture: __webpack_require__(193), - RetroFont: __webpack_require__(975), - Sprite: __webpack_require__(69), - Text: __webpack_require__(195), - TileSprite: __webpack_require__(196), + Image: __webpack_require__(107), + Particles: __webpack_require__(971), + PathFollower: __webpack_require__(408), + RenderTexture: __webpack_require__(195), + RetroFont: __webpack_require__(980), + Rope: __webpack_require__(197), + Sprite: __webpack_require__(75), + Text: __webpack_require__(198), + TileSprite: __webpack_require__(199), Zone: __webpack_require__(110), - Video: __webpack_require__(197), + Video: __webpack_require__(200), // Shapes Shape: __webpack_require__(30), - 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), + Arc: __webpack_require__(409), + Curve: __webpack_require__(410), + Ellipse: __webpack_require__(411), + Grid: __webpack_require__(412), + IsoBox: __webpack_require__(413), + IsoTriangle: __webpack_require__(414), + Line: __webpack_require__(415), + Polygon: __webpack_require__(416), + Rectangle: __webpack_require__(421), + Star: __webpack_require__(422), + Triangle: __webpack_require__(423), // Game Object Factories Factories: { - 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), + Blitter: __webpack_require__(1031), + Container: __webpack_require__(1032), + DOMElement: __webpack_require__(1033), + DynamicBitmapText: __webpack_require__(1034), + Extern: __webpack_require__(1035), + Graphics: __webpack_require__(1036), + Group: __webpack_require__(1037), + Image: __webpack_require__(1038), + Particles: __webpack_require__(1039), + PathFollower: __webpack_require__(1040), + RenderTexture: __webpack_require__(1041), + Rope: __webpack_require__(1042), + Sprite: __webpack_require__(1043), + StaticBitmapText: __webpack_require__(1044), + Text: __webpack_require__(1045), + TileSprite: __webpack_require__(1046), + Zone: __webpack_require__(1047), + Video: __webpack_require__(1048), // Shapes - 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) + Arc: __webpack_require__(1049), + Curve: __webpack_require__(1050), + Ellipse: __webpack_require__(1051), + Grid: __webpack_require__(1052), + IsoBox: __webpack_require__(1053), + IsoTriangle: __webpack_require__(1054), + Line: __webpack_require__(1055), + Polygon: __webpack_require__(1056), + Rectangle: __webpack_require__(1057), + Star: __webpack_require__(1058), + Triangle: __webpack_require__(1059) }, Creators: { - 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) + Blitter: __webpack_require__(1060), + Container: __webpack_require__(1061), + DynamicBitmapText: __webpack_require__(1062), + Graphics: __webpack_require__(1063), + Group: __webpack_require__(1064), + Image: __webpack_require__(1065), + Particles: __webpack_require__(1066), + RenderTexture: __webpack_require__(1067), + Rope: __webpack_require__(1068), + Sprite: __webpack_require__(1069), + StaticBitmapText: __webpack_require__(1070), + Text: __webpack_require__(1071), + TileSprite: __webpack_require__(1072), + Zone: __webpack_require__(1073), + Video: __webpack_require__(1074) } }; @@ -138306,29 +141311,29 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(130); - GameObjects.Quad = __webpack_require__(200); - GameObjects.Shader = __webpack_require__(201); + GameObjects.Mesh = __webpack_require__(134); + GameObjects.Quad = __webpack_require__(203); + GameObjects.Shader = __webpack_require__(204); - GameObjects.Factories.Mesh = __webpack_require__(1071); - GameObjects.Factories.Quad = __webpack_require__(1072); - GameObjects.Factories.Shader = __webpack_require__(1073); + GameObjects.Factories.Mesh = __webpack_require__(1081); + GameObjects.Factories.Quad = __webpack_require__(1082); + GameObjects.Factories.Shader = __webpack_require__(1083); - GameObjects.Creators.Mesh = __webpack_require__(1074); - GameObjects.Creators.Quad = __webpack_require__(1075); - GameObjects.Creators.Shader = __webpack_require__(1076); + GameObjects.Creators.Mesh = __webpack_require__(1084); + GameObjects.Creators.Quad = __webpack_require__(1085); + GameObjects.Creators.Shader = __webpack_require__(1086); - GameObjects.Light = __webpack_require__(420); + GameObjects.Light = __webpack_require__(427); - __webpack_require__(421); - __webpack_require__(1077); + __webpack_require__(428); + __webpack_require__(1087); } module.exports = GameObjects; /***/ }), -/* 906 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138338,10 +141343,10 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(126); +var List = __webpack_require__(129); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var StableSort = __webpack_require__(128); +var SceneEvents = __webpack_require__(22); +var StableSort = __webpack_require__(131); /** * @classdesc @@ -138533,7 +141538,7 @@ module.exports = DisplayList; /***/ }), -/* 907 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138548,21 +141553,21 @@ module.exports = DisplayList; module.exports = { - 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) + CheckMatrix: __webpack_require__(184), + MatrixToString: __webpack_require__(915), + ReverseColumns: __webpack_require__(916), + ReverseRows: __webpack_require__(917), + Rotate180: __webpack_require__(918), + RotateLeft: __webpack_require__(919), + RotateMatrix: __webpack_require__(130), + RotateRight: __webpack_require__(920), + TransposeMatrix: __webpack_require__(389) }; /***/ }), -/* 908 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138571,8 +141576,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(160); -var CheckMatrix = __webpack_require__(182); +var Pad = __webpack_require__(163); +var CheckMatrix = __webpack_require__(184); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -138643,7 +141648,7 @@ module.exports = MatrixToString; /***/ }), -/* 909 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -138674,7 +141679,7 @@ module.exports = ReverseColumns; /***/ }), -/* 910 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -138710,7 +141715,7 @@ module.exports = ReverseRows; /***/ }), -/* 911 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138719,7 +141724,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(127); +var RotateMatrix = __webpack_require__(130); /** * Rotates the array matrix 180 degrees. @@ -138743,7 +141748,7 @@ module.exports = Rotate180; /***/ }), -/* 912 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138752,7 +141757,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(127); +var RotateMatrix = __webpack_require__(130); /** * Rotates the array matrix to the left (or 90 degrees) @@ -138776,7 +141781,7 @@ module.exports = RotateLeft; /***/ }), -/* 913 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138785,7 +141790,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(127); +var RotateMatrix = __webpack_require__(130); /** * Rotates the array matrix to the left (or -90 degrees) @@ -138809,7 +141814,7 @@ module.exports = RotateRight; /***/ }), -/* 914 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -138926,7 +141931,7 @@ module.exports = Add; /***/ }), -/* 915 */ +/* 922 */ /***/ (function(module, exports) { /** @@ -139048,7 +142053,7 @@ module.exports = AddAt; /***/ }), -/* 916 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -139086,7 +142091,7 @@ module.exports = BringToTop; /***/ }), -/* 917 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139138,7 +142143,7 @@ module.exports = CountAllMatching; /***/ }), -/* 918 */ +/* 925 */ /***/ (function(module, exports) { /** @@ -139184,7 +142189,7 @@ module.exports = Each; /***/ }), -/* 919 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139240,128 +142245,7 @@ module.exports = EachInRange; /***/ }), -/* 920 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(68); - -/** - * Returns all elements in the array. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return only elements that have their visible property set. - * - * Optionally you can specify a start and end index. For example if the array had 100 elements, - * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only - * the first 50 elements. - * - * @function Phaser.Utils.Array.GetAll - * @since 3.4.0 - * - * @param {array} array - The array to search. - * @param {string} [property] - The property to test on each array element. - * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. - * @param {integer} [startIndex] - An optional start index to search from. - * @param {integer} [endIndex] - An optional end index to search to. - * - * @return {array} All matching elements from the array. - */ -var GetAll = function (array, property, value, startIndex, endIndex) -{ - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = array.length; } - - var output = []; - - if (SafeRange(array, startIndex, endIndex)) - { - for (var i = startIndex; i < endIndex; i++) - { - var child = array[i]; - - if (!property || - (property && value === undefined && child.hasOwnProperty(property)) || - (property && value !== undefined && child[property] === value)) - { - output.push(child); - } - } - } - - return output; -}; - -module.exports = GetAll; - - -/***/ }), -/* 921 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(68); - -/** - * Returns the first element in the array. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. - * - * Optionally you can specify a start and end index. For example if the array had 100 elements, - * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. - * - * @function Phaser.Utils.Array.GetFirst - * @since 3.4.0 - * - * @param {array} array - The array to search. - * @param {string} [property] - The property to test on each array element. - * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. - * @param {integer} [startIndex=0] - An optional start index to search from. - * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) - * - * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. - */ -var GetFirst = function (array, property, value, startIndex, endIndex) -{ - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = array.length; } - - if (SafeRange(array, startIndex, endIndex)) - { - for (var i = startIndex; i < endIndex; i++) - { - var child = array[i]; - - if (!property || - (property && value === undefined && child.hasOwnProperty(property)) || - (property && value !== undefined && child[property] === value)) - { - return child; - } - } - } - - return null; -}; - -module.exports = GetFirst; - - -/***/ }), -/* 922 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -139403,7 +142287,7 @@ module.exports = MoveDown; /***/ }), -/* 923 */ +/* 928 */ /***/ (function(module, exports) { /** @@ -139450,7 +142334,7 @@ module.exports = MoveTo; /***/ }), -/* 924 */ +/* 929 */ /***/ (function(module, exports) { /** @@ -139492,7 +142376,7 @@ module.exports = MoveUp; /***/ }), -/* 925 */ +/* 930 */ /***/ (function(module, exports) { /** @@ -139556,7 +142440,7 @@ module.exports = NumberArray; /***/ }), -/* 926 */ +/* 931 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139565,7 +142449,7 @@ module.exports = NumberArray; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(328); +var RoundAwayFromZero = __webpack_require__(331); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -139633,7 +142517,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 927 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139642,7 +142526,7 @@ module.exports = NumberArrayStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(79); +var SpliceOne = __webpack_require__(80); /** * Removes the item from the given position in the array. @@ -139684,7 +142568,7 @@ module.exports = RemoveAt; /***/ }), -/* 928 */ +/* 933 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139747,7 +142631,7 @@ module.exports = RemoveBetween; /***/ }), -/* 929 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139756,7 +142640,7 @@ module.exports = RemoveBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(79); +var SpliceOne = __webpack_require__(80); /** * Removes a random object from the given array and returns it. @@ -139785,7 +142669,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 930 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -139829,7 +142713,7 @@ module.exports = Replace; /***/ }), -/* 931 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -139867,7 +142751,7 @@ module.exports = SendToBack; /***/ }), -/* 932 */ +/* 937 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139922,7 +142806,7 @@ module.exports = SetAll; /***/ }), -/* 933 */ +/* 938 */ /***/ (function(module, exports) { /** @@ -139970,7 +142854,7 @@ module.exports = Swap; /***/ }), -/* 934 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139980,9 +142864,9 @@ module.exports = Swap; */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(184); +var ProcessQueue = __webpack_require__(186); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -140271,7 +143155,7 @@ module.exports = UpdateList; /***/ }), -/* 935 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140286,14 +143170,14 @@ module.exports = UpdateList; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(936), - PROCESS_QUEUE_REMOVE: __webpack_require__(937) + PROCESS_QUEUE_ADD: __webpack_require__(941), + PROCESS_QUEUE_REMOVE: __webpack_require__(942) }; /***/ }), -/* 936 */ +/* 941 */ /***/ (function(module, exports) { /** @@ -140320,7 +143204,7 @@ module.exports = 'add'; /***/ }), -/* 937 */ +/* 942 */ /***/ (function(module, exports) { /** @@ -140347,7 +143231,7 @@ module.exports = 'remove'; /***/ }), -/* 938 */ +/* 943 */ /***/ (function(module, exports) { /** @@ -140800,7 +143684,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 939 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140809,7 +143693,7 @@ module.exports = GetBitmapTextSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(185); +var ParseXMLBitmapFont = __webpack_require__(187); /** * Parse an XML Bitmap Font from an Atlas. @@ -140853,7 +143737,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 940 */ +/* 945 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140867,12 +143751,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(941); + renderWebGL = __webpack_require__(946); } if (true) { - renderCanvas = __webpack_require__(942); + renderCanvas = __webpack_require__(947); } module.exports = { @@ -140884,7 +143768,7 @@ module.exports = { /***/ }), -/* 941 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140893,7 +143777,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -141120,7 +144004,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 942 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141129,7 +144013,7 @@ module.exports = BitmapTextWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -141302,7 +144186,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 943 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141316,12 +144200,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(944); + renderWebGL = __webpack_require__(949); } if (true) { - renderCanvas = __webpack_require__(945); + renderCanvas = __webpack_require__(950); } module.exports = { @@ -141333,7 +144217,7 @@ module.exports = { /***/ }), -/* 944 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141342,7 +144226,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -141463,7 +144347,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 945 */ +/* 950 */ /***/ (function(module, exports) { /** @@ -141593,7 +144477,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 946 */ +/* 951 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141750,7 +144634,7 @@ var Bob = new Class({ * * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFrame: function (frame) { @@ -141776,7 +144660,7 @@ var Bob = new Class({ * @method Phaser.GameObjects.Bob#resetFlip * @since 3.0.0 * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ resetFlip: function () { @@ -141800,7 +144684,7 @@ var Bob = new Class({ * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ reset: function (x, y, frame) { @@ -141832,7 +144716,7 @@ var Bob = new Class({ * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setPosition: function (x, y) { @@ -141850,7 +144734,7 @@ var Bob = new Class({ * * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlipX: function (value) { @@ -141867,7 +144751,7 @@ var Bob = new Class({ * * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlipY: function (value) { @@ -141885,7 +144769,7 @@ var Bob = new Class({ * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlip: function (x, y) { @@ -141905,7 +144789,7 @@ var Bob = new Class({ * * @param {boolean} value - The visible state of the Game Object. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setVisible: function (value) { @@ -141925,7 +144809,7 @@ var Bob = new Class({ * * @param {number} value - The alpha value used for this Bob. Between 0 and 1. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setAlpha: function (value) { @@ -141942,7 +144826,7 @@ var Bob = new Class({ * * @param {number} value - The tint value used for this Bob. Between 0 and 0xffffff. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setTint: function (value) { @@ -142023,7 +144907,7 @@ module.exports = Bob; /***/ }), -/* 947 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142038,12 +144922,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(948); + renderWebGL = __webpack_require__(953); } if (true) { - renderCanvas = __webpack_require__(949); + renderCanvas = __webpack_require__(954); } module.exports = { @@ -142055,7 +144939,7 @@ module.exports = { /***/ }), -/* 948 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -142204,7 +145088,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 949 */ +/* 954 */ /***/ (function(module, exports) { /** @@ -142301,7 +145185,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 950 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142315,12 +145199,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(388); + renderWebGL = __webpack_require__(395); } if (true) { - renderCanvas = __webpack_require__(388); + renderCanvas = __webpack_require__(395); } module.exports = { @@ -142332,7 +145216,7 @@ module.exports = { /***/ }), -/* 951 */ +/* 956 */ /***/ (function(module, exports) { /** @@ -142373,7 +145257,7 @@ module.exports = [ /***/ }), -/* 952 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142387,12 +145271,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(953); + renderWebGL = __webpack_require__(958); } if (true) { - renderCanvas = __webpack_require__(954); + renderCanvas = __webpack_require__(959); } module.exports = { @@ -142404,7 +145288,7 @@ module.exports = { /***/ }), -/* 953 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142413,7 +145297,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -142710,7 +145594,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 954 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142719,7 +145603,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -142921,7 +145805,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 955 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142935,12 +145819,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(956); + renderWebGL = __webpack_require__(961); } if (true) { - renderCanvas = __webpack_require__(957); + renderCanvas = __webpack_require__(962); } module.exports = { @@ -142952,7 +145836,7 @@ module.exports = { /***/ }), -/* 956 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -143021,13 +145905,13 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 957 */ +/* 962 */ /***/ (function(module, exports) { /***/ }), -/* 958 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143041,15 +145925,15 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(959); + renderWebGL = __webpack_require__(964); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(393); + renderCanvas = __webpack_require__(400); } if (true) { - renderCanvas = __webpack_require__(393); + renderCanvas = __webpack_require__(400); } module.exports = { @@ -143061,7 +145945,7 @@ module.exports = { /***/ }), -/* 959 */ +/* 964 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143070,8 +145954,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(190); -var Utils = __webpack_require__(10); +var Commands = __webpack_require__(192); +var Utils = __webpack_require__(9); // TODO: Remove the use of this var Point = function (x, y, width) @@ -143426,7 +146310,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 960 */ +/* 965 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143440,12 +146324,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(961); + renderWebGL = __webpack_require__(966); } if (true) { - renderCanvas = __webpack_require__(962); + renderCanvas = __webpack_require__(967); } module.exports = { @@ -143457,7 +146341,7 @@ module.exports = { /***/ }), -/* 961 */ +/* 966 */ /***/ (function(module, exports) { /** @@ -143490,7 +146374,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 962 */ +/* 967 */ /***/ (function(module, exports) { /** @@ -143523,7 +146407,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 963 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143537,12 +146421,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(964); + renderWebGL = __webpack_require__(969); } if (true) { - renderCanvas = __webpack_require__(965); + renderCanvas = __webpack_require__(970); } module.exports = { @@ -143554,7 +146438,7 @@ module.exports = { /***/ }), -/* 964 */ +/* 969 */ /***/ (function(module, exports) { /** @@ -143587,7 +146471,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 965 */ +/* 970 */ /***/ (function(module, exports) { /** @@ -143620,7 +146504,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 966 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143635,17 +146519,17 @@ module.exports = ImageCanvasRenderer; module.exports = { - GravityWell: __webpack_require__(394), - Particle: __webpack_require__(395), - ParticleEmitter: __webpack_require__(396), - ParticleEmitterManager: __webpack_require__(192), - Zones: __webpack_require__(971) + GravityWell: __webpack_require__(401), + Particle: __webpack_require__(402), + ParticleEmitter: __webpack_require__(403), + ParticleEmitterManager: __webpack_require__(194), + Zones: __webpack_require__(976) }; /***/ }), -/* 967 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143655,8 +146539,8 @@ module.exports = { */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(326); -var GetEaseFunction = __webpack_require__(82); +var FloatBetween = __webpack_require__(119); +var GetEaseFunction = __webpack_require__(69); var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(58); @@ -143859,7 +146743,7 @@ var EmitterOp = new Class({ * * @param {number} value - The value of the property. * - * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object. + * @return {this} This Emitter Op object. */ onChange: function (value) { @@ -143876,7 +146760,7 @@ var EmitterOp = new Class({ * @method Phaser.GameObjects.Particles.EmitterOp#setMethods * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object. + * @return {this} This Emitter Op object. */ setMethods: function () { @@ -144236,7 +147120,7 @@ module.exports = EmitterOp; /***/ }), -/* 968 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144250,12 +147134,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(969); + renderWebGL = __webpack_require__(974); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(975); } module.exports = { @@ -144267,7 +147151,7 @@ module.exports = { /***/ }), -/* 969 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144276,7 +147160,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -144426,7 +147310,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 970 */ +/* 975 */ /***/ (function(module, exports) { /** @@ -144549,7 +147433,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 971 */ +/* 976 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144564,15 +147448,15 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(397), - EdgeZone: __webpack_require__(398), - RandomZone: __webpack_require__(400) + DeathZone: __webpack_require__(404), + EdgeZone: __webpack_require__(405), + RandomZone: __webpack_require__(407) }; /***/ }), -/* 972 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144586,12 +147470,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(973); + renderWebGL = __webpack_require__(978); } if (true) { - renderCanvas = __webpack_require__(974); + renderCanvas = __webpack_require__(979); } module.exports = { @@ -144603,7 +147487,7 @@ module.exports = { /***/ }), -/* 973 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144612,7 +147496,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -144666,7 +147550,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 974 */ +/* 979 */ /***/ (function(module, exports) { /** @@ -144699,7 +147583,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 975 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144708,15 +147592,15 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(976); -var Extend = __webpack_require__(17); +var RETRO_FONT_CONST = __webpack_require__(981); +var Extend = __webpack_require__(18); /** * @namespace Phaser.GameObjects.RetroFont * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(977) }; +var RetroFont = { Parse: __webpack_require__(982) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -144725,7 +147609,7 @@ module.exports = RetroFont; /***/ }), -/* 976 */ +/* 981 */ /***/ (function(module, exports) { /** @@ -144841,7 +147725,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 977 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144957,7 +147841,206 @@ module.exports = ParseRetroFont; /***/ }), -/* 978 */ +/* 983 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); + +if (true) +{ + renderWebGL = __webpack_require__(984); +} + +if (true) +{ + renderCanvas = __webpack_require__(985); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 984 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Utils = __webpack_require__(9); + +/** + * 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 = src.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 alpha = src.alpha; + var getTint = Utils.getTintAppendFloatAlphaAndSwap; + var roundPixels = camera.roundPixels; + + var meshVerticesLength = vertices.length; + var vertexCount = Math.floor(meshVerticesLength * 0.5); + + // Because it's a triangle strip and we don't want lots of degenerate triangles joining things up + 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(); + } + + var debugCallback = src.debugCallback; + var debugVerts = []; + + 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 (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] = getTint(colors[colorIndex], camera.alpha * (alphas[colorIndex] * alpha)); + + colorIndex++; + + if (debugCallback) + { + debugVerts[i + 0] = tx; + debugVerts[i + 1] = ty; + } + } + + if (debugCallback) + { + debugCallback.call(src, src, meshVerticesLength, debugVerts); + } + + pipeline.vertexCount += vertexCount; +}; + +module.exports = RopeWebGLRenderer; + + +/***/ }), +/* 985 */ +/***/ (function(module, exports) { + +/** + * @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.23.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; + + +/***/ }), +/* 986 */ /***/ (function(module, exports) { /** @@ -145039,7 +148122,7 @@ module.exports = GetTextSize; /***/ }), -/* 979 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145053,12 +148136,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(988); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(989); } module.exports = { @@ -145070,7 +148153,7 @@ module.exports = { /***/ }), -/* 980 */ +/* 988 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145079,7 +148162,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -145135,7 +148218,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 981 */ +/* 989 */ /***/ (function(module, exports) { /** @@ -145173,7 +148256,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 982 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145183,9 +148266,9 @@ module.exports = TextCanvasRenderer; */ var Class = __webpack_require__(0); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(983); +var MeasureText = __webpack_require__(991); // Key: [ Object Key, Default Value ] @@ -146226,7 +149309,7 @@ module.exports = TextStyle; /***/ }), -/* 983 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146361,7 +149444,7 @@ module.exports = MeasureText; /***/ }), -/* 984 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146375,12 +149458,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(985); + renderWebGL = __webpack_require__(993); } if (true) { - renderCanvas = __webpack_require__(986); + renderCanvas = __webpack_require__(994); } module.exports = { @@ -146392,7 +149475,7 @@ module.exports = { /***/ }), -/* 985 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146401,7 +149484,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -146452,7 +149535,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 986 */ +/* 994 */ /***/ (function(module, exports) { /** @@ -146487,7 +149570,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 987 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146501,12 +149584,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(988); + renderWebGL = __webpack_require__(996); } if (true) { - renderCanvas = __webpack_require__(989); + renderCanvas = __webpack_require__(997); } module.exports = { @@ -146518,7 +149601,7 @@ module.exports = { /***/ }), -/* 988 */ +/* 996 */ /***/ (function(module, exports) { /** @@ -146554,7 +149637,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 989 */ +/* 997 */ /***/ (function(module, exports) { /** @@ -146590,7 +149673,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 990 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146604,12 +149687,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(991); + renderWebGL = __webpack_require__(999); } if (true) { - renderCanvas = __webpack_require__(992); + renderCanvas = __webpack_require__(1000); } module.exports = { @@ -146621,7 +149704,7 @@ module.exports = { /***/ }), -/* 991 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146630,7 +149713,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -146699,7 +149782,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 992 */ +/* 1000 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146709,9 +149792,9 @@ module.exports = ArcWebGLRenderer; */ var DegToRad = __webpack_require__(35); -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -146775,7 +149858,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 993 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146789,12 +149872,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(994); + renderWebGL = __webpack_require__(1002); } if (true) { - renderCanvas = __webpack_require__(995); + renderCanvas = __webpack_require__(1003); } module.exports = { @@ -146806,7 +149889,7 @@ module.exports = { /***/ }), -/* 994 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146815,7 +149898,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -146884,7 +149967,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 995 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146893,9 +149976,9 @@ module.exports = CurveWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -146972,7 +150055,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 996 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146986,12 +150069,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(997); + renderWebGL = __webpack_require__(1005); } if (true) { - renderCanvas = __webpack_require__(998); + renderCanvas = __webpack_require__(1006); } module.exports = { @@ -147003,7 +150086,7 @@ module.exports = { /***/ }), -/* 997 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147012,7 +150095,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -147081,7 +150164,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 998 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147090,9 +150173,9 @@ module.exports = EllipseWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -147166,7 +150249,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 999 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147180,12 +150263,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1000); + renderWebGL = __webpack_require__(1008); } if (true) { - renderCanvas = __webpack_require__(1001); + renderCanvas = __webpack_require__(1009); } module.exports = { @@ -147197,7 +150280,7 @@ module.exports = { /***/ }), -/* 1000 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147206,7 +150289,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -147423,7 +150506,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1001 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147432,9 +150515,9 @@ module.exports = GridWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -147612,7 +150695,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1002 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147626,12 +150709,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1003); + renderWebGL = __webpack_require__(1011); } if (true) { - renderCanvas = __webpack_require__(1004); + renderCanvas = __webpack_require__(1012); } module.exports = { @@ -147643,7 +150726,7 @@ module.exports = { /***/ }), -/* 1003 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147652,7 +150735,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -147801,7 +150884,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1004 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147810,8 +150893,8 @@ module.exports = IsoBoxWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); -var SetTransform = __webpack_require__(27); +var FillStyleCanvas = __webpack_require__(37); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -147902,7 +150985,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1005 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147916,12 +150999,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1006); + renderWebGL = __webpack_require__(1014); } if (true) { - renderCanvas = __webpack_require__(1007); + renderCanvas = __webpack_require__(1015); } module.exports = { @@ -147933,7 +151016,7 @@ module.exports = { /***/ }), -/* 1006 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147942,7 +151025,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -148110,7 +151193,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1007 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148119,8 +151202,8 @@ module.exports = IsoTriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); -var SetTransform = __webpack_require__(27); +var FillStyleCanvas = __webpack_require__(37); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -148224,7 +151307,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1008 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148238,12 +151321,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1009); + renderWebGL = __webpack_require__(1017); } if (true) { - renderCanvas = __webpack_require__(1010); + renderCanvas = __webpack_require__(1018); } module.exports = { @@ -148255,7 +151338,7 @@ module.exports = { /***/ }), -/* 1009 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148264,7 +151347,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -148348,7 +151431,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1010 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148358,7 +151441,7 @@ module.exports = LineWebGLRenderer; */ var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -148405,7 +151488,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1011 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148419,12 +151502,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1012); + renderWebGL = __webpack_require__(1020); } if (true) { - renderCanvas = __webpack_require__(1013); + renderCanvas = __webpack_require__(1021); } module.exports = { @@ -148436,7 +151519,7 @@ module.exports = { /***/ }), -/* 1012 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148445,7 +151528,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -148514,7 +151597,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1013 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148523,9 +151606,9 @@ module.exports = PolygonWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -148599,7 +151682,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1014 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148613,12 +151696,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1015); + renderWebGL = __webpack_require__(1023); } if (true) { - renderCanvas = __webpack_require__(1016); + renderCanvas = __webpack_require__(1024); } module.exports = { @@ -148630,7 +151713,7 @@ module.exports = { /***/ }), -/* 1015 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148640,7 +151723,7 @@ module.exports = { */ var StrokePathWebGL = __webpack_require__(70); -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -148722,7 +151805,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1016 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148731,9 +151814,9 @@ module.exports = RectangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -148796,7 +151879,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1017 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148810,12 +151893,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1018); + renderWebGL = __webpack_require__(1026); } if (true) { - renderCanvas = __webpack_require__(1019); + renderCanvas = __webpack_require__(1027); } module.exports = { @@ -148827,7 +151910,7 @@ module.exports = { /***/ }), -/* 1018 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148836,7 +151919,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -148905,7 +151988,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1019 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148914,9 +151997,9 @@ module.exports = StarWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -148990,7 +152073,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1020 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149004,12 +152087,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1021); + renderWebGL = __webpack_require__(1029); } if (true) { - renderCanvas = __webpack_require__(1022); + renderCanvas = __webpack_require__(1030); } module.exports = { @@ -149021,7 +152104,7 @@ module.exports = { /***/ }), -/* 1021 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149031,7 +152114,7 @@ module.exports = { */ var StrokePathWebGL = __webpack_require__(70); -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -149124,7 +152207,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1022 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149133,9 +152216,9 @@ module.exports = TriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -149199,7 +152282,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1023 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149208,7 +152291,7 @@ module.exports = TriangleCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(186); +var Blitter = __webpack_require__(188); var GameObjectFactory = __webpack_require__(5); /** @@ -149241,7 +152324,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1024 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149251,7 +152334,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(187); +var Container = __webpack_require__(189); var GameObjectFactory = __webpack_require__(5); /** @@ -149275,7 +152358,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1025 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149284,7 +152367,7 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(387); +var DOMElement = __webpack_require__(394); var GameObjectFactory = __webpack_require__(5); /** @@ -149365,7 +152448,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1026 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149374,7 +152457,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(188); +var DynamicBitmapText = __webpack_require__(190); var GameObjectFactory = __webpack_require__(5); /** @@ -149434,7 +152517,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1027 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149443,7 +152526,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(389); +var Extern = __webpack_require__(396); var GameObjectFactory = __webpack_require__(5); /** @@ -149476,7 +152559,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1028 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149485,7 +152568,7 @@ GameObjectFactory.register('extern', function () * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(189); +var Graphics = __webpack_require__(191); var GameObjectFactory = __webpack_require__(5); /** @@ -149515,7 +152598,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1029 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149547,7 +152630,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1030 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149556,7 +152639,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(98); +var Image = __webpack_require__(107); var GameObjectFactory = __webpack_require__(5); /** @@ -149589,7 +152672,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1031 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149599,7 +152682,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var ParticleEmitterManager = __webpack_require__(192); +var ParticleEmitterManager = __webpack_require__(194); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -149635,7 +152718,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1032 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149645,7 +152728,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(5); -var PathFollower = __webpack_require__(401); +var PathFollower = __webpack_require__(408); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -149683,7 +152766,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1033 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149693,7 +152776,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var RenderTexture = __webpack_require__(193); +var RenderTexture = __webpack_require__(195); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -149723,7 +152806,61 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1034 */ +/* 1042 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rope = __webpack_require__(197); +var GameObjectFactory = __webpack_require__(5); + +/** + * 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#rope + * @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 {boolean} [horizontal=true] - Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)? + * @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 (true) +{ + GameObjectFactory.register('rope', function (x, y, texture, frame, points, horizontal, colors, alphas) + { + var rope = new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas); + + this.displayList.add(rope); + + return this.updateList.add(rope); + }); +} + +// 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 + + +/***/ }), +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149733,7 +152870,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, */ var GameObjectFactory = __webpack_require__(5); -var Sprite = __webpack_require__(69); +var Sprite = __webpack_require__(75); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -149770,7 +152907,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1035 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149779,7 +152916,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(129); +var BitmapText = __webpack_require__(132); var GameObjectFactory = __webpack_require__(5); /** @@ -149834,7 +152971,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1036 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149843,7 +152980,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(195); +var Text = __webpack_require__(198); var GameObjectFactory = __webpack_require__(5); /** @@ -149899,7 +153036,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1037 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149908,7 +153045,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(196); +var TileSprite = __webpack_require__(199); var GameObjectFactory = __webpack_require__(5); /** @@ -149943,7 +153080,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1038 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149985,7 +153122,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1039 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149994,23 +153131,22 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(197); +var Video = __webpack_require__(200); var GameObjectFactory = __webpack_require__(5); /** - * Creates a new Image Game Object and adds it to the Scene. + * Creates a new Video 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. + * Note: This method will only be available if the Video Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectFactory#video * @since 3.20.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 {string} [key] - Optional key of the Video this Game Object will play, as stored in the Video Cache. * - * @return {Phaser.GameObjects.Image} The Game Object that was created. + * @return {Phaser.GameObjects.Video} The Game Object that was created. */ GameObjectFactory.register('video', function (x, y, key) { @@ -150032,7 +153168,7 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1040 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150041,7 +153177,7 @@ GameObjectFactory.register('video', function (x, y, key) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(402); +var Arc = __webpack_require__(409); var GameObjectFactory = __webpack_require__(5); /** @@ -150105,7 +153241,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1041 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150115,7 +153251,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph */ var GameObjectFactory = __webpack_require__(5); -var Curve = __webpack_require__(403); +var Curve = __webpack_require__(410); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -150155,7 +153291,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1042 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150164,7 +153300,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(404); +var Ellipse = __webpack_require__(411); var GameObjectFactory = __webpack_require__(5); /** @@ -150207,7 +153343,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1043 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150217,7 +153353,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, */ var GameObjectFactory = __webpack_require__(5); -var Grid = __webpack_require__(405); +var Grid = __webpack_require__(412); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -150262,7 +153398,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1044 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150272,7 +153408,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel */ var GameObjectFactory = __webpack_require__(5); -var IsoBox = __webpack_require__(406); +var IsoBox = __webpack_require__(413); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -150313,7 +153449,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1045 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150323,7 +153459,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill */ var GameObjectFactory = __webpack_require__(5); -var IsoTriangle = __webpack_require__(407); +var IsoTriangle = __webpack_require__(414); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -150366,7 +153502,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1046 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150376,7 +153512,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed */ var GameObjectFactory = __webpack_require__(5); -var Line = __webpack_require__(408); +var Line = __webpack_require__(415); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -150417,7 +153553,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1047 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150427,7 +153563,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, */ var GameObjectFactory = __webpack_require__(5); -var Polygon = __webpack_require__(409); +var Polygon = __webpack_require__(416); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -150470,7 +153606,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1048 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150480,7 +153616,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp */ var GameObjectFactory = __webpack_require__(5); -var Rectangle = __webpack_require__(414); +var Rectangle = __webpack_require__(421); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -150515,7 +153651,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1049 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150524,7 +153660,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(415); +var Star = __webpack_require__(422); var GameObjectFactory = __webpack_require__(5); /** @@ -150567,7 +153703,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1050 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150577,7 +153713,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad */ var GameObjectFactory = __webpack_require__(5); -var Triangle = __webpack_require__(416); +var Triangle = __webpack_require__(423); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -150618,7 +153754,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1051 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150627,10 +153763,10 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(186); -var BuildGameObject = __webpack_require__(28); +var Blitter = __webpack_require__(188); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Creates a new Blitter Game Object and returns it. @@ -150668,7 +153804,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1052 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150678,10 +153814,10 @@ GameObjectCreator.register('blitter', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); -var Container = __webpack_require__(187); +var BuildGameObject = __webpack_require__(27); +var Container = __webpack_require__(189); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Creates a new Container Game Object and returns it. @@ -150717,7 +153853,7 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1053 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150726,10 +153862,10 @@ GameObjectCreator.register('container', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(188); -var BuildGameObject = __webpack_require__(28); +var BitmapText = __webpack_require__(190); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Creates a new Dynamic Bitmap Text Game Object and returns it. @@ -150768,7 +153904,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1054 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150778,7 +153914,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(189); +var Graphics = __webpack_require__(191); /** * Creates a new Graphics Game Object and returns it. @@ -150816,7 +153952,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1055 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150849,7 +153985,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1056 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150858,10 +153994,10 @@ GameObjectCreator.register('group', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(98); +var GetAdvancedValue = __webpack_require__(14); +var Image = __webpack_require__(107); /** * Creates a new Image Game Object and returns it. @@ -150899,7 +154035,7 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1057 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150909,9 +154045,9 @@ GameObjectCreator.register('image', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var ParticleEmitterManager = __webpack_require__(192); +var ParticleEmitterManager = __webpack_require__(194); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -150956,7 +154092,7 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1058 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150965,10 +154101,10 @@ GameObjectCreator.register('particles', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(193); +var GetAdvancedValue = __webpack_require__(14); +var RenderTexture = __webpack_require__(195); /** * Creates a new Render Texture Game Object and returns it. @@ -151008,7 +154144,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1059 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151017,11 +154153,66 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); -var BuildGameObjectAnimation = __webpack_require__(385); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Sprite = __webpack_require__(69); +var GetAdvancedValue = __webpack_require__(14); +var GetValue = __webpack_require__(6); +var Rope = __webpack_require__(197); + +/** + * 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 horizontal = GetAdvancedValue(config, 'horizontal', true); + 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, horizontal, 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. + + +/***/ }), +/* 1069 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BuildGameObject = __webpack_require__(27); +var BuildGameObjectAnimation = __webpack_require__(392); +var GameObjectCreator = __webpack_require__(16); +var GetAdvancedValue = __webpack_require__(14); +var Sprite = __webpack_require__(75); /** * Creates a new Sprite Game Object and returns it. @@ -151061,7 +154252,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1060 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151070,10 +154261,10 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(129); -var BuildGameObject = __webpack_require__(28); +var BitmapText = __webpack_require__(132); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var GetValue = __webpack_require__(6); /** @@ -151114,7 +154305,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1061 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151123,10 +154314,10 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(195); +var GetAdvancedValue = __webpack_require__(14); +var Text = __webpack_require__(198); /** * Creates a new Text Game Object and returns it. @@ -151201,7 +154392,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1062 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151210,10 +154401,10 @@ GameObjectCreator.register('text', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(196); +var GetAdvancedValue = __webpack_require__(14); +var TileSprite = __webpack_require__(199); /** * Creates a new TileSprite Game Object and returns it. @@ -151253,7 +154444,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1063 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151263,7 +154454,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var Zone = __webpack_require__(110); /** @@ -151292,7 +154483,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1064 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151301,10 +154492,10 @@ GameObjectCreator.register('zone', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(197); +var GetAdvancedValue = __webpack_require__(14); +var Video = __webpack_require__(200); /** * Creates a new Video Game Object and returns it. @@ -151341,7 +154532,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1065 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151355,12 +154546,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1066); + renderWebGL = __webpack_require__(1076); } if (true) { - renderCanvas = __webpack_require__(1067); + renderCanvas = __webpack_require__(1077); } module.exports = { @@ -151372,7 +154563,7 @@ module.exports = { /***/ }), -/* 1066 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151381,7 +154572,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -151490,7 +154681,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1067 */ +/* 1077 */ /***/ (function(module, exports) { /** @@ -151519,7 +154710,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1068 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151533,12 +154724,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1069); + renderWebGL = __webpack_require__(1079); } if (true) { - renderCanvas = __webpack_require__(1070); + renderCanvas = __webpack_require__(1080); } module.exports = { @@ -151550,7 +154741,7 @@ module.exports = { /***/ }), -/* 1069 */ +/* 1079 */ /***/ (function(module, exports) { /** @@ -151634,7 +154825,7 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1070 */ +/* 1080 */ /***/ (function(module, exports) { /** @@ -151663,7 +154854,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1071 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151672,7 +154863,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(130); +var Mesh = __webpack_require__(134); var GameObjectFactory = __webpack_require__(5); /** @@ -151713,7 +154904,7 @@ if (true) /***/ }), -/* 1072 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151722,7 +154913,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(200); +var Quad = __webpack_require__(203); var GameObjectFactory = __webpack_require__(5); /** @@ -151759,7 +154950,7 @@ if (true) /***/ }), -/* 1073 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151768,7 +154959,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(201); +var Shader = __webpack_require__(204); var GameObjectFactory = __webpack_require__(5); /** @@ -151800,7 +154991,7 @@ if (true) /***/ }), -/* 1074 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151809,11 +155000,11 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(130); +var Mesh = __webpack_require__(134); /** * Creates a new Mesh Game Object and returns it. @@ -151855,7 +155046,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1075 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151864,10 +155055,10 @@ GameObjectCreator.register('mesh', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(200); +var GetAdvancedValue = __webpack_require__(14); +var Quad = __webpack_require__(203); /** * Creates a new Quad Game Object and returns it. @@ -151905,7 +155096,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1076 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151914,10 +155105,10 @@ GameObjectCreator.register('quad', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(201); +var GetAdvancedValue = __webpack_require__(14); +var Shader = __webpack_require__(204); /** * Creates a new Shader Game Object and returns it. @@ -151958,7 +155149,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1077 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151968,9 +155159,9 @@ GameObjectCreator.register('shader', function (config, addToScene) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(421); +var LightsManager = __webpack_require__(428); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -152074,7 +155265,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1078 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152085,27 +155276,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(65); -Circle.Area = __webpack_require__(1079); -Circle.Circumference = __webpack_require__(265); -Circle.CircumferencePoint = __webpack_require__(146); -Circle.Clone = __webpack_require__(1080); +Circle.Area = __webpack_require__(1089); +Circle.Circumference = __webpack_require__(268); +Circle.CircumferencePoint = __webpack_require__(149); +Circle.Clone = __webpack_require__(1090); 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); +Circle.ContainsPoint = __webpack_require__(1091); +Circle.ContainsRect = __webpack_require__(1092); +Circle.CopyFrom = __webpack_require__(1093); +Circle.Equals = __webpack_require__(1094); +Circle.GetBounds = __webpack_require__(1095); +Circle.GetPoint = __webpack_require__(266); +Circle.GetPoints = __webpack_require__(267); +Circle.Offset = __webpack_require__(1096); +Circle.OffsetPoint = __webpack_require__(1097); +Circle.Random = __webpack_require__(150); module.exports = Circle; /***/ }), -/* 1079 */ +/* 1089 */ /***/ (function(module, exports) { /** @@ -152133,7 +155324,7 @@ module.exports = Area; /***/ }), -/* 1080 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152163,7 +155354,7 @@ module.exports = Clone; /***/ }), -/* 1081 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152194,7 +155385,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1082 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152230,7 +155421,7 @@ module.exports = ContainsRect; /***/ }), -/* 1083 */ +/* 1093 */ /***/ (function(module, exports) { /** @@ -152262,7 +155453,7 @@ module.exports = CopyFrom; /***/ }), -/* 1084 */ +/* 1094 */ /***/ (function(module, exports) { /** @@ -152296,7 +155487,7 @@ module.exports = Equals; /***/ }), -/* 1085 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152336,7 +155527,7 @@ module.exports = GetBounds; /***/ }), -/* 1086 */ +/* 1096 */ /***/ (function(module, exports) { /** @@ -152371,7 +155562,7 @@ module.exports = Offset; /***/ }), -/* 1087 */ +/* 1097 */ /***/ (function(module, exports) { /** @@ -152405,7 +155596,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1088 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152416,27 +155607,27 @@ module.exports = OffsetPoint; var Ellipse = __webpack_require__(95); -Ellipse.Area = __webpack_require__(1089); -Ellipse.Circumference = __webpack_require__(392); -Ellipse.CircumferencePoint = __webpack_require__(191); -Ellipse.Clone = __webpack_require__(1090); +Ellipse.Area = __webpack_require__(1099); +Ellipse.Circumference = __webpack_require__(399); +Ellipse.CircumferencePoint = __webpack_require__(193); +Ellipse.Clone = __webpack_require__(1100); Ellipse.Contains = __webpack_require__(96); -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); +Ellipse.ContainsPoint = __webpack_require__(1101); +Ellipse.ContainsRect = __webpack_require__(1102); +Ellipse.CopyFrom = __webpack_require__(1103); +Ellipse.Equals = __webpack_require__(1104); +Ellipse.GetBounds = __webpack_require__(1105); +Ellipse.GetPoint = __webpack_require__(397); +Ellipse.GetPoints = __webpack_require__(398); +Ellipse.Offset = __webpack_require__(1106); +Ellipse.OffsetPoint = __webpack_require__(1107); +Ellipse.Random = __webpack_require__(157); module.exports = Ellipse; /***/ }), -/* 1089 */ +/* 1099 */ /***/ (function(module, exports) { /** @@ -152470,7 +155661,7 @@ module.exports = Area; /***/ }), -/* 1090 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152500,7 +155691,7 @@ module.exports = Clone; /***/ }), -/* 1091 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152531,7 +155722,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1092 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152567,7 +155758,7 @@ module.exports = ContainsRect; /***/ }), -/* 1093 */ +/* 1103 */ /***/ (function(module, exports) { /** @@ -152599,7 +155790,7 @@ module.exports = CopyFrom; /***/ }), -/* 1094 */ +/* 1104 */ /***/ (function(module, exports) { /** @@ -152634,7 +155825,7 @@ module.exports = Equals; /***/ }), -/* 1095 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152674,7 +155865,7 @@ module.exports = GetBounds; /***/ }), -/* 1096 */ +/* 1106 */ /***/ (function(module, exports) { /** @@ -152709,7 +155900,7 @@ module.exports = Offset; /***/ }), -/* 1097 */ +/* 1107 */ /***/ (function(module, exports) { /** @@ -152743,7 +155934,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1098 */ +/* 1108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152754,7 +155945,7 @@ module.exports = OffsetPoint; */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(202); +var CircleToCircle = __webpack_require__(205); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -152837,7 +156028,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1099 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152847,8 +156038,8 @@ module.exports = GetCircleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(204); -var CircleToRectangle = __webpack_require__(203); +var GetLineToCircle = __webpack_require__(207); +var CircleToRectangle = __webpack_require__(206); /** * Checks for intersection between a circle and a rectangle, @@ -152887,7 +156078,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1100 */ +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152897,7 +156088,7 @@ module.exports = GetCircleToRectangle; */ var Rectangle = __webpack_require__(11); -var RectangleToRectangle = __webpack_require__(131); +var RectangleToRectangle = __webpack_require__(135); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -152936,7 +156127,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1101 */ +/* 1111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152946,8 +156137,8 @@ module.exports = GetRectangleIntersection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(206); -var RectangleToRectangle = __webpack_require__(131); +var GetLineToRectangle = __webpack_require__(209); +var RectangleToRectangle = __webpack_require__(135); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -152987,7 +156178,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1102 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152997,8 +156188,8 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(425); -var GetLineToRectangle = __webpack_require__(206); +var RectangleToTriangle = __webpack_require__(432); +var GetLineToRectangle = __webpack_require__(209); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -153035,7 +156226,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1103 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153045,8 +156236,8 @@ module.exports = GetRectangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(204); -var TriangleToCircle = __webpack_require__(427); +var GetLineToCircle = __webpack_require__(207); +var TriangleToCircle = __webpack_require__(434); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -153084,7 +156275,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1104 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153094,8 +156285,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(430); -var GetTriangleToLine = __webpack_require__(428); +var TriangleToTriangle = __webpack_require__(437); +var GetTriangleToLine = __webpack_require__(435); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -153133,7 +156324,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1105 */ +/* 1115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153142,7 +156333,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(432); +var PointToLine = __webpack_require__(439); /** * Checks if a Point is located on the given line segment. @@ -153174,7 +156365,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1106 */ +/* 1116 */ /***/ (function(module, exports) { /** @@ -153214,7 +156405,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1107 */ +/* 1117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153226,39 +156417,40 @@ module.exports = RectangleToValues; var Line = __webpack_require__(56); Line.Angle = __webpack_require__(85); -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.BresenhamPoints = __webpack_require__(288); +Line.CenterOn = __webpack_require__(1118); +Line.Clone = __webpack_require__(1119); +Line.CopyFrom = __webpack_require__(1120); +Line.Equals = __webpack_require__(1121); +Line.Extend = __webpack_require__(1122); +Line.GetEasedPoints = __webpack_require__(1123); +Line.GetMidPoint = __webpack_require__(1124); +Line.GetNearestPoint = __webpack_require__(1125); +Line.GetNormal = __webpack_require__(1126); +Line.GetPoint = __webpack_require__(275); +Line.GetPoints = __webpack_require__(153); +Line.GetShortestDistance = __webpack_require__(1127); +Line.Height = __webpack_require__(1128); 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); +Line.NormalAngle = __webpack_require__(440); +Line.NormalX = __webpack_require__(1129); +Line.NormalY = __webpack_require__(1130); +Line.Offset = __webpack_require__(1131); +Line.PerpSlope = __webpack_require__(1132); +Line.Random = __webpack_require__(154); +Line.ReflectAngle = __webpack_require__(1133); +Line.Rotate = __webpack_require__(1134); +Line.RotateAroundPoint = __webpack_require__(1135); +Line.RotateAroundXY = __webpack_require__(211); +Line.SetToAngle = __webpack_require__(1136); +Line.Slope = __webpack_require__(1137); +Line.Width = __webpack_require__(1138); module.exports = Line; /***/ }), -/* 1108 */ +/* 1118 */ /***/ (function(module, exports) { /** @@ -153298,7 +156490,7 @@ module.exports = CenterOn; /***/ }), -/* 1109 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153328,7 +156520,7 @@ module.exports = Clone; /***/ }), -/* 1110 */ +/* 1120 */ /***/ (function(module, exports) { /** @@ -153359,7 +156551,7 @@ module.exports = CopyFrom; /***/ }), -/* 1111 */ +/* 1121 */ /***/ (function(module, exports) { /** @@ -153393,7 +156585,7 @@ module.exports = Equals; /***/ }), -/* 1112 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153451,7 +156643,127 @@ module.exports = Extend; /***/ }), -/* 1113 */ +/* 1123 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DistanceBetweenPoints = __webpack_require__(319); +var GetEaseFunction = __webpack_require__(69); +var Point = __webpack_require__(4); + +/** + * Returns an array of `quantity` Points where each point is taken from the given Line, + * spaced out according to the ease function specified. + * + * ```javascript + * const line = new Phaser.Geom.Line(100, 300, 700, 300); + * const points = Phaser.Geom.Line.GetEasedPoints(line, 'sine.out', 32) + * ``` + * + * In the above example, the `points` array will contain 32 points spread-out across + * the length of `line`, where the position of each point is determined by the `Sine.out` + * ease function. + * + * You can optionally provide a collinear threshold. In this case, the resulting points + * are checked against each other, and if they are `< collinearThreshold` distance apart, + * they are dropped from the results. This can help avoid lots of clustered points at + * far ends of the line with tightly-packed eases such as Quartic. Leave the value set + * to zero to skip this check. + * + * Note that if you provide a collinear threshold, the resulting array may not always + * contain `quantity` points. + * + * @function Phaser.Geom.Line.GetEasedPoints + * @since 3.23.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line object. + * @param {(string|function)} ease - The ease to use. This can be either a string from the EaseMap, or a custom function. + * @param {integer} quantity - The number of points to return. Note that if you provide a `collinearThreshold`, the resulting array may not always contain this number of points. + * @param {number} [collinearThreshold=0] - An optional threshold. The final array is reduced so that each point is spaced out at least this distance apart. This helps reduce clustering in noisey eases. + * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. + * + * @return {Phaser.Geom.Point[]} An array of Geom.Points containing the coordinates of the points on the line. + */ +var GetEasedPoints = function (line, ease, quantity, collinearThreshold, easeParams) +{ + if (collinearThreshold === undefined) { collinearThreshold = 0; } + if (easeParams === undefined) { easeParams = []; } + + var results = []; + + var x1 = line.x1; + var y1 = line.y1; + + var spaceX = line.x2 - x1; + var spaceY = line.y2 - y1; + + var easeFunc = GetEaseFunction(ease, easeParams); + + var i; + var v; + var q = quantity - 1; + + for (i = 0; i < q; i++) + { + v = easeFunc(i / q); + + results.push(new Point(x1 + (spaceX * v), y1 + (spaceY * v))); + } + + // Always include the end of the line + v = easeFunc(1); + + results.push(new Point(x1 + (spaceX * v), y1 + (spaceY * v))); + + // Remove collinear parts + if (collinearThreshold > 0) + { + var prevPoint = results[0]; + + // Store the new results here + var sortedResults = [ prevPoint ]; + + for (i = 1; i < results.length - 1; i++) + { + var point = results[i]; + + if (DistanceBetweenPoints(prevPoint, point) >= collinearThreshold) + { + sortedResults.push(point); + prevPoint = point; + } + } + + // Top and tail + var endPoint = results[results.length - 1]; + + if (DistanceBetweenPoints(prevPoint, endPoint) < collinearThreshold) + { + sortedResults.pop(); + } + + sortedResults.push(endPoint); + + return sortedResults; + } + else + { + return results; + } +}; + +module.exports = GetEasedPoints; + + +/***/ }), +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153489,7 +156801,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1114 */ +/* 1125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153544,7 +156856,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1115 */ +/* 1126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153553,7 +156865,7 @@ module.exports = GetNearestPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Angle = __webpack_require__(85); var Point = __webpack_require__(4); @@ -153588,7 +156900,7 @@ module.exports = GetNormal; /***/ }), -/* 1116 */ +/* 1127 */ /***/ (function(module, exports) { /** @@ -153635,7 +156947,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1117 */ +/* 1128 */ /***/ (function(module, exports) { /** @@ -153663,7 +156975,7 @@ module.exports = Height; /***/ }), -/* 1118 */ +/* 1129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153672,18 +156984,18 @@ module.exports = Height; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Angle = __webpack_require__(85); /** - * [description] + * Returns the x component of the normal vector of the given line. * * @function Phaser.Geom.Line.NormalX * @since 3.0.0 * * @param {Phaser.Geom.Line} line - The Line object to get the normal value from. * - * @return {number} [description] + * @return {number} The x component of the normal vector of the line. */ var NormalX = function (line) { @@ -153694,7 +157006,7 @@ module.exports = NormalX; /***/ }), -/* 1119 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153703,7 +157015,7 @@ module.exports = NormalX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Angle = __webpack_require__(85); /** @@ -153726,7 +157038,7 @@ module.exports = NormalY; /***/ }), -/* 1120 */ +/* 1131 */ /***/ (function(module, exports) { /** @@ -153764,7 +157076,7 @@ module.exports = Offset; /***/ }), -/* 1121 */ +/* 1132 */ /***/ (function(module, exports) { /** @@ -153792,7 +157104,7 @@ module.exports = PerpSlope; /***/ }), -/* 1122 */ +/* 1133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153802,7 +157114,7 @@ module.exports = PerpSlope; */ var Angle = __webpack_require__(85); -var NormalAngle = __webpack_require__(433); +var NormalAngle = __webpack_require__(440); /** * Calculate the reflected angle between two lines. @@ -153826,7 +157138,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1123 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153835,7 +157147,7 @@ module.exports = ReflectAngle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(208); +var RotateAroundXY = __webpack_require__(211); /** * Rotate a line around its midpoint by the given angle in radians. @@ -153862,7 +157174,7 @@ module.exports = Rotate; /***/ }), -/* 1124 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153871,7 +157183,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(208); +var RotateAroundXY = __webpack_require__(211); /** * Rotate a line around a point by the given angle in radians. @@ -153896,7 +157208,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1125 */ +/* 1136 */ /***/ (function(module, exports) { /** @@ -153936,7 +157248,7 @@ module.exports = SetToAngle; /***/ }), -/* 1126 */ +/* 1137 */ /***/ (function(module, exports) { /** @@ -153964,7 +157276,7 @@ module.exports = Slope; /***/ }), -/* 1127 */ +/* 1138 */ /***/ (function(module, exports) { /** @@ -153992,7 +157304,7 @@ module.exports = Width; /***/ }), -/* 1128 */ +/* 1139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154003,27 +157315,27 @@ module.exports = Width; var Point = __webpack_require__(4); -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); +Point.Ceil = __webpack_require__(1140); +Point.Clone = __webpack_require__(1141); +Point.CopyFrom = __webpack_require__(1142); +Point.Equals = __webpack_require__(1143); +Point.Floor = __webpack_require__(1144); +Point.GetCentroid = __webpack_require__(1145); +Point.GetMagnitude = __webpack_require__(441); +Point.GetMagnitudeSq = __webpack_require__(442); +Point.GetRectangleFromPoints = __webpack_require__(1146); +Point.Interpolate = __webpack_require__(1147); +Point.Invert = __webpack_require__(1148); +Point.Negative = __webpack_require__(1149); +Point.Project = __webpack_require__(1150); +Point.ProjectUnit = __webpack_require__(1151); +Point.SetMagnitude = __webpack_require__(1152); module.exports = Point; /***/ }), -/* 1129 */ +/* 1140 */ /***/ (function(module, exports) { /** @@ -154053,7 +157365,7 @@ module.exports = Ceil; /***/ }), -/* 1130 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154083,7 +157395,7 @@ module.exports = Clone; /***/ }), -/* 1131 */ +/* 1142 */ /***/ (function(module, exports) { /** @@ -154114,7 +157426,7 @@ module.exports = CopyFrom; /***/ }), -/* 1132 */ +/* 1143 */ /***/ (function(module, exports) { /** @@ -154143,7 +157455,7 @@ module.exports = Equals; /***/ }), -/* 1133 */ +/* 1144 */ /***/ (function(module, exports) { /** @@ -154173,7 +157485,7 @@ module.exports = Floor; /***/ }), -/* 1134 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154193,10 +157505,10 @@ var Point = __webpack_require__(4); * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point[]} points - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Types.Math.Vector2Like[]} points - An array of Vector2Like objects to get the geometric center of. + * @param {Phaser.Geom.Point} [out] - A Point object to store the output coordinates in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object representing the geometric center of the given points. */ var GetCentroid = function (points, out) { @@ -154237,7 +157549,7 @@ module.exports = GetCentroid; /***/ }), -/* 1135 */ +/* 1146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154256,10 +157568,10 @@ var Rectangle = __webpack_require__(11); * * @generic {Phaser.Geom.Rectangle} O - [out,$return] * - * @param {Phaser.Geom.Point[]} points - [description] - * @param {Phaser.Geom.Rectangle} [out] - [description] + * @param {Phaser.Types.Math.Vector2Like[]} points - An array of Vector2Like objects to get the AABB from. + * @param {Phaser.Geom.Rectangle} [out] - A Rectangle object to store the results in. If not given, a new Rectangle instance is created. * - * @return {Phaser.Geom.Rectangle} [description] + * @return {Phaser.Geom.Rectangle} A Rectangle object holding the AABB values for the given points. */ var GetRectangleFromPoints = function (points, out) { @@ -154307,7 +157619,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1136 */ +/* 1147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154319,7 +157631,7 @@ module.exports = GetRectangleFromPoints; var Point = __webpack_require__(4); /** - * [description] + * Returns the linear interpolation point between the two given points, based on `t`. * * @function Phaser.Geom.Point.Interpolate * @since 3.0.0 @@ -154348,7 +157660,7 @@ module.exports = Interpolate; /***/ }), -/* 1137 */ +/* 1148 */ /***/ (function(module, exports) { /** @@ -154378,7 +157690,7 @@ module.exports = Invert; /***/ }), -/* 1138 */ +/* 1149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154413,7 +157725,7 @@ module.exports = Negative; /***/ }), -/* 1139 */ +/* 1150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154423,21 +157735,22 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(435); +var GetMagnitudeSq = __webpack_require__(442); /** - * [description] + * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the + * orthogonal projection of `pointA` onto a straight line paralle to `pointB`. * * @function Phaser.Geom.Point.Project * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point} pointA - [description] - * @param {Phaser.Geom.Point} pointB - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Point} pointA - Point A, to be projected onto Point B. + * @param {Phaser.Geom.Point} pointB - Point B, to have Point A projected upon it. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of the vector projection of `pointA` onto `pointB`. */ var Project = function (pointA, pointB, out) { @@ -154459,7 +157772,7 @@ module.exports = Project; /***/ }), -/* 1140 */ +/* 1151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154471,18 +157784,19 @@ module.exports = Project; var Point = __webpack_require__(4); /** - * [description] + * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the + * orthogonal projection of `pointA` onto a straight line paralle to `pointB`. * * @function Phaser.Geom.Point.ProjectUnit * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point} pointA - [description] - * @param {Phaser.Geom.Point} pointB - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Point} pointA - Point A, to be projected onto Point B. Must be a normalized point with a magnitude of 1. + * @param {Phaser.Geom.Point} pointB - Point B, to have Point A projected upon it. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A unit Point object holding the coordinates of the vector projection of `pointA` onto `pointB`. */ var ProjectUnit = function (pointA, pointB, out) { @@ -154503,7 +157817,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1141 */ +/* 1152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154512,7 +157826,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(434); +var GetMagnitude = __webpack_require__(441); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -154547,7 +157861,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1142 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154556,23 +157870,23 @@ module.exports = SetMagnitude; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(198); +var Polygon = __webpack_require__(201); -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); +Polygon.Clone = __webpack_require__(1154); +Polygon.Contains = __webpack_require__(202); +Polygon.ContainsPoint = __webpack_require__(1155); +Polygon.GetAABB = __webpack_require__(417); +Polygon.GetNumberArray = __webpack_require__(1156); +Polygon.GetPoints = __webpack_require__(418); +Polygon.Perimeter = __webpack_require__(419); +Polygon.Reverse = __webpack_require__(1157); +Polygon.Smooth = __webpack_require__(420); module.exports = Polygon; /***/ }), -/* 1143 */ +/* 1154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154581,7 +157895,7 @@ module.exports = Polygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(198); +var Polygon = __webpack_require__(201); /** * Create a new polygon which is a copy of the specified polygon @@ -154602,7 +157916,7 @@ module.exports = Clone; /***/ }), -/* 1144 */ +/* 1155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154611,18 +157925,18 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(199); +var Contains = __webpack_require__(202); /** - * [description] + * Checks the given Point again the Polygon to see if the Point lays within its vertices. * * @function Phaser.Geom.Polygon.ContainsPoint * @since 3.0.0 * - * @param {Phaser.Geom.Polygon} polygon - [description] - * @param {Phaser.Geom.Point} point - [description] + * @param {Phaser.Geom.Polygon} polygon - The Polygon to check. + * @param {Phaser.Geom.Point} point - The Point to check if it's within the Polygon. * - * @return {boolean} [description] + * @return {boolean} `true` if the Point is within the Polygon, otherwise `false`. */ var ContainsPoint = function (polygon, point) { @@ -154633,7 +157947,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1145 */ +/* 1156 */ /***/ (function(module, exports) { /** @@ -154676,7 +157990,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1146 */ +/* 1157 */ /***/ (function(module, exports) { /** @@ -154708,7 +158022,7 @@ module.exports = Reverse; /***/ }), -/* 1147 */ +/* 1158 */ /***/ (function(module, exports) { /** @@ -154736,7 +158050,7 @@ module.exports = Area; /***/ }), -/* 1148 */ +/* 1159 */ /***/ (function(module, exports) { /** @@ -154769,7 +158083,7 @@ module.exports = Ceil; /***/ }), -/* 1149 */ +/* 1160 */ /***/ (function(module, exports) { /** @@ -154804,7 +158118,7 @@ module.exports = CeilAll; /***/ }), -/* 1150 */ +/* 1161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154834,7 +158148,7 @@ module.exports = Clone; /***/ }), -/* 1151 */ +/* 1162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154843,7 +158157,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(47); +var Contains = __webpack_require__(48); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. @@ -154865,7 +158179,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1152 */ +/* 1163 */ /***/ (function(module, exports) { /** @@ -154896,7 +158210,7 @@ module.exports = CopyFrom; /***/ }), -/* 1153 */ +/* 1164 */ /***/ (function(module, exports) { /** @@ -154930,7 +158244,7 @@ module.exports = Equals; /***/ }), -/* 1154 */ +/* 1165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154939,7 +158253,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(209); +var GetAspectRatio = __webpack_require__(212); /** * Adjusts the target rectangle, changing its width, height and position, @@ -154983,7 +158297,7 @@ module.exports = FitInside; /***/ }), -/* 1155 */ +/* 1166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154992,7 +158306,7 @@ module.exports = FitInside; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(209); +var GetAspectRatio = __webpack_require__(212); /** * Adjusts the target rectangle, changing its width, height and position, @@ -155036,7 +158350,7 @@ module.exports = FitOutside; /***/ }), -/* 1156 */ +/* 1167 */ /***/ (function(module, exports) { /** @@ -155069,7 +158383,7 @@ module.exports = Floor; /***/ }), -/* 1157 */ +/* 1168 */ /***/ (function(module, exports) { /** @@ -155104,7 +158418,50 @@ module.exports = FloorAll; /***/ }), -/* 1158 */ +/* 1169 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(11); + +/** + * Create the smallest Rectangle containing two coordinate pairs. + * + * @function Phaser.Geom.Rectangle.FromXY + * @since 3.23.0 + * + * @generic {Phaser.Geom.Rectangle} O - [out,$return] + * + * @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. + * @param {Phaser.Geom.Rectangle} [out] - Optional Rectangle to adjust. + * + * @return {Phaser.Geom.Rectangle} The adjusted `out` Rectangle, or a new Rectangle if none was provided. + */ +var FromXY = function (x1, y1, x2, y2, out) +{ + if (out === undefined) { out = new Rectangle(); } + + return out.setTo( + Math.min(x1, x2), + Math.min(y1, y2), + Math.abs(x1 - x2), + Math.abs(y1 - y2) + ); +}; + +module.exports = FromXY; + + +/***/ }), +/* 1170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155142,7 +158499,7 @@ module.exports = GetCenter; /***/ }), -/* 1159 */ +/* 1171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155155,18 +158512,18 @@ var Point = __webpack_require__(4); /** - * The size of the Rectangle object, expressed as a Point object - * with the values of the width and height properties. + * Returns the size of the Rectangle, expressed as a Point object. + * With the value of the `width` as the `x` property and the `height` as the `y` property. * * @function Phaser.Geom.Rectangle.GetSize * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the size from. + * @param {(Phaser.Geom.Point|object)} [out] - The Point object to store the size in. If not given, a new Point instance is created. * - * @return {(Phaser.Geom.Point|object)} [description] + * @return {(Phaser.Geom.Point|object)} A Point object where `x` holds the width and `y` holds the height of the Rectangle. */ var GetSize = function (rect, out) { @@ -155182,7 +158539,7 @@ module.exports = GetSize; /***/ }), -/* 1160 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155191,7 +158548,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(165); +var CenterOn = __webpack_require__(168); /** @@ -155224,7 +158581,7 @@ module.exports = Inflate; /***/ }), -/* 1161 */ +/* 1173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155234,7 +158591,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(11); -var Intersects = __webpack_require__(131); +var Intersects = __webpack_require__(135); /** * Takes two Rectangles and first checks to see if they intersect. @@ -155275,7 +158632,7 @@ module.exports = Intersection; /***/ }), -/* 1162 */ +/* 1174 */ /***/ (function(module, exports) { /** @@ -155324,7 +158681,7 @@ module.exports = MergePoints; /***/ }), -/* 1163 */ +/* 1175 */ /***/ (function(module, exports) { /** @@ -155371,7 +158728,7 @@ module.exports = MergeRect; /***/ }), -/* 1164 */ +/* 1176 */ /***/ (function(module, exports) { /** @@ -155415,7 +158772,7 @@ module.exports = MergeXY; /***/ }), -/* 1165 */ +/* 1177 */ /***/ (function(module, exports) { /** @@ -155450,7 +158807,7 @@ module.exports = Offset; /***/ }), -/* 1166 */ +/* 1178 */ /***/ (function(module, exports) { /** @@ -155484,7 +158841,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1167 */ +/* 1179 */ /***/ (function(module, exports) { /** @@ -155518,7 +158875,7 @@ module.exports = Overlaps; /***/ }), -/* 1168 */ +/* 1180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155531,18 +158888,18 @@ var Point = __webpack_require__(4); var DegToRad = __webpack_require__(35); /** - * [description] + * Returns a Point from the perimeter of a Rectangle based on the given angle. * * @function Phaser.Geom.Rectangle.PerimeterPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rectangle - [description] - * @param {integer} angle - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {integer} angle - The angle of the point, in degrees. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of the Rectangle perimeter. */ var PerimeterPoint = function (rectangle, angle, out) { @@ -155575,7 +158932,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1169 */ +/* 1181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155584,8 +158941,8 @@ module.exports = PerimeterPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(170); -var ContainsRect = __webpack_require__(437); +var Between = __webpack_require__(172); +var ContainsRect = __webpack_require__(444); var Point = __webpack_require__(4); /** @@ -155646,7 +159003,7 @@ module.exports = RandomOutside; /***/ }), -/* 1170 */ +/* 1182 */ /***/ (function(module, exports) { /** @@ -155675,7 +159032,7 @@ module.exports = SameDimensions; /***/ }), -/* 1171 */ +/* 1183 */ /***/ (function(module, exports) { /** @@ -155714,7 +159071,7 @@ module.exports = Scale; /***/ }), -/* 1172 */ +/* 1184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155725,36 +159082,36 @@ module.exports = Scale; var Triangle = __webpack_require__(71); -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.Area = __webpack_require__(1185); +Triangle.BuildEquilateral = __webpack_require__(1186); +Triangle.BuildFromPolygon = __webpack_require__(1187); +Triangle.BuildRight = __webpack_require__(1188); +Triangle.CenterOn = __webpack_require__(1189); +Triangle.Centroid = __webpack_require__(445); +Triangle.CircumCenter = __webpack_require__(1190); +Triangle.CircumCircle = __webpack_require__(1191); +Triangle.Clone = __webpack_require__(1192); Triangle.Contains = __webpack_require__(83); -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); +Triangle.ContainsArray = __webpack_require__(210); +Triangle.ContainsPoint = __webpack_require__(1193); +Triangle.CopyFrom = __webpack_require__(1194); +Triangle.Decompose = __webpack_require__(438); +Triangle.Equals = __webpack_require__(1195); +Triangle.GetPoint = __webpack_require__(424); +Triangle.GetPoints = __webpack_require__(425); +Triangle.InCenter = __webpack_require__(447); +Triangle.Perimeter = __webpack_require__(1196); +Triangle.Offset = __webpack_require__(446); +Triangle.Random = __webpack_require__(158); +Triangle.Rotate = __webpack_require__(1197); +Triangle.RotateAroundPoint = __webpack_require__(1198); +Triangle.RotateAroundXY = __webpack_require__(213); module.exports = Triangle; /***/ }), -/* 1173 */ +/* 1185 */ /***/ (function(module, exports) { /** @@ -155793,7 +159150,7 @@ module.exports = Area; /***/ }), -/* 1174 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155837,7 +159194,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1175 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155850,7 +159207,8 @@ var EarCut = __webpack_require__(66); var Triangle = __webpack_require__(71); /** - * [description] + * Takes an array of vertex coordinates, and optionally an array of hole indices, then returns an array + * of Triangle instances, where the given vertices have been decomposed into a series of triangles. * * @function Phaser.Geom.Triangle.BuildFromPolygon * @since 3.0.0 @@ -155859,11 +159217,11 @@ var Triangle = __webpack_require__(71); * * @param {array} data - A flat array of vertex coordinates like [x0,y0, x1,y1, x2,y2, ...] * @param {array} [holes=null] - An array of hole indices if any (e.g. [5, 8] for a 12-vertex input would mean one hole with vertices 5–7 and another with 8–11). - * @param {number} [scaleX=1] - [description] - * @param {number} [scaleY=1] - [description] - * @param {(array|Phaser.Geom.Triangle[])} [out] - [description] + * @param {number} [scaleX=1] - Horizontal scale factor to multiply the resulting points by. + * @param {number} [scaleY=1] - Vertical scale factor to multiply the resulting points by. + * @param {(array|Phaser.Geom.Triangle[])} [out] - An array to store the resulting Triangle instances in. If not provided, a new array is created. * - * @return {(array|Phaser.Geom.Triangle[])} [description] + * @return {(array|Phaser.Geom.Triangle[])} An array of Triangle instances, where each triangle is based on the decomposed vertices data. */ var BuildFromPolygon = function (data, holes, scaleX, scaleY, out) { @@ -155912,7 +159270,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1176 */ +/* 1188 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155961,7 +159319,7 @@ module.exports = BuildRight; /***/ }), -/* 1177 */ +/* 1189 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155970,8 +159328,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(438); -var Offset = __webpack_require__(439); +var Centroid = __webpack_require__(445); +var Offset = __webpack_require__(446); /** * @callback CenterFunction @@ -156014,7 +159372,7 @@ module.exports = CenterOn; /***/ }), -/* 1178 */ +/* 1190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156058,10 +159416,10 @@ function det (m00, m01, m10, m11) * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Geom.Triangle} triangle - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the circumcenter of. + * @param {Phaser.Math.Vector2} [out] - The Vector2 object to store the position in. If not given, a new Vector2 instance is created. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} A Vector2 object holding the coordinates of the circumcenter of the Triangle. */ var CircumCenter = function (triangle, out) { @@ -156090,7 +159448,7 @@ module.exports = CircumCenter; /***/ }), -/* 1179 */ +/* 1191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156173,7 +159531,7 @@ module.exports = CircumCircle; /***/ }), -/* 1180 */ +/* 1192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156203,7 +159561,7 @@ module.exports = Clone; /***/ }), -/* 1181 */ +/* 1193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156234,7 +159592,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1182 */ +/* 1194 */ /***/ (function(module, exports) { /** @@ -156265,7 +159623,7 @@ module.exports = CopyFrom; /***/ }), -/* 1183 */ +/* 1195 */ /***/ (function(module, exports) { /** @@ -156301,7 +159659,7 @@ module.exports = Equals; /***/ }), -/* 1184 */ +/* 1196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156312,17 +159670,16 @@ module.exports = Equals; var Length = __webpack_require__(57); -// The 2D area of a triangle. The area value is always non-negative. - /** * Gets the length of the perimeter of the given triangle. + * Calculated by adding together the length of each of the three sides. * * @function Phaser.Geom.Triangle.Perimeter * @since 3.0.0 * - * @param {Phaser.Geom.Triangle} triangle - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the length from. * - * @return {number} [description] + * @return {number} The length of the Triangle. */ var Perimeter = function (triangle) { @@ -156337,7 +159694,7 @@ module.exports = Perimeter; /***/ }), -/* 1185 */ +/* 1197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156346,8 +159703,8 @@ module.exports = Perimeter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(210); -var InCenter = __webpack_require__(440); +var RotateAroundXY = __webpack_require__(213); +var InCenter = __webpack_require__(447); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -156373,7 +159730,7 @@ module.exports = Rotate; /***/ }), -/* 1186 */ +/* 1198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156382,7 +159739,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(210); +var RotateAroundXY = __webpack_require__(213); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -156407,7 +159764,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1187 */ +/* 1199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156416,8 +159773,8 @@ module.exports = RotateAroundPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(177); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(179); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Input @@ -156425,16 +159782,16 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(441), + CreateInteractiveObject: __webpack_require__(448), 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) + Gamepad: __webpack_require__(1200), + InputManager: __webpack_require__(364), + InputPlugin: __webpack_require__(1212), + InputPluginCache: __webpack_require__(136), + Keyboard: __webpack_require__(1214), + Mouse: __webpack_require__(1231), + Pointer: __webpack_require__(367), + Touch: __webpack_require__(1232) }; @@ -156445,7 +159802,7 @@ module.exports = Input; /***/ }), -/* 1188 */ +/* 1200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156460,18 +159817,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(442), - Button: __webpack_require__(443), - Events: __webpack_require__(211), - Gamepad: __webpack_require__(444), - GamepadPlugin: __webpack_require__(1195), + Axis: __webpack_require__(449), + Button: __webpack_require__(450), + Events: __webpack_require__(214), + Gamepad: __webpack_require__(451), + GamepadPlugin: __webpack_require__(1207), - Configs: __webpack_require__(1196) + Configs: __webpack_require__(1208) }; /***/ }), -/* 1189 */ +/* 1201 */ /***/ (function(module, exports) { /** @@ -156500,7 +159857,7 @@ module.exports = 'down'; /***/ }), -/* 1190 */ +/* 1202 */ /***/ (function(module, exports) { /** @@ -156529,7 +159886,7 @@ module.exports = 'up'; /***/ }), -/* 1191 */ +/* 1203 */ /***/ (function(module, exports) { /** @@ -156560,7 +159917,7 @@ module.exports = 'connected'; /***/ }), -/* 1192 */ +/* 1204 */ /***/ (function(module, exports) { /** @@ -156586,7 +159943,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1193 */ +/* 1205 */ /***/ (function(module, exports) { /** @@ -156618,7 +159975,7 @@ module.exports = 'down'; /***/ }), -/* 1194 */ +/* 1206 */ /***/ (function(module, exports) { /** @@ -156650,7 +160007,7 @@ module.exports = 'up'; /***/ }), -/* 1195 */ +/* 1207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156660,11 +160017,11 @@ module.exports = 'up'; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(211); -var Gamepad = __webpack_require__(444); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(214); +var Gamepad = __webpack_require__(451); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(132); +var InputPluginCache = __webpack_require__(136); var InputEvents = __webpack_require__(54); /** @@ -157288,7 +160645,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1196 */ +/* 1208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157303,15 +160660,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1197), - SNES_USB: __webpack_require__(1198), - XBOX_360: __webpack_require__(1199) + DUALSHOCK_4: __webpack_require__(1209), + SNES_USB: __webpack_require__(1210), + XBOX_360: __webpack_require__(1211) }; /***/ }), -/* 1197 */ +/* 1209 */ /***/ (function(module, exports) { /** @@ -157361,7 +160718,7 @@ module.exports = { /***/ }), -/* 1198 */ +/* 1210 */ /***/ (function(module, exports) { /** @@ -157400,7 +160757,7 @@ module.exports = { /***/ }), -/* 1199 */ +/* 1211 */ /***/ (function(module, exports) { /** @@ -157451,7 +160808,7 @@ module.exports = { /***/ }), -/* 1200 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157463,22 +160820,22 @@ module.exports = { var Circle = __webpack_require__(65); var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); -var CONST = __webpack_require__(177); -var CreateInteractiveObject = __webpack_require__(441); -var CreatePixelPerfectHandler = __webpack_require__(1201); +var CONST = __webpack_require__(179); +var CreateInteractiveObject = __webpack_require__(448); +var CreatePixelPerfectHandler = __webpack_require__(1213); var DistanceBetween = __webpack_require__(53); var Ellipse = __webpack_require__(95); var EllipseContains = __webpack_require__(96); var Events = __webpack_require__(54); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var GetFastValue = __webpack_require__(2); -var GEOM_CONST = __webpack_require__(46); -var InputPluginCache = __webpack_require__(132); +var GEOM_CONST = __webpack_require__(47); +var InputPluginCache = __webpack_require__(136); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(47); -var SceneEvents = __webpack_require__(19); +var RectangleContains = __webpack_require__(48); +var SceneEvents = __webpack_require__(22); var Triangle = __webpack_require__(71); var TriangleContains = __webpack_require__(83); @@ -158315,7 +161672,7 @@ var InputPlugin = new Class({ * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area. * @param {boolean} [dropZone=false] - Is this Game Object a drop zone or not? * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ enable: function (gameObject, shape, callback, dropZone) { @@ -159435,7 +162792,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to add. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ queueForInsertion: function (child) { @@ -159456,7 +162813,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ queueForRemoval: function (child) { @@ -159478,7 +162835,7 @@ var InputPlugin = new Class({ * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to change the draggable state on. * @param {boolean} [value=true] - Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setDraggable: function (gameObjects, value) { @@ -159572,7 +162929,7 @@ var InputPlugin = new Class({ * @param {(Phaser.Types.Input.InputConfiguration|any)} [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 {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitArea: function (gameObjects, shape, callback) { @@ -159669,7 +163026,7 @@ var InputPlugin = new Class({ * @param {number} radius - The radius of the circle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Circle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaCircle: function (gameObjects, x, y, radius, callback) { @@ -159694,7 +163051,7 @@ var InputPlugin = new Class({ * @param {number} height - The height of the ellipse. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Ellipse.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaEllipse: function (gameObjects, x, y, width, height, callback) { @@ -159715,7 +163072,7 @@ var InputPlugin = new Class({ * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaFromTexture: function (gameObjects, callback) { @@ -159777,7 +163134,7 @@ var InputPlugin = new Class({ * @param {number} height - The height of the rectangle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaRectangle: function (gameObjects, x, y, width, height, callback) { @@ -159804,7 +163161,7 @@ var InputPlugin = new Class({ * @param {number} y3 - The y coordinate of the third point of the triangle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Triangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaTriangle: function (gameObjects, x1, y1, x2, y2, x3, y3, callback) { @@ -159846,7 +163203,7 @@ var InputPlugin = new Class({ * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to create the input debug shape for. * @param {number} [color=0x00ff00] - The outline color of the debug shape. * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ enableDebug: function (gameObject, color) { @@ -159918,10 +163275,29 @@ var InputPlugin = new Class({ debug.setStrokeStyle(1 / gameObject.scale, color); debug.setDisplayOrigin(gameObject.displayOriginX, gameObject.displayOriginY); - debug.setRotation(gameObject.rotation); - debug.setScale(gameObject.scaleX, gameObject.scaleY); - debug.setPosition(gameObject.x + offsetx, gameObject.y + offsety); + + var x = gameObject.x; + var y = gameObject.y; + var rotation = gameObject.rotation; + var scaleX = gameObject.scaleX; + var scaleY = gameObject.scaleY; + + if (gameObject.parentContainer) + { + var matrix = gameObject.getWorldTransformMatrix(); + + x = matrix.tx; + y = matrix.ty; + rotation = matrix.rotation; + scaleX = matrix.scaleX; + scaleY = matrix.scaleY; + } + + debug.setRotation(rotation); + debug.setScale(scaleX, scaleY); + debug.setPosition(x + offsetx, y + offsety); debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY); + debug.setDepth(gameObject.depth); }; updateList.add(debug); @@ -159942,7 +163318,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to remove the input debug shape from. * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ removeDebug: function (gameObject) { @@ -159975,7 +163351,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#setPollAlways * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollAlways: function () { @@ -159991,7 +163367,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#setPollOnMove * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollOnMove: function () { @@ -160007,7 +163383,7 @@ var InputPlugin = new Class({ * * @param {number} value - The amount of time, in ms, that should elapsed before re-polling the pointers. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollRate: function (value) { @@ -160027,7 +163403,7 @@ var InputPlugin = new Class({ * * @param {boolean} 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. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setGlobalTopOnly: function (value) { @@ -160047,7 +163423,7 @@ var InputPlugin = new Class({ * * @param {boolean} value - `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setTopOnly: function (value) { @@ -160137,9 +163513,12 @@ var InputPlugin = new Class({ return indexB - indexA; } } + + return listB.length - listA.length; } // Technically this shouldn't happen, but ... + // eslint-disable-next-line no-unreachable return 0; }, @@ -160152,7 +163531,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#stopPropagation * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ stopPropagation: function () { @@ -160209,7 +163588,7 @@ var InputPlugin = new Class({ * * @param {string} cursor - The CSS to be used when setting the default cursor. * - * @return {Phaser.Input.InputPlugin} This Input instance. + * @return {this} This Input instance. */ setDefaultCursor: function (cursor) { @@ -160603,7 +163982,7 @@ module.exports = InputPlugin; /***/ }), -/* 1201 */ +/* 1213 */ /***/ (function(module, exports) { /** @@ -160639,7 +164018,7 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 1202 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160654,26 +164033,26 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(133), + Events: __webpack_require__(137), - KeyboardManager: __webpack_require__(360), - KeyboardPlugin: __webpack_require__(1210), + KeyboardManager: __webpack_require__(365), + KeyboardPlugin: __webpack_require__(1222), - Key: __webpack_require__(445), - KeyCodes: __webpack_require__(122), + Key: __webpack_require__(452), + KeyCodes: __webpack_require__(124), - KeyCombo: __webpack_require__(446), + KeyCombo: __webpack_require__(453), - JustDown: __webpack_require__(1215), - JustUp: __webpack_require__(1216), - DownDuration: __webpack_require__(1217), - UpDuration: __webpack_require__(1218) + JustDown: __webpack_require__(1227), + JustUp: __webpack_require__(1228), + DownDuration: __webpack_require__(1229), + UpDuration: __webpack_require__(1230) }; /***/ }), -/* 1203 */ +/* 1215 */ /***/ (function(module, exports) { /** @@ -160709,7 +164088,7 @@ module.exports = 'keydown'; /***/ }), -/* 1204 */ +/* 1216 */ /***/ (function(module, exports) { /** @@ -160738,7 +164117,7 @@ module.exports = 'keyup'; /***/ }), -/* 1205 */ +/* 1217 */ /***/ (function(module, exports) { /** @@ -160772,7 +164151,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1206 */ +/* 1218 */ /***/ (function(module, exports) { /** @@ -160806,7 +164185,7 @@ module.exports = 'down'; /***/ }), -/* 1207 */ +/* 1219 */ /***/ (function(module, exports) { /** @@ -160845,7 +164224,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1208 */ +/* 1220 */ /***/ (function(module, exports) { /** @@ -160877,7 +164256,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1209 */ +/* 1221 */ /***/ (function(module, exports) { /** @@ -160911,7 +164290,7 @@ module.exports = 'up'; /***/ }), -/* 1210 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160921,16 +164300,16 @@ module.exports = 'up'; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(133); -var GameEvents = __webpack_require__(18); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(137); +var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); 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 InputPluginCache = __webpack_require__(136); +var Key = __webpack_require__(452); +var KeyCodes = __webpack_require__(124); +var KeyCombo = __webpack_require__(453); +var KeyMap = __webpack_require__(1226); var SnapFloor = __webpack_require__(93); /** @@ -161165,7 +164544,7 @@ var KeyboardPlugin = new Class({ * * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable event capture for. * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ addCapture: function (keycode) { @@ -161207,7 +164586,7 @@ var KeyboardPlugin = new Class({ * * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable event capture for. * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ removeCapture: function (keycode) { @@ -161236,7 +164615,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#enableGlobalCapture * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ enableGlobalCapture: function () { @@ -161252,7 +164631,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#disableGlobalCapture * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ disableGlobalCapture: function () { @@ -161269,7 +164648,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#clearCaptures * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ clearCaptures: function () { @@ -161437,7 +164816,7 @@ var KeyboardPlugin = new Class({ * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value. * @param {boolean} [destroy=false] - Call `Key.destroy` on the removed Key object? * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ removeKey: function (key, destroy) { @@ -161683,7 +165062,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#resetKeys * @since 3.15.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ resetKeys: function () { @@ -161797,7 +165176,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1211 */ +/* 1223 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161806,7 +165185,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1212); +var AdvanceKeyCombo = __webpack_require__(1224); /** * Used internally by the KeyCombo class. @@ -161878,7 +165257,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1212 */ +/* 1224 */ /***/ (function(module, exports) { /** @@ -161920,7 +165299,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1213 */ +/* 1225 */ /***/ (function(module, exports) { /** @@ -161955,7 +165334,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1214 */ +/* 1226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161964,7 +165343,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(122); +var KeyCodes = __webpack_require__(124); var KeyMap = {}; @@ -161977,7 +165356,7 @@ module.exports = KeyMap; /***/ }), -/* 1215 */ +/* 1227 */ /***/ (function(module, exports) { /** @@ -162019,7 +165398,7 @@ module.exports = JustDown; /***/ }), -/* 1216 */ +/* 1228 */ /***/ (function(module, exports) { /** @@ -162061,7 +165440,7 @@ module.exports = JustUp; /***/ }), -/* 1217 */ +/* 1229 */ /***/ (function(module, exports) { /** @@ -162095,7 +165474,7 @@ module.exports = DownDuration; /***/ }), -/* 1218 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -162129,7 +165508,7 @@ module.exports = UpDuration; /***/ }), -/* 1219 */ +/* 1231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162145,14 +165524,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(361) + MouseManager: __webpack_require__(366) }; /* eslint-enable */ /***/ }), -/* 1220 */ +/* 1232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162168,14 +165547,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(363) + TouchManager: __webpack_require__(368) }; /* eslint-enable */ /***/ }), -/* 1221 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162184,8 +165563,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(20); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Loader @@ -162193,18 +165572,18 @@ var Extend = __webpack_require__(17); var Loader = { - Events: __webpack_require__(81), + Events: __webpack_require__(82), - FileTypes: __webpack_require__(1222), + FileTypes: __webpack_require__(1234), File: __webpack_require__(21), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(134), - LoaderPlugin: __webpack_require__(1246), - MergeXHRSettings: __webpack_require__(212), + GetURL: __webpack_require__(138), + LoaderPlugin: __webpack_require__(1258), + MergeXHRSettings: __webpack_require__(215), MultiFile: __webpack_require__(61), - XHRLoader: __webpack_require__(447), - XHRSettings: __webpack_require__(135) + XHRLoader: __webpack_require__(454), + XHRSettings: __webpack_require__(139) }; @@ -162215,7 +165594,7 @@ module.exports = Loader; /***/ }), -/* 1222 */ +/* 1234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162230,42 +165609,42 @@ module.exports = Loader; module.exports = { - 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), + AnimationJSONFile: __webpack_require__(1235), + AtlasJSONFile: __webpack_require__(1236), + AtlasXMLFile: __webpack_require__(1237), + AudioFile: __webpack_require__(455), + AudioSpriteFile: __webpack_require__(1238), + BinaryFile: __webpack_require__(1239), + BitmapFontFile: __webpack_require__(1240), + CSSFile: __webpack_require__(1241), + GLSLFile: __webpack_require__(1242), + HTML5AudioFile: __webpack_require__(456), + HTMLFile: __webpack_require__(1243), + HTMLTextureFile: __webpack_require__(1244), ImageFile: __webpack_require__(72), JSONFile: __webpack_require__(60), - 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) + MultiAtlasFile: __webpack_require__(1245), + MultiScriptFile: __webpack_require__(1246), + PackFile: __webpack_require__(1247), + PluginFile: __webpack_require__(1248), + SceneFile: __webpack_require__(1249), + ScenePluginFile: __webpack_require__(1250), + ScriptFile: __webpack_require__(457), + SpriteSheetFile: __webpack_require__(1251), + SVGFile: __webpack_require__(1252), + TextFile: __webpack_require__(458), + TilemapCSVFile: __webpack_require__(1253), + TilemapImpactFile: __webpack_require__(1254), + TilemapJSONFile: __webpack_require__(1255), + UnityAtlasFile: __webpack_require__(1256), + VideoFile: __webpack_require__(1257), + XMLFile: __webpack_require__(216) }; /***/ }), -/* 1223 */ +/* 1235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162277,14 +165656,14 @@ module.exports = { var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); -var LoaderEvents = __webpack_require__(81); +var LoaderEvents = __webpack_require__(82); /** * @classdesc * 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 @@ -162340,8 +165719,6 @@ var AnimationJSONFile = new Class({ onLoadComplete: function () { this.loader.systems.anims.fromJSON(this.data); - - this.pendingDestroy(); } }); @@ -162350,7 +165727,7 @@ var AnimationJSONFile = new Class({ * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -162365,17 +165742,17 @@ var AnimationJSONFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.animation({ * key: 'baddieAnims', @@ -162392,9 +165769,9 @@ var AnimationJSONFile = new Class({ * * Once the animation data has been parsed you will be able to play animations using that data. * Please see the Animation Manager `fromJSON` method for more details about the format and playback. - * + * * You can also access the raw animation data from its Cache using its key: - * + * * ```javascript * this.load.animation('baddieAnims', 'files/BaddieAnims.json'); * // and later in your game ... @@ -162413,7 +165790,7 @@ var AnimationJSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -162433,7 +165810,7 @@ var AnimationJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#animation - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -162441,7 +165818,7 @@ var AnimationJSONFile = new Class({ * @param {string} [dataKey] - When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('animation', function (key, url, dataKey, xhrSettings) { @@ -162468,7 +165845,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1224 */ +/* 1236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162490,9 +165867,9 @@ var MultiFile = __webpack_require__(61); * 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 @@ -162585,7 +165962,7 @@ var AtlasJSONFile = new Class({ * Adds a JSON based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -162600,7 +165977,7 @@ var AtlasJSONFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -162608,7 +165985,7 @@ var AtlasJSONFile = new Class({ * These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate. * If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader * instead of this one. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -162617,7 +165994,7 @@ var AtlasJSONFile = new Class({ * 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.atlas({ * key: 'mainmenu', @@ -162631,7 +166008,7 @@ var AtlasJSONFile = new Class({ * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); * // and later in your game ... @@ -162652,13 +166029,13 @@ var AtlasJSONFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.atlas({ * key: 'mainmenu', @@ -162675,7 +166052,7 @@ var AtlasJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#atlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -162684,7 +166061,7 @@ var AtlasJSONFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('atlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -162717,7 +166094,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1225 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162732,14 +166109,14 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var XMLFile = __webpack_require__(213); +var XMLFile = __webpack_require__(216); /** * @classdesc * 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 @@ -162832,7 +166209,7 @@ var AtlasXMLFile = new Class({ * Adds an XML based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -162847,13 +166224,13 @@ var AtlasXMLFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the atlas data to be provided in an XML file format. * These files are created by software such as Shoebox and Adobe Flash / Animate. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -162862,7 +166239,7 @@ var AtlasXMLFile = new Class({ * 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.atlasXML({ * key: 'mainmenu', @@ -162874,7 +166251,7 @@ var AtlasXMLFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig` for more details. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml'); * // and later in your game ... @@ -162895,13 +166272,13 @@ var AtlasXMLFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.atlasXML({ * key: 'mainmenu', @@ -162918,7 +166295,7 @@ var AtlasXMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#atlasXML - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -162927,7 +166304,7 @@ var AtlasXMLFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('atlasXML', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -162960,7 +166337,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1226 */ +/* 1238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162969,7 +166346,7 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(448); +var AudioFile = __webpack_require__(455); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -162982,7 +166359,7 @@ var MultiFile = __webpack_require__(61); * 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 @@ -163025,7 +166402,7 @@ var AudioSpriteFile = new Class({ if (!audioURL) { data = new JSONFile(loader, key, jsonURL, jsonXhrSettings); - + MultiFile.call(this, loader, 'audiosprite', key, [ data ]); this.config.resourceLoad = true; @@ -163109,7 +166486,7 @@ var AudioSpriteFile = new Class({ * Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -163120,13 +166497,13 @@ var AudioSpriteFile = new Class({ * ]); * } * ``` - * + * * Audio Sprites are a combination of audio files and a JSON configuration. * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite * * If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio * files automatically based on its content. To do this exclude the audio URLs from the load: - * + * * ```javascript * function preload () * { @@ -163141,7 +166518,7 @@ var AudioSpriteFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -163151,7 +166528,7 @@ var AudioSpriteFile = new Class({ * then remove it from the Audio Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.audioSprite({ * key: 'kyobi', @@ -163169,7 +166546,7 @@ var AudioSpriteFile = new Class({ * Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead. * * Once the audio has finished loading you can use it create an Audio Sprite by referencing its key: - * + * * ```javascript * this.load.audioSprite('kyobi', 'kyobi.json'); * // and later in your game ... @@ -163188,12 +166565,12 @@ var AudioSpriteFile = new Class({ * browser support. * * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded. - * + * * Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser. * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#audioSprite - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig[])} key - The key to use for this file, or a file configuration object, or an array of objects. @@ -163203,7 +166580,7 @@ var AudioSpriteFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader. + * @return {this} The Loader. */ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings) { @@ -163250,7 +166627,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1227 */ +/* 1239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163260,7 +166637,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -163271,7 +166648,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -163345,7 +166722,7 @@ var BinaryFile = new Class({ * Adds a Binary file, or array of Binary files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -163360,14 +166737,14 @@ var BinaryFile = new Class({ * 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 Binary Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Binary Cache. * 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 Binary Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.binary({ * key: 'doom', @@ -163379,7 +166756,7 @@ var BinaryFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.BinaryFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.binary('doom', 'files/Doom.wad'); * // and later in your game ... @@ -163400,7 +166777,7 @@ var BinaryFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#binary - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig|Phaser.Types.Loader.FileTypes.BinaryFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -163408,7 +166785,7 @@ var BinaryFile = new Class({ * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('binary', function (key, url, dataType, xhrSettings) { @@ -163432,7 +166809,7 @@ module.exports = BinaryFile; /***/ }), -/* 1228 */ +/* 1240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163447,15 +166824,15 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ParseXMLBitmapFont = __webpack_require__(185); -var XMLFile = __webpack_require__(213); +var ParseXMLBitmapFont = __webpack_require__(187); +var XMLFile = __webpack_require__(216); /** * @classdesc * 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 @@ -163563,14 +166940,14 @@ var BitmapFontFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the font data to be provided in an XML file format. * These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/), * [Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner) - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -163579,7 +166956,7 @@ var BitmapFontFile = new Class({ * 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.bitmapFont({ * key: 'goldenFont', @@ -163591,7 +166968,7 @@ var BitmapFontFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.BitmapFontFileConfig` for more details. * * Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object: - * + * * ```javascript * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml'); * // and later in your game ... @@ -163610,13 +166987,13 @@ var BitmapFontFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.bitmapFont({ * key: 'goldenFont', @@ -163633,7 +167010,7 @@ var BitmapFontFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#bitmapFont - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -163642,7 +167019,7 @@ var BitmapFontFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('bitmapFont', function (key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings) { @@ -163675,7 +167052,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1229 */ +/* 1241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163685,7 +167062,7 @@ module.exports = BitmapFontFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -163696,7 +167073,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -163769,7 +167146,7 @@ var CSSFile = new Class({ * Adds a CSS file, or array of CSS files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -163784,11 +167161,11 @@ var CSSFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.css({ * key: 'headers', @@ -163812,14 +167189,14 @@ var CSSFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#css - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.17.0 * * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig|Phaser.Types.Loader.FileTypes.CSSFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.css`, i.e. if `key` was "alien" then the URL will be "alien.css". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('css', function (key, url, xhrSettings) { @@ -163843,7 +167220,7 @@ module.exports = CSSFile; /***/ }), -/* 1230 */ +/* 1242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163853,19 +167230,19 @@ module.exports = CSSFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(347); +var Shader = __webpack_require__(352); /** * @classdesc * 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 @@ -164007,9 +167384,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderName * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {string} The shader name. */ getShaderName: function (headerSource) @@ -164032,9 +167409,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderType * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {string} The shader type. Either 'fragment' or 'vertex'. */ getShaderType: function (headerSource) @@ -164057,9 +167434,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderUniforms * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {any} The shader uniforms object. */ getShaderUniforms: function (headerSource) @@ -164099,10 +167476,10 @@ var GLSLFile = new Class({ * @method Phaser.Loader.FileTypes.GLSLFile#extractBlock * @private * @since 3.17.0 - * + * * @param {string[]} data - The array of shader data to process. * @param {integer} offset - The offset to start processing from. - * + * * @return {any} The processed shader block, or null. */ extractBlock: function (data, offset) @@ -164167,7 +167544,7 @@ var GLSLFile = new Class({ * In Phaser 3 GLSL files are just plain Text files at the current moment in time. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -164182,14 +167559,14 @@ var GLSLFile = new Class({ * 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 Shader Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Shader Cache. * 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 Shader Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.glsl({ * key: 'plasma', @@ -164201,7 +167578,7 @@ var GLSLFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.GLSLFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.glsl('plasma', 'shaders/Plasma.glsl'); * // and later in your game ... @@ -164222,7 +167599,7 @@ var GLSLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#glsl - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig|Phaser.Types.Loader.FileTypes.GLSLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -164230,7 +167607,7 @@ var GLSLFile = new Class({ * @param {string} [shaderType='fragment'] - 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. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('glsl', function (key, url, shaderType, xhrSettings) { @@ -164254,7 +167631,7 @@ module.exports = GLSLFile; /***/ }), -/* 1231 */ +/* 1243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164264,7 +167641,7 @@ module.exports = GLSLFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -164398,14 +167775,14 @@ var HTMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#html - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.12.0 * * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig|Phaser.Types.Loader.FileTypes.HTMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was "alien" then the URL will be "alien.html". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('html', function (key, url, xhrSettings) { @@ -164429,7 +167806,7 @@ module.exports = HTMLFile; /***/ }), -/* 1232 */ +/* 1244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164439,7 +167816,7 @@ module.exports = HTMLFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -164450,7 +167827,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -164589,7 +167966,7 @@ var HTMLTextureFile = new Class({ * will be rendered to 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 () * { @@ -164611,7 +167988,7 @@ var HTMLTextureFile = new Class({ * 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.htmlTexture({ * key: 'instructions', @@ -164624,7 +168001,7 @@ var HTMLTextureFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig` 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.htmlTexture('instructions', 'content/intro.html', 256, 512); * // and later in your game ... @@ -164654,7 +168031,7 @@ var HTMLTextureFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#htmlTexture - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.12.0 * * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -164663,7 +168040,7 @@ var HTMLTextureFile = new Class({ * @param {integer} [height=512] - The height of the texture the HTML will be rendered to. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('htmlTexture', function (key, url, width, height, xhrSettings) { @@ -164687,7 +168064,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1233 */ +/* 1245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -164709,7 +168086,7 @@ var MultiFile = __webpack_require__(61); * 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 @@ -164875,7 +168252,7 @@ var MultiAtlasFile = new Class({ if (item.image === key) { images.push(image); - + data.push(item); if (file.linkFile) @@ -164910,7 +168287,7 @@ var MultiAtlasFile = new Class({ * Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -164925,7 +168302,7 @@ var MultiAtlasFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -164935,14 +168312,14 @@ var MultiAtlasFile = new Class({ * The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and * extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps, * Phaser will load those as well. - * + * * 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.multiatlas({ * key: 'level1', @@ -164955,7 +168332,7 @@ var MultiAtlasFile = new Class({ * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.multiatlas('level1', 'images/Level1.json'); * // and later in your game ... @@ -164978,7 +168355,7 @@ var MultiAtlasFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#multiatlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -164987,7 +168364,7 @@ var MultiAtlasFile = new Class({ * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('multiatlas', function (key, atlasURL, path, baseURL, atlasXhrSettings) { @@ -165020,7 +168397,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1234 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165034,14 +168411,14 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ScriptFile = __webpack_require__(450); +var ScriptFile = __webpack_require__(457); /** * @classdesc * 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 @@ -165121,7 +168498,7 @@ var MultiScriptFile = new Class({ file.data.type = 'text/javascript'; file.data.defer = false; file.data.text = file.xhrLoader.responseText; - + document.head.appendChild(file.data); } @@ -165133,13 +168510,13 @@ var MultiScriptFile = new Class({ /** * Adds an array of Script files to the current load queue. - * + * * The difference between this and the `ScriptFile` file type is that you give an array of scripts to this method, * and the scripts are then processed _exactly_ in that order. This allows you to load a bunch of scripts that * may have dependencies on each other without worrying about the async nature of traditional script loading. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -165153,7 +168530,7 @@ var MultiScriptFile = new Class({ * ]); * } * ``` - * + * * In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact * order given in the array. * @@ -165164,11 +168541,11 @@ var MultiScriptFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.scripts({ * key: 'PostProcess', @@ -165196,7 +168573,7 @@ var MultiScriptFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#scripts - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.17.0 * * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -165204,7 +168581,7 @@ var MultiScriptFile = new Class({ * @param {string} [extension='js'] - The default file extension to use if no url is provided. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for these files. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('scripts', function (key, url, xhrSettings) { @@ -165237,7 +168614,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1235 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165247,7 +168624,7 @@ module.exports = MultiScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); @@ -165256,7 +168633,7 @@ var JSONFile = __webpack_require__(60); * 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 @@ -165315,7 +168692,7 @@ var PackFile = new Class({ * Adds a JSON File Pack, or array of packs, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -165327,7 +168704,7 @@ var PackFile = new Class({ * Here is a small example: * * ```json - * { + * { * "test1": { * "files": [ * { @@ -165368,17 +168745,17 @@ var PackFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.pack({ * key: 'level1', @@ -165400,7 +168777,7 @@ var PackFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -165420,7 +168797,7 @@ var PackFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#pack - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig|Phaser.Types.Loader.FileTypes.PackFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -165428,7 +168805,7 @@ var PackFile = new Class({ * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('pack', function (key, url, packKey, xhrSettings) { @@ -165455,7 +168832,7 @@ module.exports = PackFile; /***/ }), -/* 1236 */ +/* 1248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165465,7 +168842,7 @@ module.exports = PackFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -165476,7 +168853,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -165590,7 +168967,7 @@ var PluginFile = new Class({ * Adds a Plugin Script file, or array of plugin files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -165605,11 +168982,11 @@ var PluginFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.plugin({ * key: 'modplayer', @@ -165634,7 +169011,7 @@ var PluginFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#plugin - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig|Phaser.Types.Loader.FileTypes.PluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -165643,7 +169020,7 @@ var PluginFile = new Class({ * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('plugin', function (key, url, start, mapping, xhrSettings) { @@ -165667,7 +169044,7 @@ module.exports = PluginFile; /***/ }), -/* 1237 */ +/* 1249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165677,7 +169054,7 @@ module.exports = PluginFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -165792,34 +169169,34 @@ var SceneFile = new Class({ * loaded. * * The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load. - * + * * For a Scene File it's vitally important that the key matches the class name in the JavaScript file. - * + * * For example here is the source file: - * + * * ```javascript * class ExternalScene extends Phaser.Scene { - * + * * constructor () * { * super('myScene'); * } - * + * * } * ``` - * + * * Because the class is called `ExternalScene` that is the exact same key you must use when loading it: - * + * * ```javascript * function preload () * { * this.load.sceneFile('ExternalScene', 'src/yourScene.js'); * } * ``` - * + * * The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene * constructor, as we've done in the example above, where the Scene key was changed to `myScene`. - * + * * The key should be unique both in terms of files being loaded and Scenes already present in the Scene 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 Scene Manager first, before loading a new one. @@ -165857,14 +169234,14 @@ var SceneFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#sceneFile - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.16.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig|Phaser.Types.Loader.FileTypes.SceneFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('sceneFile', function (key, url, xhrSettings) { @@ -165888,7 +169265,7 @@ module.exports = SceneFile; /***/ }), -/* 1238 */ +/* 1250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165898,7 +169275,7 @@ module.exports = SceneFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -165909,7 +169286,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -166017,7 +169394,7 @@ var ScenePluginFile = new Class({ * Adds a Scene Plugin Script file, or array of plugin files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -166032,11 +169409,11 @@ var ScenePluginFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.scenePlugin({ * key: 'modplayer', @@ -166061,7 +169438,7 @@ var ScenePluginFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#scenePlugin - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.8.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -166070,7 +169447,7 @@ var ScenePluginFile = new Class({ * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('scenePlugin', function (key, url, systemKey, sceneKey, xhrSettings) { @@ -166094,7 +169471,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1239 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166253,7 +169630,7 @@ var SpriteSheetFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#spritesheet - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -166261,7 +169638,7 @@ var SpriteSheetFile = new Class({ * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. At a minimum it should have a `frameWidth` property. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('spritesheet', function (key, url, frameConfig, xhrSettings) { @@ -166285,7 +169662,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1240 */ +/* 1252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166295,7 +169672,7 @@ module.exports = SpriteSheetFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -166538,21 +169915,21 @@ var SVGFile = new Class({ * 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', @@ -166563,18 +169940,18 @@ var SVGFile = new Class({ * } * }); * ``` - * + * * 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', @@ -166584,14 +169961,14 @@ var SVGFile = new Class({ * } * }); * ``` - * + * * 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. * * @method Phaser.Loader.LoaderPlugin#svg - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig|Phaser.Types.Loader.FileTypes.SVGFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -166599,7 +169976,7 @@ var SVGFile = new Class({ * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('svg', function (key, url, svgConfig, xhrSettings) { @@ -166624,7 +170001,7 @@ module.exports = SVGFile; /***/ }), -/* 1241 */ +/* 1253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166634,12 +170011,12 @@ module.exports = SVGFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(31); +var TILEMAP_FORMATS = __webpack_require__(32); /** * @classdesc @@ -166788,14 +170165,14 @@ var TilemapCSVFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapCSV - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapCSV', function (key, url, xhrSettings) { @@ -166819,7 +170196,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1242 */ +/* 1254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166831,7 +170208,7 @@ module.exports = TilemapCSVFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); -var TILEMAP_FORMATS = __webpack_require__(31); +var TILEMAP_FORMATS = __webpack_require__(32); /** * @classdesc @@ -166944,14 +170321,14 @@ var TilemapImpactFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapImpact - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapImpact', function (key, url, xhrSettings) { @@ -166975,7 +170352,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1243 */ +/* 1255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166987,7 +170364,7 @@ module.exports = TilemapImpactFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); -var TILEMAP_FORMATS = __webpack_require__(31); +var TILEMAP_FORMATS = __webpack_require__(32); /** * @classdesc @@ -167100,14 +170477,14 @@ var TilemapJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapTiledJSON - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapTiledJSON', function (key, url, xhrSettings) { @@ -167131,7 +170508,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1244 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167146,14 +170523,14 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var TextFile = __webpack_require__(451); +var TextFile = __webpack_require__(458); /** * @classdesc * 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 @@ -167246,7 +170623,7 @@ var UnityAtlasFile = new Class({ * Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -167261,12 +170638,12 @@ var UnityAtlasFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -167275,7 +170652,7 @@ var UnityAtlasFile = new Class({ * 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.unityAtlas({ * key: 'mainmenu', @@ -167287,7 +170664,7 @@ var UnityAtlasFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig` for more details. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); * // and later in your game ... @@ -167308,13 +170685,13 @@ var UnityAtlasFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.unityAtlas({ * key: 'mainmenu', @@ -167331,7 +170708,7 @@ var UnityAtlasFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#unityAtlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -167340,7 +170717,7 @@ var UnityAtlasFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('unityAtlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -167373,7 +170750,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1245 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167383,10 +170760,10 @@ module.exports = UnityAtlasFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(134); +var GetURL = __webpack_require__(138); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -167395,7 +170772,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -167500,13 +170877,13 @@ var VideoFile = new Class({ * @method Phaser.Loader.FileTypes.VideoFile#createVideoElement * @private * @since 3.20.0 - * + * * @return {HTMLVideoElement} The newly created Video element. */ createVideoElement: function () { var video = document.createElement('video'); - + video.controls = false; video.crossOrigin = this.loader.crossOrigin; @@ -167639,7 +171016,10 @@ VideoFile.getVideoURL = function (game, urls) if (url.indexOf('blob:') === 0) { - return url; + return { + url: url, + type: '' + }; } var videoType; @@ -167671,7 +171051,7 @@ VideoFile.getVideoURL = function (game, urls) * Adds a Video file, or array of video files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -167686,14 +171066,14 @@ VideoFile.getVideoURL = function (game, urls) * 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 Video Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Video Cache. * 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 Video Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.video({ * key: 'intro', @@ -167710,7 +171090,7 @@ VideoFile.getVideoURL = function (game, urls) * Due to different browsers supporting different video file types you should usually provide your video files in a variety of formats. * mp4, mov and webm are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on * browser support, starting with the first in the array and progressing to the end. - * + * * Unlike most asset-types, videos do not _need_ to be preloaded. You can create a Video Game Object and then call its `loadURL` method, * to load a video at run-time, rather than in advance. * @@ -167718,7 +171098,7 @@ VideoFile.getVideoURL = function (game, urls) * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#video - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.20.0 * * @param {(string|Phaser.Types.Loader.FileTypes.VideoFileConfig|Phaser.Types.Loader.FileTypes.VideoFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -167728,7 +171108,7 @@ VideoFile.getVideoURL = function (game, urls) * @param {boolean} [noAudio=false] - Does the video have an audio track? If not you can enable auto-playing on it. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('video', function (key, urls, loadEvent, asBlob, noAudio, xhrSettings) { @@ -167764,7 +171144,7 @@ module.exports = VideoFile; /***/ }), -/* 1246 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167774,15 +171154,15 @@ module.exports = VideoFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); -var CustomSet = __webpack_require__(108); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(81); +var CONST = __webpack_require__(17); +var CustomSet = __webpack_require__(133); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(82); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var XHRSettings = __webpack_require__(135); +var SceneEvents = __webpack_require__(22); +var XHRSettings = __webpack_require__(139); /** * @classdesc @@ -167920,9 +171300,9 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#baseURL @@ -167963,7 +171343,8 @@ var LoaderPlugin = new Class({ GetFastValue(sceneConfig, 'async', gameConfig.loaderAsync), GetFastValue(sceneConfig, 'user', gameConfig.loaderUser), GetFastValue(sceneConfig, 'password', gameConfig.loaderPassword), - GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout) + GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout), + GetFastValue(sceneConfig, 'withCredentials', gameConfig.loaderWithCredentials) ); /** @@ -168000,7 +171381,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -168014,9 +171395,9 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#inflight @@ -168027,10 +171408,10 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#queue @@ -168125,9 +171506,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -168136,7 +171517,7 @@ var LoaderPlugin = new Class({ * * @param {string} [url] - The URL to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setBaseURL: function (url) { @@ -168167,7 +171548,7 @@ var LoaderPlugin = new Class({ * 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. * @@ -168176,7 +171557,7 @@ var LoaderPlugin = new Class({ * * @param {string} [path] - The path to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setPath: function (path) { @@ -168194,9 +171575,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -168205,7 +171586,7 @@ var LoaderPlugin = new Class({ * * @param {string} [prefix] - The prefix to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setPrefix: function (prefix) { @@ -168218,9 +171599,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -168231,7 +171612,7 @@ var LoaderPlugin = new Class({ * * @param {string} [crossOrigin] - The value to use for the `crossOrigin` property in the load request. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setCORS: function (crossOrigin) { @@ -168354,7 +171735,7 @@ var LoaderPlugin = new Class({ * @method Phaser.Loader.LoaderPlugin#addPack * @since 3.7.0 * - * @param {any} data - The Pack File data to be parsed and each entry of it to added to the load queue. + * @param {any} pack - The Pack File data to be parsed and each entry of it to added to the load queue. * @param {string} [packKey] - An optional key to use from the pack file data. * * @return {boolean} `true` if any files were added to the queue, otherwise `false`. @@ -168377,6 +171758,11 @@ var LoaderPlugin = new Class({ // Here we go ... for (var key in pack) { + if (!Object.prototype.hasOwnProperty.call(pack, key)) + { + continue; + } + var config = pack[key]; // Any meta data to process? @@ -168521,10 +171907,10 @@ var LoaderPlugin = new Class({ /** * An internal method called by the Loader. - * + * * It will check to see if there are any more files in the pending list that need loading, and if so it will move * them from the list Set into the inflight Set, set their CORs flag and start them loading. - * + * * It will carrying on doing this for each file in the pending list until it runs out, or hits the max allowed parallel downloads. * * @method Phaser.Loader.LoaderPlugin#checkLoadQueue @@ -168561,7 +171947,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -168701,7 +172087,7 @@ var LoaderPlugin = new Class({ * * @method Phaser.Loader.LoaderPlugin#flagForRemoval * @since 3.7.0 - * + * * @param {Phaser.Loader.File} file - The File to be queued for deletion when the Loader completes. */ flagForRemoval: function (file) @@ -168720,7 +172106,7 @@ var LoaderPlugin = new Class({ * @param {*} data - The JSON data, ready parsed. * @param {string} [filename=file.json] - The name to save the JSON file as. * - * @return {Phaser.Loader.LoaderPlugin} This Loader plugin. + * @return {this} This Loader plugin. */ saveJSON: function (data, filename) { @@ -168729,7 +172115,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -168740,7 +172126,7 @@ var LoaderPlugin = new Class({ * @param {string} [filename=file.json] - The filename to save the file as. * @param {string} [filetype=application/json] - The file type to use when saving the file. Defaults to JSON. * - * @return {Phaser.Loader.LoaderPlugin} This Loader plugin. + * @return {this} This Loader plugin. */ save: function (data, filename, filetype) { @@ -168841,7 +172227,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1247 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168851,13 +172237,19 @@ module.exports = LoaderPlugin; */ var CONST = __webpack_require__(50); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @callback ArcadePhysicsCallback * - * @param {Phaser.GameObjects.GameObject} object1 - The first Body to separate. - * @param {Phaser.GameObjects.GameObject} object2 - The second Body to separate. + * A callback receiving two Game Objects. + * + * When colliding a single sprite with a Group or TilemapLayer, `object1` is always the sprite. + * + * For all other cases, `object1` and `object2` match the same arguments in `collide()` or `overlap()`. + * + * @param {Phaser.GameObjects.GameObject} object1 - The first Game Object. + * @param {Phaser.GameObjects.GameObject} object2 - The second Game Object. */ /** @@ -168866,18 +172258,18 @@ var Extend = __webpack_require__(17); var Arcade = { - 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) + ArcadePhysics: __webpack_require__(1260), + Body: __webpack_require__(465), + Collider: __webpack_require__(466), + Components: __webpack_require__(217), + Events: __webpack_require__(218), + Factory: __webpack_require__(459), + Group: __webpack_require__(461), + Image: __webpack_require__(460), + Sprite: __webpack_require__(140), + StaticBody: __webpack_require__(471), + StaticGroup: __webpack_require__(462), + World: __webpack_require__(464) }; @@ -168888,7 +172280,7 @@ module.exports = Arcade; /***/ }), -/* 1248 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168900,16 +172292,16 @@ module.exports = Arcade; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); var DistanceBetween = __webpack_require__(53); -var DistanceSquared = __webpack_require__(316); -var Factory = __webpack_require__(452); +var DistanceSquared = __webpack_require__(320); +var Factory = __webpack_require__(459); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(107); -var OverlapCirc = __webpack_require__(1261); -var OverlapRect = __webpack_require__(456); +var Merge = __webpack_require__(126); +var OverlapCirc = __webpack_require__(1273); +var OverlapRect = __webpack_require__(463); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(457); +var World = __webpack_require__(464); /** * @classdesc @@ -169577,7 +172969,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1249 */ +/* 1261 */ /***/ (function(module, exports) { /** @@ -169652,7 +173044,7 @@ module.exports = Acceleration; /***/ }), -/* 1250 */ +/* 1262 */ /***/ (function(module, exports) { /** @@ -169734,7 +173126,7 @@ module.exports = Angular; /***/ }), -/* 1251 */ +/* 1263 */ /***/ (function(module, exports) { /** @@ -169833,7 +173225,7 @@ module.exports = Bounce; /***/ }), -/* 1252 */ +/* 1264 */ /***/ (function(module, exports) { /** @@ -169960,7 +173352,7 @@ module.exports = Debug; /***/ }), -/* 1253 */ +/* 1265 */ /***/ (function(module, exports) { /** @@ -170093,7 +173485,7 @@ module.exports = Drag; /***/ }), -/* 1254 */ +/* 1266 */ /***/ (function(module, exports) { /** @@ -170217,7 +173609,7 @@ module.exports = Enable; /***/ }), -/* 1255 */ +/* 1267 */ /***/ (function(module, exports) { /** @@ -170227,24 +173619,30 @@ module.exports = Enable; */ /** - * 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. + * Methods for setting the friction of an Arcade Physics Body. + * + * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body. * * @namespace Phaser.Physics.Arcade.Components.Friction * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#friction */ var 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. + * Sets the friction of this game object's physics body. + * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body. * * @method Phaser.Physics.Arcade.Components.Friction#setFriction * @since 3.0.0 * - * @param {number} x - The amount of horizontal friction to apply. - * @param {number} [y=x] - The amount of vertical friction to apply. + * @param {number} x - The amount of horizontal friction to apply, [0, 1]. + * @param {number} [y=x] - The amount of vertical friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFriction: function (x, y) { @@ -170254,15 +173652,17 @@ var Friction = { }, /** - * 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. + * Sets the horizontal friction of this game object's physics body. + * This can move a riding body horizontally when it collides with this one on the vertical axis. * * @method Phaser.Physics.Arcade.Components.Friction#setFrictionX * @since 3.0.0 * - * @param {number} x - The amount of friction to apply. + * @param {number} x - The amount of friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFrictionX: function (x) { @@ -170272,15 +173672,17 @@ var Friction = { }, /** - * 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. + * Sets the vertical friction of this game object's physics body. + * This can move a riding body vertically when it collides with this one on the horizontal axis. * * @method Phaser.Physics.Arcade.Components.Friction#setFrictionY * @since 3.0.0 * - * @param {number} x - The amount of friction to apply. + * @param {number} y - The amount of friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFrictionY: function (y) { @@ -170295,7 +173697,7 @@ module.exports = Friction; /***/ }), -/* 1256 */ +/* 1268 */ /***/ (function(module, exports) { /** @@ -170373,7 +173775,7 @@ module.exports = Gravity; /***/ }), -/* 1257 */ +/* 1269 */ /***/ (function(module, exports) { /** @@ -170415,7 +173817,7 @@ module.exports = Immovable; /***/ }), -/* 1258 */ +/* 1270 */ /***/ (function(module, exports) { /** @@ -170455,7 +173857,7 @@ module.exports = Mass; /***/ }), -/* 1259 */ +/* 1271 */ /***/ (function(module, exports) { /** @@ -170537,7 +173939,7 @@ module.exports = Size; /***/ }), -/* 1260 */ +/* 1272 */ /***/ (function(module, exports) { /** @@ -170636,13 +174038,13 @@ module.exports = Velocity; /***/ }), -/* 1261 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(456); +var OverlapRect = __webpack_require__(463); var Circle = __webpack_require__(65); -var CircleToCircle = __webpack_require__(202); -var CircleToRectangle = __webpack_require__(203); +var CircleToCircle = __webpack_require__(205); +var CircleToRectangle = __webpack_require__(206); /** * This method will search the given circular area and return an array of all physics bodies that @@ -170704,7 +174106,7 @@ module.exports = OverlapCirc; /***/ }), -/* 1262 */ +/* 1274 */ /***/ (function(module, exports) { /** @@ -170737,7 +174139,7 @@ module.exports = 'collide'; /***/ }), -/* 1263 */ +/* 1275 */ /***/ (function(module, exports) { /** @@ -170770,7 +174172,7 @@ module.exports = 'overlap'; /***/ }), -/* 1264 */ +/* 1276 */ /***/ (function(module, exports) { /** @@ -170793,7 +174195,7 @@ module.exports = 'pause'; /***/ }), -/* 1265 */ +/* 1277 */ /***/ (function(module, exports) { /** @@ -170816,7 +174218,7 @@ module.exports = 'resume'; /***/ }), -/* 1266 */ +/* 1278 */ /***/ (function(module, exports) { /** @@ -170848,7 +174250,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1267 */ +/* 1279 */ /***/ (function(module, exports) { /** @@ -170880,7 +174282,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1268 */ +/* 1280 */ /***/ (function(module, exports) { /** @@ -170912,7 +174314,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1269 */ +/* 1281 */ /***/ (function(module, exports) { /** @@ -170938,7 +174340,7 @@ module.exports = 'worldstep'; /***/ }), -/* 1270 */ +/* 1282 */ /***/ (function(module, exports) { /** @@ -170979,7 +174381,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 1271 */ +/* 1283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170988,9 +174390,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(1272); -var TileCheckY = __webpack_require__(1274); -var TileIntersectsBody = __webpack_require__(463); +var TileCheckX = __webpack_require__(1284); +var TileCheckY = __webpack_require__(1286); +var TileIntersectsBody = __webpack_require__(470); /** * The core separation function to separate a physics body and a tile. @@ -171099,7 +174501,7 @@ module.exports = SeparateTile; /***/ }), -/* 1272 */ +/* 1284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171108,7 +174510,7 @@ module.exports = SeparateTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(1273); +var ProcessTileSeparationX = __webpack_require__(1285); /** * Check the body against the given tile on the X axis. @@ -171189,7 +174591,7 @@ module.exports = TileCheckX; /***/ }), -/* 1273 */ +/* 1285 */ /***/ (function(module, exports) { /** @@ -171236,7 +174638,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 1274 */ +/* 1286 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171245,7 +174647,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(1275); +var ProcessTileSeparationY = __webpack_require__(1287); /** * Check the body against the given tile on the Y axis. @@ -171326,7 +174728,7 @@ module.exports = TileCheckY; /***/ }), -/* 1275 */ +/* 1287 */ /***/ (function(module, exports) { /** @@ -171373,7 +174775,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 1276 */ +/* 1288 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171382,7 +174784,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(460); +var GetOverlapX = __webpack_require__(467); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -171464,7 +174866,7 @@ module.exports = SeparateX; /***/ }), -/* 1277 */ +/* 1289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171473,7 +174875,7 @@ module.exports = SeparateX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(461); +var GetOverlapY = __webpack_require__(468); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -171555,21 +174957,19 @@ module.exports = SeparateY; /***/ }), -/* 1278 */, -/* 1279 */, -/* 1280 */, -/* 1281 */, -/* 1282 */, -/* 1283 */, -/* 1284 */, -/* 1285 */, -/* 1286 */, -/* 1287 */, -/* 1288 */, -/* 1289 */, /* 1290 */, /* 1291 */, -/* 1292 */ +/* 1292 */, +/* 1293 */, +/* 1294 */, +/* 1295 */, +/* 1296 */, +/* 1297 */, +/* 1298 */, +/* 1299 */, +/* 1300 */, +/* 1301 */, +/* 1302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171584,17 +174984,17 @@ module.exports = SeparateY; module.exports = { - BasePlugin: __webpack_require__(468), - DefaultPlugins: __webpack_require__(173), + BasePlugin: __webpack_require__(473), + DefaultPlugins: __webpack_require__(175), PluginCache: __webpack_require__(23), - PluginManager: __webpack_require__(364), - ScenePlugin: __webpack_require__(1293) + PluginManager: __webpack_require__(369), + ScenePlugin: __webpack_require__(1303) }; /***/ }), -/* 1293 */ +/* 1303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171603,9 +175003,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(468); +var BasePlugin = __webpack_require__(473); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -171722,7 +175122,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1294 */ +/* 1304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171731,8 +175131,8 @@ module.exports = ScenePlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); -var CONST = __webpack_require__(175); +var Extend = __webpack_require__(18); +var CONST = __webpack_require__(177); /** * @namespace Phaser.Scale @@ -171760,12 +175160,12 @@ var CONST = __webpack_require__(175); var Scale = { - Center: __webpack_require__(353), + Center: __webpack_require__(358), Events: __webpack_require__(92), - Orientation: __webpack_require__(354), - ScaleManager: __webpack_require__(365), - ScaleModes: __webpack_require__(355), - Zoom: __webpack_require__(356) + Orientation: __webpack_require__(359), + ScaleManager: __webpack_require__(370), + ScaleModes: __webpack_require__(360), + Zoom: __webpack_require__(361) }; @@ -171778,7 +175178,7 @@ module.exports = Scale; /***/ }), -/* 1295 */ +/* 1305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171787,8 +175187,8 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(123); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(125); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Scenes @@ -171796,11 +175196,11 @@ var Extend = __webpack_require__(17); var Scene = { - Events: __webpack_require__(19), - SceneManager: __webpack_require__(367), - ScenePlugin: __webpack_require__(1296), - Settings: __webpack_require__(369), - Systems: __webpack_require__(178) + Events: __webpack_require__(22), + SceneManager: __webpack_require__(372), + ScenePlugin: __webpack_require__(1306), + Settings: __webpack_require__(374), + Systems: __webpack_require__(180) }; @@ -171811,7 +175211,7 @@ module.exports = Scene; /***/ }), -/* 1296 */ +/* 1306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171820,9 +175220,9 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(19); +var Events = __webpack_require__(22); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); @@ -172135,7 +175535,7 @@ var ScenePlugin = new Class({ if (target.sys.isSleeping()) { - target.sys.wake(); + target.sys.wake(GetFastValue(config, 'data')); } else { @@ -172821,7 +176221,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1297 */ +/* 1307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172836,18 +176236,18 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(126), - Map: __webpack_require__(159), - ProcessQueue: __webpack_require__(184), - RTree: __webpack_require__(462), - Set: __webpack_require__(108), - Size: __webpack_require__(366) + List: __webpack_require__(129), + Map: __webpack_require__(162), + ProcessQueue: __webpack_require__(186), + RTree: __webpack_require__(469), + Set: __webpack_require__(133), + Size: __webpack_require__(371) }; /***/ }), -/* 1298 */ +/* 1308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172856,8 +176256,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); -var FilterMode = __webpack_require__(1299); +var Extend = __webpack_require__(18); +var FilterMode = __webpack_require__(1309); /** * @namespace Phaser.Textures @@ -172883,14 +176283,14 @@ var FilterMode = __webpack_require__(1299); var Textures = { - CanvasTexture: __webpack_require__(371), - Events: __webpack_require__(119), + CanvasTexture: __webpack_require__(376), + Events: __webpack_require__(121), FilterMode: FilterMode, Frame: __webpack_require__(94), - Parsers: __webpack_require__(373), - Texture: __webpack_require__(180), - TextureManager: __webpack_require__(370), - TextureSource: __webpack_require__(372) + Parsers: __webpack_require__(378), + Texture: __webpack_require__(182), + TextureManager: __webpack_require__(375), + TextureSource: __webpack_require__(377) }; @@ -172900,7 +176300,7 @@ module.exports = Textures; /***/ }), -/* 1299 */ +/* 1309 */ /***/ (function(module, exports) { /** @@ -172944,7 +176344,7 @@ module.exports = CONST; /***/ }), -/* 1300 */ +/* 1310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172959,30 +176359,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(137), - Parsers: __webpack_require__(1330), + Components: __webpack_require__(141), + Parsers: __webpack_require__(1340), - Formats: __webpack_require__(31), - ImageCollection: __webpack_require__(479), - ParseToTilemap: __webpack_require__(224), + Formats: __webpack_require__(32), + ImageCollection: __webpack_require__(484), + ParseToTilemap: __webpack_require__(227), Tile: __webpack_require__(74), - Tilemap: __webpack_require__(488), - TilemapCreator: __webpack_require__(1339), - TilemapFactory: __webpack_require__(1340), - Tileset: __webpack_require__(141), + Tilemap: __webpack_require__(493), + TilemapCreator: __webpack_require__(1349), + TilemapFactory: __webpack_require__(1350), + Tileset: __webpack_require__(104), - LayerData: __webpack_require__(104), - MapData: __webpack_require__(105), - ObjectLayer: __webpack_require__(482), + LayerData: __webpack_require__(102), + MapData: __webpack_require__(103), + ObjectLayer: __webpack_require__(487), - DynamicTilemapLayer: __webpack_require__(489), - StaticTilemapLayer: __webpack_require__(490) + DynamicTilemapLayer: __webpack_require__(494), + StaticTilemapLayer: __webpack_require__(495) }; /***/ }), -/* 1301 */ +/* 1311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173047,7 +176447,7 @@ module.exports = Copy; /***/ }), -/* 1302 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173056,10 +176456,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(139); -var TileToWorldY = __webpack_require__(140); +var TileToWorldX = __webpack_require__(143); +var TileToWorldY = __webpack_require__(144); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(469); +var ReplaceByIndex = __webpack_require__(474); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -173132,7 +176532,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1303 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173142,7 +176542,7 @@ module.exports = CreateFromTiles; */ var SnapFloor = __webpack_require__(93); -var SnapCeil = __webpack_require__(325); +var SnapCeil = __webpack_require__(329); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. @@ -173289,7 +176689,7 @@ module.exports = CullTiles; /***/ }), -/* 1304 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173343,7 +176743,7 @@ module.exports = Fill; /***/ }), -/* 1305 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173391,7 +176791,7 @@ module.exports = FilterTiles; /***/ }), -/* 1306 */ +/* 1316 */ /***/ (function(module, exports) { /** @@ -173479,7 +176879,7 @@ module.exports = FindByIndex; /***/ }), -/* 1307 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173533,7 +176933,7 @@ module.exports = FindTile; /***/ }), -/* 1308 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173583,7 +176983,7 @@ module.exports = ForEachTile; /***/ }), -/* 1309 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173592,7 +176992,7 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(138); +var GetTileAt = __webpack_require__(142); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -173624,7 +177024,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1310 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173633,12 +177033,12 @@ module.exports = GetTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(422); +var Geom = __webpack_require__(429); var GetTilesWithin = __webpack_require__(24); -var Intersects = __webpack_require__(423); +var Intersects = __webpack_require__(430); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(139); -var TileToWorldY = __webpack_require__(140); +var TileToWorldX = __webpack_require__(143); +var TileToWorldY = __webpack_require__(144); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -173721,7 +177121,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1311 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173771,7 +177171,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1312 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173780,7 +177180,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(470); +var HasTileAt = __webpack_require__(475); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -173811,7 +177211,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1313 */ +/* 1323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173820,7 +177220,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(218); +var PutTileAt = __webpack_require__(221); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -173854,7 +177254,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1314 */ +/* 1324 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173864,7 +177264,7 @@ module.exports = PutTileAtWorldXY; */ var CalculateFacesWithin = __webpack_require__(51); -var PutTileAt = __webpack_require__(218); +var PutTileAt = __webpack_require__(221); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -173918,7 +177318,7 @@ module.exports = PutTilesAt; /***/ }), -/* 1315 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173928,7 +177328,7 @@ module.exports = PutTilesAt; */ var GetTilesWithin = __webpack_require__(24); -var GetRandom = __webpack_require__(183); +var GetRandom = __webpack_require__(185); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -173976,7 +177376,7 @@ module.exports = Randomize; /***/ }), -/* 1316 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173985,7 +177385,7 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(471); +var RemoveTileAt = __webpack_require__(476); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -174017,7 +177417,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1317 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174027,7 +177427,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(24); -var Color = __webpack_require__(348); +var Color = __webpack_require__(353); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -174106,7 +177506,7 @@ module.exports = RenderDebug; /***/ }), -/* 1318 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174117,7 +177517,7 @@ module.exports = RenderDebug; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(219); +var SetLayerCollisionIndex = __webpack_require__(222); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -174175,7 +177575,7 @@ module.exports = SetCollision; /***/ }), -/* 1319 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174186,7 +177586,7 @@ module.exports = SetCollision; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(219); +var SetLayerCollisionIndex = __webpack_require__(222); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -174250,7 +177650,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1320 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174261,7 +177661,7 @@ module.exports = SetCollisionBetween; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(219); +var SetLayerCollisionIndex = __webpack_require__(222); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -174307,7 +177707,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1321 */ +/* 1331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174318,7 +177718,7 @@ module.exports = SetCollisionByExclusion; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var HasValue = __webpack_require__(99); +var HasValue = __webpack_require__(108); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -174382,7 +177782,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1322 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174442,7 +177842,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1323 */ +/* 1333 */ /***/ (function(module, exports) { /** @@ -174489,7 +177889,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1324 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174532,7 +177932,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1325 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174577,7 +177977,7 @@ module.exports = Shuffle; /***/ }), -/* 1326 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174628,7 +178028,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1327 */ +/* 1337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174637,8 +178037,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(139); -var TileToWorldY = __webpack_require__(140); +var TileToWorldX = __webpack_require__(143); +var TileToWorldY = __webpack_require__(144); var Vector2 = __webpack_require__(3); /** @@ -174672,7 +178072,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1328 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174752,7 +178152,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1329 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174797,7 +178197,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1330 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174812,18 +178212,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(472), - Parse2DArray: __webpack_require__(220), - ParseCSV: __webpack_require__(473), + Parse: __webpack_require__(477), + Parse2DArray: __webpack_require__(223), + ParseCSV: __webpack_require__(478), - Impact: __webpack_require__(1331), - Tiled: __webpack_require__(1332) + Impact: __webpack_require__(1341), + Tiled: __webpack_require__(1342) }; /***/ }), -/* 1331 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174838,15 +178238,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(486), - ParseTilesets: __webpack_require__(487), - ParseWeltmeister: __webpack_require__(485) + ParseTileLayers: __webpack_require__(491), + ParseTilesets: __webpack_require__(492), + ParseWeltmeister: __webpack_require__(490) }; /***/ }), -/* 1332 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174861,22 +178261,22 @@ module.exports = { module.exports = { - 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) + AssignTileProperties: __webpack_require__(489), + Base64Decode: __webpack_require__(481), + BuildTilesetIndex: __webpack_require__(488), + ParseGID: __webpack_require__(224), + ParseImageLayers: __webpack_require__(482), + ParseJSONTiled: __webpack_require__(479), + ParseObject: __webpack_require__(226), + ParseObjectLayers: __webpack_require__(486), + ParseTileLayers: __webpack_require__(480), + ParseTilesets: __webpack_require__(483) }; /***/ }), -/* 1333 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174890,12 +178290,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1334); + renderWebGL = __webpack_require__(1344); } if (true) { - renderCanvas = __webpack_require__(1335); + renderCanvas = __webpack_require__(1345); } module.exports = { @@ -174907,7 +178307,7 @@ module.exports = { /***/ }), -/* 1334 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174916,7 +178316,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -175024,7 +178424,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1335 */ +/* 1345 */ /***/ (function(module, exports) { /** @@ -175156,7 +178556,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1336 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175170,12 +178570,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1337); + renderWebGL = __webpack_require__(1347); } if (true) { - renderCanvas = __webpack_require__(1338); + renderCanvas = __webpack_require__(1348); } module.exports = { @@ -175187,7 +178587,7 @@ module.exports = { /***/ }), -/* 1337 */ +/* 1347 */ /***/ (function(module, exports) { /** @@ -175259,7 +178659,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1338 */ +/* 1348 */ /***/ (function(module, exports) { /** @@ -175393,7 +178793,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1339 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175403,7 +178803,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(224); +var ParseToTilemap = __webpack_require__(227); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -175437,7 +178837,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1340 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175447,7 +178847,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(5); -var ParseToTilemap = __webpack_require__(224); +var ParseToTilemap = __webpack_require__(227); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -175503,7 +178903,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1341 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175518,14 +178918,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1342), - TimerEvent: __webpack_require__(491) + Clock: __webpack_require__(1352), + TimerEvent: __webpack_require__(496) }; /***/ }), -/* 1342 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175536,8 +178936,8 @@ module.exports = { var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var TimerEvent = __webpack_require__(491); +var SceneEvents = __webpack_require__(22); +var TimerEvent = __webpack_require__(496); /** * @classdesc @@ -175931,7 +179331,7 @@ module.exports = Clock; /***/ }), -/* 1343 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175941,7 +179341,7 @@ module.exports = Clock; */ var CONST = __webpack_require__(89); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Tweens @@ -175949,13 +179349,13 @@ var Extend = __webpack_require__(17); var Tweens = { - Builders: __webpack_require__(1344), - Events: __webpack_require__(229), + Builders: __webpack_require__(1354), + Events: __webpack_require__(232), - TweenManager: __webpack_require__(1359), - Tween: __webpack_require__(228), - TweenData: __webpack_require__(230), - Timeline: __webpack_require__(497) + TweenManager: __webpack_require__(1369), + Tween: __webpack_require__(231), + TweenData: __webpack_require__(233), + Timeline: __webpack_require__(502) }; @@ -175966,7 +179366,7 @@ module.exports = Tweens; /***/ }), -/* 1344 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175982,22 +179382,22 @@ module.exports = Tweens; module.exports = { GetBoolean: __webpack_require__(88), - GetEaseFunction: __webpack_require__(82), - 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) + GetEaseFunction: __webpack_require__(69), + GetNewValue: __webpack_require__(145), + GetProps: __webpack_require__(497), + GetTargets: __webpack_require__(228), + GetTweens: __webpack_require__(498), + GetValueOp: __webpack_require__(229), + NumberTweenBuilder: __webpack_require__(499), + StaggerBuilder: __webpack_require__(500), + TimelineBuilder: __webpack_require__(501), + TweenBuilder: __webpack_require__(146) }; /***/ }), -/* 1345 */ +/* 1355 */ /***/ (function(module, exports) { /** @@ -176072,7 +179472,7 @@ module.exports = [ /***/ }), -/* 1346 */ +/* 1356 */ /***/ (function(module, exports) { /** @@ -176108,7 +179508,7 @@ module.exports = 'complete'; /***/ }), -/* 1347 */ +/* 1357 */ /***/ (function(module, exports) { /** @@ -176145,7 +179545,7 @@ module.exports = 'loop'; /***/ }), -/* 1348 */ +/* 1358 */ /***/ (function(module, exports) { /** @@ -176182,7 +179582,7 @@ module.exports = 'pause'; /***/ }), -/* 1349 */ +/* 1359 */ /***/ (function(module, exports) { /** @@ -176219,7 +179619,7 @@ module.exports = 'resume'; /***/ }), -/* 1350 */ +/* 1360 */ /***/ (function(module, exports) { /** @@ -176255,7 +179655,7 @@ module.exports = 'start'; /***/ }), -/* 1351 */ +/* 1361 */ /***/ (function(module, exports) { /** @@ -176292,7 +179692,7 @@ module.exports = 'update'; /***/ }), -/* 1352 */ +/* 1362 */ /***/ (function(module, exports) { /** @@ -176332,7 +179732,7 @@ module.exports = 'active'; /***/ }), -/* 1353 */ +/* 1363 */ /***/ (function(module, exports) { /** @@ -176373,7 +179773,7 @@ module.exports = 'complete'; /***/ }), -/* 1354 */ +/* 1364 */ /***/ (function(module, exports) { /** @@ -176417,7 +179817,7 @@ module.exports = 'loop'; /***/ }), -/* 1355 */ +/* 1365 */ /***/ (function(module, exports) { /** @@ -176462,7 +179862,7 @@ module.exports = 'repeat'; /***/ }), -/* 1356 */ +/* 1366 */ /***/ (function(module, exports) { /** @@ -176502,7 +179902,7 @@ module.exports = 'start'; /***/ }), -/* 1357 */ +/* 1367 */ /***/ (function(module, exports) { /** @@ -176545,7 +179945,7 @@ module.exports = 'update'; /***/ }), -/* 1358 */ +/* 1368 */ /***/ (function(module, exports) { /** @@ -176591,7 +179991,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1359 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176600,15 +180000,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(121); +var ArrayRemove = __webpack_require__(123); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(494); +var NumberTweenBuilder = __webpack_require__(499); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var StaggerBuilder = __webpack_require__(495); -var TimelineBuilder = __webpack_require__(496); +var SceneEvents = __webpack_require__(22); +var StaggerBuilder = __webpack_require__(500); +var TimelineBuilder = __webpack_require__(501); var TWEEN_CONST = __webpack_require__(89); -var TweenBuilder = __webpack_require__(143); +var TweenBuilder = __webpack_require__(146); /** * @classdesc @@ -177363,7 +180763,7 @@ module.exports = TweenManager; /***/ }), -/* 1360 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177378,16 +180778,16 @@ module.exports = TweenManager; module.exports = { - Array: __webpack_require__(181), - Base64: __webpack_require__(1361), - Objects: __webpack_require__(1363), - String: __webpack_require__(1367) + Array: __webpack_require__(183), + Base64: __webpack_require__(1371), + Objects: __webpack_require__(1373), + String: __webpack_require__(1377) }; /***/ }), -/* 1361 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177402,14 +180802,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1362), - Base64ToArrayBuffer: __webpack_require__(380) + ArrayBufferToBase64: __webpack_require__(1372), + Base64ToArrayBuffer: __webpack_require__(387) }; /***/ }), -/* 1362 */ +/* 1372 */ /***/ (function(module, exports) { /** @@ -177467,7 +180867,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1363 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177483,25 +180883,25 @@ module.exports = ArrayBufferToBase64; module.exports = { Clone: __webpack_require__(67), - Extend: __webpack_require__(17), - GetAdvancedValue: __webpack_require__(15), + Extend: __webpack_require__(18), + GetAdvancedValue: __webpack_require__(14), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1364), + GetMinMaxValue: __webpack_require__(1374), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1365), - HasAny: __webpack_require__(399), - HasValue: __webpack_require__(99), + HasAll: __webpack_require__(1375), + HasAny: __webpack_require__(406), + HasValue: __webpack_require__(108), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(107), - MergeRight: __webpack_require__(1366), - Pick: __webpack_require__(480), - SetValue: __webpack_require__(419) + Merge: __webpack_require__(126), + MergeRight: __webpack_require__(1376), + Pick: __webpack_require__(485), + SetValue: __webpack_require__(426) }; /***/ }), -/* 1364 */ +/* 1374 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177511,7 +180911,7 @@ module.exports = { */ var GetValue = __webpack_require__(6); -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); /** * Retrieves and clamps a numerical value from an object. @@ -177540,7 +180940,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1365 */ +/* 1375 */ /***/ (function(module, exports) { /** @@ -177577,7 +180977,7 @@ module.exports = HasAll; /***/ }), -/* 1366 */ +/* 1376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177620,7 +181020,7 @@ module.exports = MergeRight; /***/ }), -/* 1367 */ +/* 1377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177635,17 +181035,17 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1368), - Pad: __webpack_require__(160), - Reverse: __webpack_require__(1369), - UppercaseFirst: __webpack_require__(179), - UUID: __webpack_require__(194) + Format: __webpack_require__(1378), + Pad: __webpack_require__(163), + Reverse: __webpack_require__(1379), + UppercaseFirst: __webpack_require__(181), + UUID: __webpack_require__(196) }; /***/ }), -/* 1368 */ +/* 1378 */ /***/ (function(module, exports) { /** @@ -177680,7 +181080,7 @@ module.exports = Format; /***/ }), -/* 1369 */ +/* 1379 */ /***/ (function(module, exports) { /** @@ -177709,7 +181109,7 @@ module.exports = Reverse; /***/ }), -/* 1370 */ +/* 1380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177725,36 +181125,26 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(374), + SoundManagerCreator: __webpack_require__(379), Events: __webpack_require__(59), - BaseSound: __webpack_require__(125), - BaseSoundManager: __webpack_require__(124), + BaseSound: __webpack_require__(128), + BaseSoundManager: __webpack_require__(127), - WebAudioSound: __webpack_require__(381), - WebAudioSoundManager: __webpack_require__(379), + WebAudioSound: __webpack_require__(388), + WebAudioSoundManager: __webpack_require__(386), - HTML5AudioSound: __webpack_require__(376), - HTML5AudioSoundManager: __webpack_require__(375), + HTML5AudioSound: __webpack_require__(383), + HTML5AudioSoundManager: __webpack_require__(380), - NoAudioSound: __webpack_require__(378), - NoAudioSoundManager: __webpack_require__(377) + NoAudioSound: __webpack_require__(385), + NoAudioSoundManager: __webpack_require__(384) }; /***/ }), -/* 1371 */, -/* 1372 */, -/* 1373 */, -/* 1374 */, -/* 1375 */, -/* 1376 */, -/* 1377 */, -/* 1378 */, -/* 1379 */, -/* 1380 */, /* 1381 */, /* 1382 */, /* 1383 */, @@ -177807,27 +181197,7 @@ module.exports = { /* 1430 */, /* 1431 */, /* 1432 */, -/* 1433 */, -/* 1434 */, -/* 1435 */, -/* 1436 */, -/* 1437 */, -/* 1438 */, -/* 1439 */, -/* 1440 */, -/* 1441 */, -/* 1442 */, -/* 1443 */, -/* 1444 */, -/* 1445 */, -/* 1446 */, -/* 1447 */, -/* 1448 */, -/* 1449 */, -/* 1450 */, -/* 1451 */, -/* 1452 */, -/* 1453 */ +/* 1433 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -177836,10 +181206,10 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(512); +__webpack_require__(517); -var CONST = __webpack_require__(29); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(33); +var Extend = __webpack_require__(18); /** * @namespace Phaser @@ -177854,37 +181224,37 @@ var Extend = __webpack_require__(17); var Phaser = { - Actions: __webpack_require__(238), - Animations: __webpack_require__(632), - Cache: __webpack_require__(633), - Cameras: __webpack_require__(636), - Core: __webpack_require__(719), + Actions: __webpack_require__(241), + Animations: __webpack_require__(637), + Cache: __webpack_require__(638), + Cameras: __webpack_require__(641), + Core: __webpack_require__(727), Class: __webpack_require__(0), - 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), + Create: __webpack_require__(788), + Curves: __webpack_require__(794), + Data: __webpack_require__(797), + Display: __webpack_require__(799), + DOM: __webpack_require__(816), + Events: __webpack_require__(817), + Game: __webpack_require__(819), + GameObjects: __webpack_require__(912), + Geom: __webpack_require__(429), + Input: __webpack_require__(1199), + Loader: __webpack_require__(1233), + Math: __webpack_require__(170), Physics: { - Arcade: __webpack_require__(1247) + Arcade: __webpack_require__(1259) }, - 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) + Plugins: __webpack_require__(1302), + Scale: __webpack_require__(1304), + Scene: __webpack_require__(373), + Scenes: __webpack_require__(1305), + Structs: __webpack_require__(1307), + Textures: __webpack_require__(1308), + Tilemaps: __webpack_require__(1310), + Time: __webpack_require__(1351), + Tweens: __webpack_require__(1353), + Utils: __webpack_require__(1370) }; @@ -177894,7 +181264,7 @@ Phaser = Extend(false, Phaser, CONST); if (true) { - Phaser.Sound = __webpack_require__(1370); + Phaser.Sound = __webpack_require__(1380); } // Export it @@ -177909,7 +181279,7 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(511))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(516))) /***/ }) /******/ ]); diff --git a/dist/phaser-arcade-physics.min.js b/dist/phaser-arcade-physics.min.js index 1d5ef78f6..2859be359 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=1453)}([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(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;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},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*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},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},function(t,e,i){var n=i(0),s=i(47),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(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(532),AlphaSingle:i(269),Animation:i(503),BlendMode:i(272),ComputedSize:i(551),Crop:i(552),Depth:i(273),Flip:i(553),GetBounds:i(554),Mask:i(277),Origin:i(571),PathFollower:i(572),Pipeline:i(156),ScrollFactor:i(280),Size:i(573),Texture:i(574),TextureCrop:i(575),Tint:i(576),ToJSON:i(281),Transform:i(282),TransformMatrix:i(29),Visible:i(283)}},function(t,e,i){var n=i(0),s=i(281),r=i(113),o=i(10),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},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),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(170),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){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(23),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){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},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,i){t.exports={BOOT:i(708),CREATE:i(709),DESTROY:i(710),PAUSE:i(711),POST_UPDATE:i(712),PRE_UPDATE:i(713),READY:i(714),RENDER:i(715),RESUME:i(716),SHUTDOWN:i(717),SLEEP:i(718),START:i(719),TRANSITION_COMPLETE:i(720),TRANSITION_INIT:i(721),TRANSITION_OUT:i(722),TRANSITION_START:i(723),TRANSITION_WAKE:i(724),UPDATE:i(725),WAKE:i(726)}},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(33),a=i(167),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(12),r=i(13),o=i(56),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,i){var n=i(0),s=i(165),r=i(295),o=i(166),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){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n={VERSION:"3.23.0",BlendModes:i(52),ScaleModes:i(234),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){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(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(646),FADE_IN_COMPLETE:i(647),FADE_IN_START:i(648),FADE_OUT_COMPLETE:i(649),FADE_OUT_START:i(650),FLASH_COMPLETE:i(651),FLASH_START:i(652),PAN_COMPLETE:i(653),PAN_START:i(654),POST_RENDER:i(655),PRE_RENDER:i(656),ROTATE_COMPLETE:i(657),ROTATE_START:i(658),SHAKE_COMPLETE:i(659),SHAKE_START:i(660),ZOOM_COMPLETE:i(661),ZOOM_START:i(662)}},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){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(142),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(275),r=i(153),o=i(47),a=i(154),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(889),DECODED:i(890),DECODED_ALL:i(891),DESTROY:i(892),DETUNE:i(893),GLOBAL_DETUNE:i(894),GLOBAL_MUTE:i(895),GLOBAL_RATE:i(896),GLOBAL_VOLUME:i(897),LOOP:i(898),LOOPED:i(899),MUTE:i(900),PAUSE_ALL:i(901),PAUSE:i(902),PLAY:i(903),RATE:i(904),RESUME_ALL:i(905),RESUME:i(906),SEEK:i(907),STOP_ALL:i(908),STOP:i(909),UNLOCKED:i(910),VOLUME:i(911)}},function(t,e,i){var n=i(0),s=i(17),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(115),s=i(181);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,i){var n=i(9);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(17),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,i){var n=i(0),s=i(12),r=i(13),o=i(965),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){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(868),COMPLETE:i(869),FILE_COMPLETE:i(870),FILE_KEY_COMPLETE:i(871),FILE_LOAD_ERROR:i(872),FILE_LOAD:i(873),FILE_PROGRESS:i(874),POST_PROCESS:i(875),PROGRESS:i(876),START:i(877)}},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(19);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(581),VIDEO_COMPLETE:i(582),VIDEO_CREATED:i(583),VIDEO_ERROR:i(584),VIDEO_LOOP:i(585),VIDEO_PLAY:i(586),VIDEO_SEEKED:i(587),VIDEO_SEEKING:i(588),VIDEO_STOP:i(589),VIDEO_TIMEOUT:i(590),VIDEO_UNLOCKED:i(591)}},function(t,e,i){var n=i(0),s=i(12),r=i(35),o=i(10),a=i(36),h=i(11),l=i(29),u=i(164),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(702),FULLSCREEN_FAILED:i(703),FULLSCREEN_UNSUPPORTED:i(704),LEAVE_FULLSCREEN:i(705),ORIENTATION_CHANGE:i(706),RESIZE:i(707)}},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(19),r=i(18),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(397),o=i(398),a=i(47),h=i(157),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(241),s=i(0),r=i(90),o=i(2),a=i(6),h=i(7),l=i(391),u=i(133),c=i(75),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=this.firstgid&&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,i){var n=i(302),s=i(303),r=i(304),o=i(305),a=i(306),h=i(307),l=i(308),u=i(309),c=i(310),d=i(311),f=i(312),p=i(313);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},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(728))},function(t,e,i){var n,s=i(117),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 Math.random()*(e-t)+t}},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(780),ERROR:i(781),LOAD:i(782),READY:i(783),REMOVE:i(784)}},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(80);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(67);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(67),r=i(10),o=i(59),a=i(20),h=i(1),l=i(381),u=i(382),c=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,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,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},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return l(this.sounds,"key",t)},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)},removeAll:function(){this.sounds.forEach(function(t){t.destroy()}),this.sounds.length=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)},stopByKey:function(t){var e=0;return this.getAll(t).forEach(function(t){t.stop()&&e++}),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},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.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),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=c},function(t,e,i){var n=i(0),s=i(10),r=i(59),o=i(18),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(183),s=i(0),r=i(1),o=i(131),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(184),s=i(389);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(a-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&&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(1215),ANY_KEY_UP:i(1216),COMBO_MATCH:i(1217),DOWN:i(1218),KEY_DOWN:i(1219),KEY_UP:i(1220),UP:i(1221)}},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,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(217),r=i(75),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(220),CalculateFacesWithin:i(51),Copy:i(1311),CreateFromTiles:i(1312),CullTiles:i(1313),Fill:i(1314),FilterTiles:i(1315),FindByIndex:i(1316),FindTile:i(1317),ForEachTile:i(1318),GetTileAt:i(142),GetTileAtWorldXY:i(1319),GetTilesWithin:i(24),GetTilesWithinShape:i(1320),GetTilesWithinWorldXY:i(1321),HasTileAt:i(475),HasTileAtWorldXY:i(1322),IsInLayerBounds:i(101),PutTileAt:i(221),PutTileAtWorldXY:i(1323),PutTilesAt:i(1324),Randomize:i(1325),RemoveTileAt:i(476),RemoveTileAtWorldXY:i(1326),RenderDebug:i(1327),ReplaceByIndex:i(474),SetCollision:i(1328),SetCollisionBetween:i(1329),SetCollisionByExclusion:i(1330),SetCollisionByProperty:i(1331),SetCollisionFromCollisionGroup:i(1332),SetTileIndexCallback:i(1333),SetTileLocationCallback:i(1334),Shuffle:i(1335),SwapByIndex:i(1336),TileToWorldX:i(143),TileToWorldXY:i(1337),TileToWorldY:i(144),WeightedRandomize:i(1338),WorldToTileX:i(63),WorldToTileXY:i(1339),WorldToTileY:i(64)}},function(t,e,i){var n=i(101);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){t.exports=function(t,e,i){var n;n=t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,s,r,o,a){return t[e](i,n,s,r,o,a)}:function(){return t[e]}:"function"==typeof i?i:function(){return i};return n}},function(t,e,i){var n=i(230),s=i(14),r=i(88),o=i(69),a=i(145),h=i(497),l=i(228),u=i(6),c=i(229),d=i(231),f=i(233);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:l(e),g=h(e),v=a(e,"delay",i.delay),m=a(e,"duration",i.duration),y=u(e,"easeParams",i.easeParams),x=o(u(e,"ease",i.ease),y),T=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),E=a(e,"repeatDelay",i.repeatDelay),_=r(e,"yoyo",i.yoyo),b=r(e,"flipX",i.flipX),A=r(e,"flipY",i.flipY),S=[],C=0;C=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(4);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x+t.radius*Math.cos(e),i.y=t.y+t.radius*Math.sin(e),i}},function(t,e,i){var n=i(4);t.exports=function(t,e){void 0===e&&(e=new n);var i=2*Math.PI*Math.random(),s=Math.random()+Math.random(),r=s>1?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(19),s=i(0),r=i(10),o=i(111),a=i(270),h=i(271),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._repeatDelay&&!t.pendingRepeat||(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&&i>0&&(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(165);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(15);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(183),s=i(52),r=i(0),o=i(12),a=i(90),h=i(13),l=i(11),u=i(952),c=i(393),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.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,s=i[0].getBounds();t.setTo(s.x,s.y,s.width,s.height);for(var r=1;r-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(132),s=i(0),r=i(957),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(192),o=i(269),a=i(272),h=i(273),l=i(277),u=i(156),c=i(282),d=i(283),f=i(280),p=i(29),g=i(95),v=i(13),m=i(2),y=i(6),x=i(15),T=i(963),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(13),o=i(401),a=i(129),h=i(403),l=i(973),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;rr&&(o=t[r]),s[r]=o,t.length>r+1&&(o=t[r+1]),s[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,n=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var s=0;if(t.length===e)for(i=0;is&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;nl){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&&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(20),a=i(13),h=i(328),l=i(167),u=i(992),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(19),r=i(12),o=i(90),a=i(20),h=i(13),l=i(59),u=i(196),c=i(995),d=i(15),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(202),r=i(418),o=i(47),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(208);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(431);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(1201),BUTTON_UP:i(1202),CONNECTED:i(1203),DISCONNECTED:i(1204),GAMEPAD_BUTTON_DOWN:i(1205),GAMEPAD_BUTTON_UP:i(1206)}},function(t,e,i){var n=i(18),s=i(139);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(17),r=i(21),o=i(8),a=i(2),h=i(7),l=i(363),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(1356),TIMELINE_LOOP:i(1357),TIMELINE_PAUSE:i(1358),TIMELINE_RESUME:i(1359),TIMELINE_START:i(1360),TIMELINE_UPDATE:i(1361),TWEEN_ACTIVE:i(1362),TWEEN_COMPLETE:i(1363),TWEEN_LOOP:i(1364),TWEEN_REPEAT:i(1365),TWEEN_START:i(1366),TWEEN_UPDATE:i(1367),TWEEN_YOYO:i(1368)}},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(66),r=i(2),o=i(238),a=i(339),h=i(340),l=i(29),u=i(9),c=i(147),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){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={AlignTo:i(526),Angle:i(527),Call:i(528),GetFirst:i(529),GetLast:i(530),GridAlign:i(531),IncAlpha:i(592),IncX:i(593),IncXY:i(594),IncY:i(595),PlaceOnCircle:i(596),PlaceOnEllipse:i(597),PlaceOnLine:i(598),PlaceOnRectangle:i(599),PlaceOnTriangle:i(600),PlayAnimation:i(601),PropertyValueInc:i(34),PropertyValueSet:i(25),RandomCircle:i(602),RandomEllipse:i(603),RandomLine:i(604),RandomRectangle:i(605),RandomTriangle:i(606),Rotate:i(607),RotateAround:i(608),RotateAroundDistance:i(609),ScaleX:i(610),ScaleXY:i(611),ScaleY:i(612),SetAlpha:i(613),SetBlendMode:i(614),SetDepth:i(615),SetHitArea:i(616),SetOrigin:i(617),SetRotation:i(618),SetScale:i(619),SetScaleX:i(620),SetScaleY:i(621),SetScrollFactor:i(622),SetScrollFactorX:i(623),SetScrollFactorY:i(624),SetTint:i(625),SetVisible:i(626),SetX:i(627),SetXY:i(628),SetY:i(629),ShiftPosition:i(630),Shuffle:i(631),SmootherStep:i(632),SmoothStep:i(633),Spread:i(634),ToggleVisible:i(635),WrapInRectangle:i(636)}},function(t,e,i){var n=i(105),s=[];s[n.BOTTOM_CENTER]=i(243),s[n.BOTTOM_LEFT]=i(244),s[n.BOTTOM_RIGHT]=i(245),s[n.LEFT_BOTTOM]=i(246),s[n.LEFT_CENTER]=i(247),s[n.LEFT_TOP]=i(248),s[n.RIGHT_BOTTOM]=i(249),s[n.RIGHT_CENTER]=i(250),s[n.RIGHT_TOP]=i(251),s[n.TOP_CENTER]=i(252),s[n.TOP_LEFT]=i(253),s[n.TOP_RIGHT]=i(254);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(39),s=i(76),r=i(77),o=i(40);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(39),s=i(41),r=i(42),o=i(40);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(39),s=i(43),r=i(44),o=i(40);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(39),s=i(41),r=i(45),o=i(44);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(41),r=i(79),o=i(44);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(41),s=i(46),r=i(44),o=i(40);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(39),s=i(43),r=i(45),o=i(42);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(43),r=i(79),o=i(42);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(46),r=i(42),o=i(40);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(76),s=i(46),r=i(45),o=i(77);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(41),s=i(46),r=i(45),o=i(42);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(43),s=i(46),r=i(45),o=i(44);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(105),s=[];s[n.BOTTOM_CENTER]=i(256),s[n.BOTTOM_LEFT]=i(257),s[n.BOTTOM_RIGHT]=i(258),s[n.CENTER]=i(259),s[n.LEFT_CENTER]=i(261),s[n.RIGHT_CENTER]=i(262),s[n.TOP_CENTER]=i(263),s[n.TOP_LEFT]=i(264),s[n.TOP_RIGHT]=i(265),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(39),s=i(76),r=i(45),o=i(77);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(39),s=i(41),r=i(45),o=i(42);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(39),s=i(43),r=i(45),o=i(44);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(260),s=i(76),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(77),s=i(79);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(78),s=i(41),r=i(79),o=i(42);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(43),r=i(79),o=i(44);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(76),s=i(46),r=i(77),o=i(40);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(41),s=i(46),r=i(42),o=i(40);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(43),s=i(46),r=i(44),o=i(40);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(149),s=i(87),r=i(15),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(268),s=i(149),r=i(87),o=i(15);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(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(152),s=i(112);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(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.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),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(31);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(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(31);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(663),Flash:i(664),Pan:i(665),Shake:i(698),RotateTo:i(699),Zoom:i(700)}},function(t,e,i){t.exports={In:i(666),Out:i(667),InOut:i(668)}},function(t,e,i){t.exports={In:i(669),Out:i(670),InOut:i(671)}},function(t,e,i){t.exports={In:i(672),Out:i(673),InOut:i(674)}},function(t,e,i){t.exports={In:i(675),Out:i(676),InOut: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=i(684)},function(t,e,i){t.exports={In:i(685),Out:i(686),InOut:i(687)}},function(t,e,i){t.exports={In:i(688),Out:i(689),InOut:i(690)}},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=i(697)},function(t,e,i){var n=i(0),s=i(33),r=i(315),o=i(2),a=i(6),h=i(7),l=i(170),u=i(1),c=i(175),d=i(164),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.loaderWithCredentials=a(t,"loader.withCredentials",!1),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(117),browser:i(118),features:i(169),input:i(729),audio:i(730),video:i(731),fullscreen:i(732),canvasFeatures:i(316)}},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){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},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(174),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(26),r=i(33),o=i(169);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(504),h=i(507),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){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){var n=i(33);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(343),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(20);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(346),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(117);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(177);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(179),r=i(10),o=i(54),a=i(20),h=i(365),l=i(366),u=i(367),c=i(368),d=i(29),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(169),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(53),o=i(106),a=i(327),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.call(screen,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.setAspectRatio(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(19),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(125),r=i(22),o=i(20),a=i(6),h=i(82),l=i(1),u=i(373),c=i(180),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;i.sceneUpdate=l,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=o(this.currentConfig.volume*this.manager.volume,0,1))},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=a},function(t,e,i){var n=i(127),s=i(0),r=i(10),o=i(385),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(128),s=i(0),r=i(10),o=i(18),a=function(){return!1},h=function(){return this},l=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:a,updateMarker:a,removeMarker:function(){return null},play:a,pause:a,resume:a,stop:a,destroy:function(){n.prototype.destroy.call(this)},setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h});t.exports=l},function(t,e,i){var n=i(387),s=i(127),r=i(0),o=i(59),a=i(388),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(128),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(955),o=i(13),a=i(7),h=i(178),l=i(22),u=i(333),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;e0&&(e=n(t)/i);for(var h=0;h>>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(404),a=i(405),h=i(972),l=i(2),u=i(185),c=i(406),d=i(108),f=i(402),p=i(407),g=i(11),v=i(131),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(1001),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;s0&&(e=h/i);for(var l=0;lc+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(1022),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(1025),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&&i>0&&(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(47),s=i(18),r={Circle:i(1088),Ellipse:i(1098),Intersects:i(430),Line:i(1117),Point:i(1139),Polygon:i(1153),Rectangle:i(443),Triangle:i(1184)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(205),CircleToRectangle:i(206),GetCircleToCircle:i(1108),GetCircleToRectangle:i(1109),GetLineToCircle:i(207),GetLineToRectangle:i(209),GetRectangleIntersection:i(1110),GetRectangleToRectangle:i(1111),GetRectangleToTriangle:i(1112),GetTriangleToCircle:i(1113),GetTriangleToLine:i(435),GetTriangleToTriangle:i(1114),LineToCircle:i(208),LineToLine:i(84),LineToRectangle:i(431),PointToLine:i(439),PointToLineSegment:i(1115),RectangleToRectangle:i(135),RectangleToTriangle:i(432),RectangleToValues:i(1116),TriangleToCircle:i(434),TriangleToLine:i(436),TriangleToTriangle:i(437)}},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(48),r=i(210),o=i(433);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(208),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(15),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(1158),n.Ceil=i(1159),n.CeilAll=i(1160),n.CenterOn=i(168),n.Clone=i(1161),n.Contains=i(48),n.ContainsPoint=i(1162),n.ContainsRect=i(444),n.CopyFrom=i(1163),n.Decompose=i(433),n.Equals=i(1164),n.FitInside=i(1165),n.FitOutside=i(1166),n.Floor=i(1167),n.FloorAll=i(1168),n.FromPoints=i(176),n.FromXY=i(1169),n.GetAspectRatio=i(212),n.GetCenter=i(1170),n.GetPoint=i(152),n.GetPoints=i(274),n.GetSize=i(1171),n.Inflate=i(1172),n.Intersection=i(1173),n.MarchingAnts=i(285),n.MergePoints=i(1174),n.MergeRect=i(1175),n.MergeXY=i(1176),n.Offset=i(1177),n.OffsetPoint=i(1178),n.Overlaps=i(1179),n.Perimeter=i(112),n.PerimeterPoint=i(1180),n.Random=i(155),n.RandomOutside=i(1181),n.SameDimensions=i(1182),n.Scale=i(1183),n.Union=i(393),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(449),s=i(450),r=i(0),o=i(10),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(this.fixedStep||(s=.001*e,a=!0,this._elapsed=0),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&&!u.checkCollision.none)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.width-t)/2,r=(n.height-e)/2;this.offset.set(s,r)}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(390);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(48),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight: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(this.position.x+this.halfWidth,this.position.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(101),r=i(220);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(32),s=i(223),r=i(478),o=i(479),a=i(490);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(32),s=i(223);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(32),s=i(103),r=i(480),o=i(482),a=i(483),h=i(486),l=i(488),u=i(489);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(481),s=i(2),r=i(102),o=i(224),a=i(74),h=i(225);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(225);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(104),s=i(484),r=i(226);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(102),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(104);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(20),o=i(13),a=i(1346),h=i(141),l=i(29),u=i(9),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(1355);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(230),s=i(14),r=i(88),o=i(69),a=i(145),h=i(6),l=i(229),u=i(231),c=i(233);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(),e._originComponent&&(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(505),s=i(36),r=i(0),o=i(33),a=i(506),h=i(92),l=i(29),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(31),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(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(91),s=i(36),r=i(0),o=i(33),a=i(20),h=i(120),l=i(1),u=i(92),c=i(80),d=i(121),f=i(29),p=i(9),g=i(508),v=i(509),m=i(510),y=i(237),x=i(511),T=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){this.setPipeline(this.pipelines.TextureTintPipeline);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){if(e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),t.renderToGame){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,i){var n=i(0),s=i(2),r=i(238),o=i(339),a=i(340),h=i(29),l=i(147),u=new n({Extends:l,Mixins:[r],initialize:function(t){var e=t.renderer.config;l.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.renderer.gl.TRIANGLE_STRIP,vertShader:s(t,"vertShader",a),fragShader:s(t,"fragShader",o),vertexCapacity:s(t,"vertexCapacity",6*e.batchSize),vertexSize:s(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 h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.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}});t.exports=u},,,,,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(518),i(519),i(520),i(521),i(522),i(523),i(524),i(525)},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(293),BaseCamera:i(91),CameraManager:i(701),Effects:i(301),Events:i(36)}},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="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},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(19),s=i(0),r=i(36),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(19),s=i(0),r=i(36),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._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(f=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>f&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?s.rotation+o*r:s.rotation-o*r,s.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,u)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},function(t,e,i){var n=i(19),s=i(0),r=i(115),o=i(36),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===n&&(n=!1),void 0===s&&(s=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning?h:(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t),h)},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),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(118),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(119);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(119);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(318);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(15);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(160);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(328),IsSize:i(120),IsValue:i(758)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(329),Floor:i(93),To:i(760)}},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(174),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,i){t.exports={GenerateTexture:i(345),Palettes:i(789)}},function(t,e,i){t.exports={ARNE16:i(346),C64:i(790),CGA:i(791),JMP:i(792),MSX:i(793)}},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(795),CubicBezier:i(347),Curve:i(81),Ellipse:i(348),Line:i(349),QuadraticBezier:i(350),Spline:i(351)}},function(t,e,i){var n=i(0),s=i(347),r=i(348),o=i(5),a=i(349),h=i(796),l=i(350),u=i(11),c=i(351),d=i(3),f=i(15),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)},getTangent: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.getTangentAt(h,e)}s++}return null},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(31),s=i(355);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(166);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(116),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(172),s=i(31);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(354);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(122),DOMContentLoaded:i(356),GetScreenOrientation:i(357),GetTarget:i(362),ParseXML:i(363),RemoveFromDOM:i(178),RequestAnimationFrame:i(343)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(818)}},function(t,e,i){var n=i(0),s=i(10),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(122),s=i(289),r=i(292),o=i(26),a=i(0),h=i(314),l=i(820),u=i(337),c=i(113),d=i(341),f=i(315),p=i(356),g=i(10),v=i(20),m=i(364),y=i(23),x=i(369),T=i(370),w=i(372),E=i(121),_=i(375),b=i(342),A=i(344),S=i(379),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(122);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(181);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,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(953),s=i(954),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,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(966),s=i(967),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(969),s=i(970),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(401),Particle:i(402),ParticleEmitter:i(403),ParticleEmitterManager:i(194),Zones:i(976)}},function(t,e,i){var n=i(0),s=i(119),r=i(69),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(974),s=i(975),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(9);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(988),s=i(989),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(9);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(14),r=i(6),o=i(991),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(1099),n.Circumference=i(399),n.CircumferencePoint=i(193),n.Clone=i(1100),n.Contains=i(96),n.ContainsPoint=i(1101),n.ContainsRect=i(1102),n.CopyFrom=i(1103),n.Equals=i(1104),n.GetBounds=i(1105),n.GetPoint=i(397),n.GetPoints=i(398),n.Offset=i(1106),n.OffsetPoint=i(1107),n.Random=i(157),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(205);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(207),s=i(206);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(135);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(209),s=i(135);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(432),s=i(209);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(207),s=i(434);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(437),s=i(435);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(439);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||s0){var m=u[0],y=[m];for(h=1;h=o&&(y.push(x),m=x)}var T=u[u.length-1];return n(m,T)i&&(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(11);t.exports=function(t,e,i,s,r){return void 0===r&&(r=new n),r.setTo(Math.min(t,i),Math.min(e,s),Math.abs(t-i),Math.abs(e-s))}},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(168);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(135);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(137),KeyboardManager:i(365),KeyboardPlugin:i(1222),Key:i(452),KeyCodes:i(124),KeyCombo:i(453),JustDown:i(1227),JustUp:i(1228),DownDuration:i(1229),UpDuration:i(1230)}},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(10),r=i(137),o=i(20),a=i(6),h=i(54),l=i(136),u=i(452),c=i(124),d=i(453),f=i(1226),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(124),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(463),s=i(65),r=i(205),o=i(206);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(1287);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(467);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(468);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(473),DefaultPlugins:i(175),PluginCache:i(23),PluginManager:i(369),ScenePlugin:i(1303)}},function(t,e,i){var n=i(473),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(18),s=i(177),r={Center:i(358),Events:i(92),Orientation:i(359),ScaleManager:i(370),ScaleModes:i(360),Zoom:i(361)};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(125),s=i(18),r={Events:i(22),SceneManager:i(372),ScenePlugin:i(1306),Settings:i(374),Systems:i(180)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(19),s=i(0),r=i(22),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(o(t,"data")):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(129),Map:i(162),ProcessQueue:i(186),RTree:i(469),Set:i(133),Size:i(371)}},function(t,e,i){var n=i(18),s=i(1309),r={CanvasTexture:i(376),Events:i(121),FilterMode:s,Frame:i(94),Parsers:i(378),Texture:i(182),TextureManager:i(375),TextureSource:i(377)};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(141),Parsers:i(1340),Formats:i(32),ImageCollection:i(484),ParseToTilemap:i(227),Tile:i(74),Tilemap:i(493),TilemapCreator:i(1349),TilemapFactory:i(1350),Tileset:i(104),LayerData:i(102),MapData:i(103),ObjectLayer:i(487),DynamicTilemapLayer:i(494),StaticTilemapLayer:i(495)}},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(222);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(18),GetAdvancedValue:i(14),GetFastValue:i(2),GetMinMaxValue:i(1374),GetValue:i(6),HasAll:i(1375),HasAny:i(406),HasValue:i(108),IsPlainObject:i(7),Merge:i(126),MergeRight:i(1376),Pick:i(485),SetValue:i(426)}},function(t,e,i){var n=i(6),s=i(19);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 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * 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 Phaser.Utils.NOOP + * @since 3.0.0 + */ +var NOOP = function () +{ + // NOOP +}; + +module.exports = NOOP; + + +/***/ }), +/* 2 */ +/***/ (function(module, exports) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -391,33 +418,6 @@ var GetFastValue = function (source, key, defaultValue) module.exports = GetFastValue; -/***/ }), -/* 2 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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 Phaser.Utils.NOOP - * @since 3.0.0 - */ -var NOOP = function () -{ - // NOOP -}; - -module.exports = NOOP; - - /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { @@ -432,6 +432,7 @@ module.exports = NOOP; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); +var FuzzyEqual = __webpack_require__(96); /** * @classdesc @@ -611,6 +612,22 @@ var Vector2 = new Class({ return ((this.x === v.x) && (this.y === v.y)); }, + /** + * Check whether this Vector is approximately equal to a given Vector. + * + * @method Phaser.Math.Vector2#fuzzyEquals + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} v - The vector to compare with this Vector. + * @param {number} [epsilon=0.0001] - The tolerance value. + * + * @return {boolean} Whether both absolute differences of the x and y components are smaller than `epsilon`. + */ + fuzzyEquals: function (v, epsilon) + { + return (FuzzyEqual(this.x, v.x, epsilon) && FuzzyEqual(this.y, v.y, epsilon)); + }, + /** * Calculate the angle between this Vector and the positive x-axis, in radians. * @@ -633,6 +650,21 @@ var Vector2 = new Class({ return angle; }, + /** + * Set the angle of this Vector. + * + * @method Phaser.Math.Vector2#setAngle + * @since 3.23.0 + * + * @param {number} angle - The angle, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setAngle: function (angle) + { + return this.setToPolar(angle, this.length()); + }, + /** * Add a given Vector to this Vector. Addition is component-wise. * @@ -803,6 +835,21 @@ var Vector2 = new Class({ return Math.sqrt(x * x + y * y); }, + /** + * Set the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#setLength + * @since 3.23.0 + * + * @param {number} length + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + setLength: function (length) + { + return this.normalize().scale(length); + }, + /** * Calculate the length of this Vector squared. * @@ -847,7 +894,7 @@ var Vector2 = new Class({ }, /** - * Right-hand normalize (make unit length) this Vector. + * Rotate this Vector to its perpendicular, in the positive direction. * * @method Phaser.Math.Vector2#normalizeRightHand * @since 3.0.0 @@ -864,6 +911,24 @@ var Vector2 = new Class({ return this; }, + /** + * Rotate this Vector to its perpendicular, in the negative direction. + * + * @method Phaser.Math.Vector2#normalizeLeftHand + * @since 3.23.0 + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + normalizeLeftHand: function () + { + var x = this.x; + + this.x = this.y; + this.y = x * -1; + + return this; + }, + /** * Calculate the dot product of this Vector and the given Vector. * @@ -978,13 +1043,85 @@ var Vector2 = new Class({ this.y = 0; return this; + }, + + /** + * Limit the length (or magnitude) of this Vector. + * + * @method Phaser.Math.Vector2#limit + * @since 3.23.0 + * + * @param {number} max - The maximum length. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + limit: function (max) + { + var len = this.length(); + + if (len && len > max) + { + this.scale(max / len); + } + + return this; + }, + + /** + * Reflect this Vector off a line defined by a normal. + * + * @method Phaser.Math.Vector2#reflect + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reflect: function (normal) + { + normal = normal.clone().normalize(); + + return this.subtract(normal.scale(2 * this.dot(normal))); + }, + + /** + * Reflect this Vector across another. + * + * @method Phaser.Math.Vector2#mirror + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} axis - A vector to reflect across. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + mirror: function (axis) + { + return this.reflect(axis).negate(); + }, + + /** + * Rotate this Vector by an angle amount. + * + * @method Phaser.Math.Vector2#rotate + * @since 3.23.0 + * + * @param {number} delta - The angle to rotate by, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + rotate: function (delta) + { + var cos = Math.cos(delta); + var sin = Math.sin(delta); + + return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); } }); /** * A static zero Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -996,7 +1133,7 @@ Vector2.ZERO = new Vector2(); /** * A static right Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1008,7 +1145,7 @@ Vector2.RIGHT = new Vector2(1, 0); /** * A static left Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1020,7 +1157,7 @@ Vector2.LEFT = new Vector2(-1, 0); /** * A static up Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1032,7 +1169,7 @@ Vector2.UP = new Vector2(0, -1); /** * A static down Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1044,7 +1181,7 @@ Vector2.DOWN = new Vector2(0, 1); /** * A static one Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1068,7 +1205,7 @@ module.exports = Vector2; */ var Class = __webpack_require__(0); -var GEOM_CONST = __webpack_require__(52); +var GEOM_CONST = __webpack_require__(53); /** * @classdesc @@ -1132,7 +1269,7 @@ var Point = new Class({ * @param {number} [x=0] - The x coordinate of this Point. * @param {number} [y=x] - The y coordinate of this Point. * - * @return {Phaser.Geom.Point} This Point object. + * @return {this} This Point object. */ setTo: function (x, y) { @@ -1232,8 +1369,8 @@ module.exports = GetValue; */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -1935,7 +2072,7 @@ module.exports = { * @param {number} b - Blue component in a range from 0.0 to 1.0 * @param {number} a - Alpha component in a range from 0.0 to 1.0 * - * @return {number} [description] + * @return {number} The packed RGBA values as a Uint32. */ getTintFromFloats: function (r, g, b, a) { @@ -2053,12 +2190,12 @@ module.exports = { */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(53); -var GetPoint = __webpack_require__(161); -var GetPoints = __webpack_require__(293); -var GEOM_CONST = __webpack_require__(52); +var Contains = __webpack_require__(54); +var GetPoint = __webpack_require__(162); +var GetPoints = __webpack_require__(292); +var GEOM_CONST = __webpack_require__(53); var Line = __webpack_require__(61); -var Random = __webpack_require__(164); +var Random = __webpack_require__(165); /** * @classdesc @@ -2222,7 +2359,7 @@ var Rectangle = new Class({ * @param {number} width - The width of the Rectangle. * @param {number} height - The height of the Rectangle. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setTo: function (x, y, width, height) { @@ -2240,7 +2377,7 @@ var Rectangle = new Class({ * @method Phaser.Geom.Rectangle#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setEmpty: function () { @@ -2256,7 +2393,7 @@ var Rectangle = new Class({ * @param {number} x - The X coordinate of the top left corner of the Rectangle. * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setPosition: function (x, y) { @@ -2277,7 +2414,7 @@ var Rectangle = new Class({ * @param {number} width - The width to set the Rectangle to. * @param {number} [height=width] - The height to set the Rectangle to. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setSize: function (width, height) { @@ -2569,126 +2706,34 @@ module.exports = Rectangle; module.exports = { - 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__(302) + Alpha: __webpack_require__(555), + AlphaSingle: __webpack_require__(286), + Animation: __webpack_require__(287), + BlendMode: __webpack_require__(290), + ComputedSize: __webpack_require__(574), + Crop: __webpack_require__(575), + Depth: __webpack_require__(291), + Flip: __webpack_require__(576), + GetBounds: __webpack_require__(577), + Mask: __webpack_require__(295), + Origin: __webpack_require__(594), + PathFollower: __webpack_require__(595), + Pipeline: __webpack_require__(120), + ScrollFactor: __webpack_require__(298), + Size: __webpack_require__(596), + Texture: __webpack_require__(597), + TextureCrop: __webpack_require__(598), + Tint: __webpack_require__(599), + ToJSON: __webpack_require__(299), + Transform: __webpack_require__(300), + TransformMatrix: __webpack_require__(32), + Visible: __webpack_require__(301) }; /***/ }), /* 13 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = { - - /** - * The value of PI * 2. - * - * @name Phaser.Math.PI2 - * @type {number} - * @since 3.0.0 - */ - PI2: Math.PI * 2, - - /** - * The value of PI * 0.5. - * - * @name Phaser.Math.TAU - * @type {number} - * @since 3.0.0 - */ - TAU: Math.PI * 0.5, - - /** - * An epsilon value (1.0e-6) - * - * @name Phaser.Math.EPSILON - * @type {number} - * @since 3.0.0 - */ - EPSILON: 1.0e-6, - - /** - * For converting degrees to radians (PI / 180) - * - * @name Phaser.Math.DEG_TO_RAD - * @type {number} - * @since 3.0.0 - */ - DEG_TO_RAD: Math.PI / 180, - - /** - * For converting radians to degrees (180 / PI) - * - * @name Phaser.Math.RAD_TO_DEG - * @type {number} - * @since 3.0.0 - */ - RAD_TO_DEG: 180 / Math.PI, - - /** - * An instance of the Random Number Generator. - * This is not set until the Game boots. - * - * @name Phaser.Math.RND - * @type {Phaser.Math.RandomDataGenerator} - * @since 3.0.0 - */ - RND: null, - - /** - * The minimum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MIN_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, - - /** - * The maximum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MAX_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 - -}; - -module.exports = MATH_CONST; - - -/***/ }), -/* 14 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2698,10 +2743,10 @@ module.exports = MATH_CONST; */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(300); -var DataManager = __webpack_require__(101); +var ComponentsToJSON = __webpack_require__(299); +var DataManager = __webpack_require__(99); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(102); +var Events = __webpack_require__(100); /** * @classdesc @@ -2859,10 +2904,10 @@ var GameObject = new Class({ this.input = null; /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. * * @name Phaser.GameObjects.GameObject#body - * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)} + * @type {?(object|Phaser.Physics.Arcade.Body|MatterJS.BodyType)} * @default null * @since 3.0.0 */ @@ -3023,6 +3068,65 @@ var GameObject = new Class({ return this; }, + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * 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. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * 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. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + /** * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. * @@ -3328,6 +3432,98 @@ GameObject.RENDER_MASK = 15; module.exports = GameObject; +/***/ }), +/* 14 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = { + + /** + * The value of PI * 2. + * + * @name Phaser.Math.PI2 + * @type {number} + * @since 3.0.0 + */ + PI2: Math.PI * 2, + + /** + * The value of PI * 0.5. + * + * @name Phaser.Math.TAU + * @type {number} + * @since 3.0.0 + */ + TAU: Math.PI * 0.5, + + /** + * An epsilon value (1.0e-6) + * + * @name Phaser.Math.EPSILON + * @type {number} + * @since 3.0.0 + */ + EPSILON: 1.0e-6, + + /** + * For converting degrees to radians (PI / 180) + * + * @name Phaser.Math.DEG_TO_RAD + * @type {number} + * @since 3.0.0 + */ + DEG_TO_RAD: Math.PI / 180, + + /** + * For converting radians to degrees (180 / PI) + * + * @name Phaser.Math.RAD_TO_DEG + * @type {number} + * @since 3.0.0 + */ + RAD_TO_DEG: 180 / Math.PI, + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + * + * @name Phaser.Math.RND + * @type {Phaser.Math.RandomDataGenerator} + * @since 3.0.0 + */ + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 + +}; + +module.exports = MATH_CONST; + + /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { @@ -3426,8 +3622,8 @@ module.exports = GetAdvancedValue; */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -3585,6 +3781,158 @@ module.exports = GameObjectCreator; /***/ }), /* 17 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FILE_CONST = { + + /** + * The Loader is idle. + * + * @name Phaser.Loader.LOADER_IDLE + * @type {integer} + * @since 3.0.0 + */ + LOADER_IDLE: 0, + + /** + * The Loader is actively loading. + * + * @name Phaser.Loader.LOADER_LOADING + * @type {integer} + * @since 3.0.0 + */ + LOADER_LOADING: 1, + + /** + * The Loader is processing files is has loaded. + * + * @name Phaser.Loader.LOADER_PROCESSING + * @type {integer} + * @since 3.0.0 + */ + LOADER_PROCESSING: 2, + + /** + * The Loader has completed loading and processing. + * + * @name Phaser.Loader.LOADER_COMPLETE + * @type {integer} + * @since 3.0.0 + */ + LOADER_COMPLETE: 3, + + /** + * The Loader is shutting down. + * + * @name Phaser.Loader.LOADER_SHUTDOWN + * @type {integer} + * @since 3.0.0 + */ + LOADER_SHUTDOWN: 4, + + /** + * The Loader has been destroyed. + * + * @name Phaser.Loader.LOADER_DESTROYED + * @type {integer} + * @since 3.0.0 + */ + LOADER_DESTROYED: 5, + + /** + * File is in the load queue but not yet started + * + * @name Phaser.Loader.FILE_PENDING + * @type {integer} + * @since 3.0.0 + */ + FILE_PENDING: 10, + + /** + * File has been started to load by the loader (onLoad called) + * + * @name Phaser.Loader.FILE_LOADING + * @type {integer} + * @since 3.0.0 + */ + FILE_LOADING: 11, + + /** + * File has loaded successfully, awaiting processing + * + * @name Phaser.Loader.FILE_LOADED + * @type {integer} + * @since 3.0.0 + */ + FILE_LOADED: 12, + + /** + * File failed to load + * + * @name Phaser.Loader.FILE_FAILED + * @type {integer} + * @since 3.0.0 + */ + FILE_FAILED: 13, + + /** + * File is being processed (onProcess callback) + * + * @name Phaser.Loader.FILE_PROCESSING + * @type {integer} + * @since 3.0.0 + */ + FILE_PROCESSING: 14, + + /** + * The File has errored somehow during processing. + * + * @name Phaser.Loader.FILE_ERRORED + * @type {integer} + * @since 3.0.0 + */ + FILE_ERRORED: 16, + + /** + * File has finished processing. + * + * @name Phaser.Loader.FILE_COMPLETE + * @type {integer} + * @since 3.0.0 + */ + FILE_COMPLETE: 17, + + /** + * File has been destroyed + * + * @name Phaser.Loader.FILE_DESTROYED + * @type {integer} + * @since 3.0.0 + */ + FILE_DESTROYED: 18, + + /** + * File was populated from local data and doesn't need an HTTP request + * + * @name Phaser.Loader.FILE_POPULATED + * @type {integer} + * @since 3.0.0 + */ + FILE_POPULATED: 19 + +}; + +module.exports = FILE_CONST; + + +/***/ }), +/* 18 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3605,6 +3953,8 @@ var IsPlainObject = __webpack_require__(7); * @function Phaser.Utils.Objects.Extend * @since 3.0.0 * + * @param {...*} [args] - The objects that will be mixed. + * * @return {object} The extended object. */ var Extend = function () @@ -3683,8 +4033,8 @@ module.exports = Extend; /***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { +/* 19 */ +/***/ (function(module, exports) { /** * @author Richard Davey @@ -3693,36 +4043,27 @@ module.exports = Extend; */ /** - * @namespace Phaser.Scenes.Events + * 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. */ - -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) - +var Clamp = function (value, min, max) +{ + return Math.max(min, Math.min(max, value)); }; +module.exports = Clamp; + /***/ }), -/* 19 */ +/* 20 */ /***/ (function(module, exports) { /** @@ -3948,7 +4289,7 @@ module.exports = Common; * @return {boolean} True if the object is a string, otherwise false */ Common.isString = function(obj) { - return toString.call(obj) === '[object String]'; + return Object.prototype.toString.call(obj) === '[object String]'; }; /** @@ -4265,36 +4606,6 @@ module.exports = Common; })(); -/***/ }), -/* 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__) { @@ -4311,29 +4622,29 @@ module.exports = Clamp; module.exports = { - 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) + BLUR: __webpack_require__(578), + BOOT: __webpack_require__(579), + CONTEXT_LOST: __webpack_require__(580), + CONTEXT_RESTORED: __webpack_require__(581), + DESTROY: __webpack_require__(582), + FOCUS: __webpack_require__(583), + HIDDEN: __webpack_require__(584), + PAUSE: __webpack_require__(585), + POST_RENDER: __webpack_require__(586), + POST_STEP: __webpack_require__(587), + PRE_RENDER: __webpack_require__(588), + PRE_STEP: __webpack_require__(589), + READY: __webpack_require__(590), + RESUME: __webpack_require__(591), + STEP: __webpack_require__(592), + VISIBLE: __webpack_require__(593) }; /***/ }), /* 22 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -4341,359 +4652,37 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -// Contains the plugins that Phaser uses globally and locally. -// These are the source objects, not instantiated. -var corePlugins = {}; - -// Contains the plugins that the dev has loaded into their game -// These are the source objects, not instantiated. -var customPlugins = {}; - -var PluginCache = {}; - /** - * @namespace Phaser.Plugins.PluginCache + * @namespace Phaser.Scenes.Events */ -/** - * 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) - * - * @method Phaser.Plugins.PluginCache.register - * @since 3.8.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 Scene Systems, this is the property key map used. - * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin? - */ -PluginCache.register = function (key, plugin, mapping, custom) -{ - if (custom === undefined) { custom = false; } +module.exports = { + + BOOT: __webpack_require__(731), + CREATE: __webpack_require__(732), + DESTROY: __webpack_require__(733), + PAUSE: __webpack_require__(734), + POST_UPDATE: __webpack_require__(735), + PRE_UPDATE: __webpack_require__(736), + READY: __webpack_require__(737), + RENDER: __webpack_require__(738), + RESUME: __webpack_require__(739), + SHUTDOWN: __webpack_require__(740), + SLEEP: __webpack_require__(741), + START: __webpack_require__(742), + TRANSITION_COMPLETE: __webpack_require__(743), + TRANSITION_INIT: __webpack_require__(744), + TRANSITION_OUT: __webpack_require__(745), + TRANSITION_START: __webpack_require__(746), + TRANSITION_WAKE: __webpack_require__(747), + UPDATE: __webpack_require__(748), + WAKE: __webpack_require__(749) - corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom }; }; -/** - * Stores a custom plugin in the global plugin cache. - * The key must be unique, within the scope of the cache. - * - * @method Phaser.Plugins.PluginCache.registerCustom - * @since 3.8.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 Scene Systems, this is the property key map used. - * @param {?any} data - A value to be passed to the plugin's `init` method. - */ -PluginCache.registerCustom = function (key, plugin, mapping, data) -{ - customPlugins[key] = { plugin: plugin, mapping: mapping, data: data }; -}; - -/** - * Checks if the given key is already being used in the core plugin cache. - * - * @method Phaser.Plugins.PluginCache.hasCore - * @since 3.8.0 - * - * @param {string} key - The key to check for. - * - * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`. - */ -PluginCache.hasCore = function (key) -{ - return corePlugins.hasOwnProperty(key); -}; - -/** - * Checks if the given key is already being used in the custom plugin cache. - * - * @method Phaser.Plugins.PluginCache.hasCustom - * @since 3.8.0 - * - * @param {string} key - The key to check for. - * - * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`. - */ -PluginCache.hasCustom = function (key) -{ - return customPlugins.hasOwnProperty(key); -}; - -/** - * Returns the core plugin object from the cache based on the given key. - * - * @method Phaser.Plugins.PluginCache.getCore - * @since 3.8.0 - * - * @param {string} key - The key of the core plugin to get. - * - * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object. - */ -PluginCache.getCore = function (key) -{ - return corePlugins[key]; -}; - -/** - * Returns the custom plugin object from the cache based on the given key. - * - * @method Phaser.Plugins.PluginCache.getCustom - * @since 3.8.0 - * - * @param {string} key - The key of the custom plugin to get. - * - * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object. - */ -PluginCache.getCustom = function (key) -{ - return customPlugins[key]; -}; - -/** - * Returns an object from the custom cache based on the given key that can be instantiated. - * - * @method Phaser.Plugins.PluginCache.getCustomClass - * @since 3.8.0 - * - * @param {string} key - The key of the custom plugin to get. - * - * @return {function} The custom plugin object. - */ -PluginCache.getCustomClass = function (key) -{ - return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null; -}; - -/** - * Removes a core plugin based on the given key. - * - * @method Phaser.Plugins.PluginCache.remove - * @since 3.8.0 - * - * @param {string} key - The key of the core plugin to remove. - */ -PluginCache.remove = function (key) -{ - if (corePlugins.hasOwnProperty(key)) - { - delete corePlugins[key]; - } -}; - -/** - * Removes a custom plugin based on the given key. - * - * @method Phaser.Plugins.PluginCache.removeCustom - * @since 3.8.0 - * - * @param {string} key - The key of the custom plugin to remove. - */ -PluginCache.removeCustom = function (key) -{ - if (customPlugins.hasOwnProperty(key)) - { - delete customPlugins[key]; - } -}; - -/** - * Removes all Core Plugins. - * - * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. - * So be sure you only call this if you do not wish to run Phaser again. - * - * @method Phaser.Plugins.PluginCache.destroyCorePlugins - * @since 3.12.0 - */ -PluginCache.destroyCorePlugins = function () -{ - for (var key in corePlugins) - { - if (corePlugins.hasOwnProperty(key)) - { - delete corePlugins[key]; - } - } -}; - -/** - * Removes all Custom Plugins. - * - * @method Phaser.Plugins.PluginCache.destroyCustomPlugins - * @since 3.12.0 - */ -PluginCache.destroyCustomPlugins = function () -{ - for (var key in customPlugins) - { - if (customPlugins.hasOwnProperty(key)) - { - delete customPlugins[key]; - } - } -}; - -module.exports = PluginCache; - /***/ }), /* 23 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var FILE_CONST = { - - /** - * The Loader is idle. - * - * @name Phaser.Loader.LOADER_IDLE - * @type {integer} - * @since 3.0.0 - */ - LOADER_IDLE: 0, - - /** - * The Loader is actively loading. - * - * @name Phaser.Loader.LOADER_LOADING - * @type {integer} - * @since 3.0.0 - */ - LOADER_LOADING: 1, - - /** - * The Loader is processing files is has loaded. - * - * @name Phaser.Loader.LOADER_PROCESSING - * @type {integer} - * @since 3.0.0 - */ - LOADER_PROCESSING: 2, - - /** - * The Loader has completed loading and processing. - * - * @name Phaser.Loader.LOADER_COMPLETE - * @type {integer} - * @since 3.0.0 - */ - LOADER_COMPLETE: 3, - - /** - * The Loader is shutting down. - * - * @name Phaser.Loader.LOADER_SHUTDOWN - * @type {integer} - * @since 3.0.0 - */ - LOADER_SHUTDOWN: 4, - - /** - * The Loader has been destroyed. - * - * @name Phaser.Loader.LOADER_DESTROYED - * @type {integer} - * @since 3.0.0 - */ - LOADER_DESTROYED: 5, - - /** - * File is in the load queue but not yet started - * - * @name Phaser.Loader.FILE_PENDING - * @type {integer} - * @since 3.0.0 - */ - FILE_PENDING: 10, - - /** - * File has been started to load by the loader (onLoad called) - * - * @name Phaser.Loader.FILE_LOADING - * @type {integer} - * @since 3.0.0 - */ - FILE_LOADING: 11, - - /** - * File has loaded successfully, awaiting processing - * - * @name Phaser.Loader.FILE_LOADED - * @type {integer} - * @since 3.0.0 - */ - FILE_LOADED: 12, - - /** - * File failed to load - * - * @name Phaser.Loader.FILE_FAILED - * @type {integer} - * @since 3.0.0 - */ - FILE_FAILED: 13, - - /** - * File is being processed (onProcess callback) - * - * @name Phaser.Loader.FILE_PROCESSING - * @type {integer} - * @since 3.0.0 - */ - FILE_PROCESSING: 14, - - /** - * The File has errored somehow during processing. - * - * @name Phaser.Loader.FILE_ERRORED - * @type {integer} - * @since 3.0.0 - */ - FILE_ERRORED: 16, - - /** - * File has finished processing. - * - * @name Phaser.Loader.FILE_COMPLETE - * @type {integer} - * @since 3.0.0 - */ - FILE_COMPLETE: 17, - - /** - * File has been destroyed - * - * @name Phaser.Loader.FILE_DESTROYED - * @type {integer} - * @since 3.0.0 - */ - FILE_DESTROYED: 18, - - /** - * File was populated from local data and doesn't need an HTTP request - * - * @name Phaser.Loader.FILE_POPULATED - * @type {integer} - * @since 3.0.0 - */ - FILE_POPULATED: 19 - -}; - -module.exports = FILE_CONST; - - -/***/ }), -/* 24 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -4703,13 +4692,13 @@ module.exports = FILE_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var Events = __webpack_require__(87); -var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(143); -var MergeXHRSettings = __webpack_require__(227); -var XHRLoader = __webpack_require__(478); -var XHRSettings = __webpack_require__(144); +var CONST = __webpack_require__(17); +var Events = __webpack_require__(88); +var GetFastValue = __webpack_require__(2); +var GetURL = __webpack_require__(145); +var MergeXHRSettings = __webpack_require__(228); +var XHRLoader = __webpack_require__(481); +var XHRSettings = __webpack_require__(146); /** * @classdesc @@ -4792,7 +4781,7 @@ var File = new Class({ { this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof(this.url) !== 'function') + else if (typeof(this.url) !== 'function' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0) { this.url = loader.path + this.url; } @@ -5233,6 +5222,215 @@ File.revokeObjectURL = function (image) module.exports = File; +/***/ }), +/* 24 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +// Contains the plugins that Phaser uses globally and locally. +// These are the source objects, not instantiated. +var corePlugins = {}; + +// Contains the plugins that the dev has loaded into their game +// These are the source objects, not instantiated. +var customPlugins = {}; + +var PluginCache = {}; + +/** + * @namespace Phaser.Plugins.PluginCache + */ + +/** + * Static method called directly by the Core internal Plugins. + * Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin) + * 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) + * + * @method Phaser.Plugins.PluginCache.register + * @since 3.8.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 Scene Systems, this is the property key map used. + * @param {boolean} [custom=false] - Core Scene plugin or a Custom Scene plugin? + */ +PluginCache.register = function (key, plugin, mapping, custom) +{ + if (custom === undefined) { custom = false; } + + corePlugins[key] = { plugin: plugin, mapping: mapping, custom: custom }; +}; + +/** + * Stores a custom plugin in the global plugin cache. + * The key must be unique, within the scope of the cache. + * + * @method Phaser.Plugins.PluginCache.registerCustom + * @since 3.8.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 Scene Systems, this is the property key map used. + * @param {?any} data - A value to be passed to the plugin's `init` method. + */ +PluginCache.registerCustom = function (key, plugin, mapping, data) +{ + customPlugins[key] = { plugin: plugin, mapping: mapping, data: data }; +}; + +/** + * Checks if the given key is already being used in the core plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCore + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the core cache, otherwise `false`. + */ +PluginCache.hasCore = function (key) +{ + return corePlugins.hasOwnProperty(key); +}; + +/** + * Checks if the given key is already being used in the custom plugin cache. + * + * @method Phaser.Plugins.PluginCache.hasCustom + * @since 3.8.0 + * + * @param {string} key - The key to check for. + * + * @return {boolean} `true` if the key is already in use in the custom cache, otherwise `false`. + */ +PluginCache.hasCustom = function (key) +{ + return customPlugins.hasOwnProperty(key); +}; + +/** + * Returns the core plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCore + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to get. + * + * @return {Phaser.Types.Plugins.CorePluginContainer} The core plugin object. + */ +PluginCache.getCore = function (key) +{ + return corePlugins[key]; +}; + +/** + * Returns the custom plugin object from the cache based on the given key. + * + * @method Phaser.Plugins.PluginCache.getCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {Phaser.Types.Plugins.CustomPluginContainer} The custom plugin object. + */ +PluginCache.getCustom = function (key) +{ + return customPlugins[key]; +}; + +/** + * Returns an object from the custom cache based on the given key that can be instantiated. + * + * @method Phaser.Plugins.PluginCache.getCustomClass + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to get. + * + * @return {function} The custom plugin object. + */ +PluginCache.getCustomClass = function (key) +{ + return (customPlugins.hasOwnProperty(key)) ? customPlugins[key].plugin : null; +}; + +/** + * Removes a core plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.remove + * @since 3.8.0 + * + * @param {string} key - The key of the core plugin to remove. + */ +PluginCache.remove = function (key) +{ + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } +}; + +/** + * Removes a custom plugin based on the given key. + * + * @method Phaser.Plugins.PluginCache.removeCustom + * @since 3.8.0 + * + * @param {string} key - The key of the custom plugin to remove. + */ +PluginCache.removeCustom = function (key) +{ + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } +}; + +/** + * Removes all Core Plugins. + * + * This includes all of the internal system plugins that Phaser needs, like the Input Plugin and Loader Plugin. + * So be sure you only call this if you do not wish to run Phaser again. + * + * @method Phaser.Plugins.PluginCache.destroyCorePlugins + * @since 3.12.0 + */ +PluginCache.destroyCorePlugins = function () +{ + for (var key in corePlugins) + { + if (corePlugins.hasOwnProperty(key)) + { + delete corePlugins[key]; + } + } +}; + +/** + * Removes all Custom Plugins. + * + * @method Phaser.Plugins.PluginCache.destroyCustomPlugins + * @since 3.12.0 + */ +PluginCache.destroyCustomPlugins = function () +{ + for (var key in customPlugins) + { + if (customPlugins.hasOwnProperty(key)) + { + delete customPlugins[key]; + } + } +}; + +module.exports = PluginCache; + + /***/ }), /* 25 */ /***/ (function(module, exports, __webpack_require__) { @@ -5251,11 +5449,11 @@ var Body = {}; module.exports = Body; var Vertices = __webpack_require__(31); -var Vector = __webpack_require__(37); -var Sleeping = __webpack_require__(95); -var Common = __webpack_require__(19); -var Bounds = __webpack_require__(38); -var Axes = __webpack_require__(146); +var Vector = __webpack_require__(36); +var Sleeping = __webpack_require__(92); +var Common = __webpack_require__(20); +var Bounds = __webpack_require__(37); +var Axes = __webpack_require__(148); (function() { @@ -6625,7 +6823,7 @@ var Axes = __webpack_require__(146); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Gets the tiles in the given rectangular area (in tile coordinates) of the layer. @@ -6776,8 +6974,8 @@ module.exports = PropertyValueSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(32); -var Smoothing = __webpack_require__(177); +var CONST = __webpack_require__(38); +var Smoothing = __webpack_require__(178); // The pool into which the canvas elements are placed. var pool = []; @@ -7029,94 +7227,6 @@ module.exports = CanvasPool(); /***/ }), /* 29 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix - * and then performs the following steps: - * - * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts. - * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given. - * 3. Sets the blend mode of the context to be that used by the Game Object. - * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera. - * 5. Saves the context state. - * 6. Sets the final matrix values into the context via setTransform. - * 7. If Renderer.antialias, or the frame.source.scaleMode is set, then imageSmoothingEnabled is set. - * - * This function is only meant to be used internally. Most of the Canvas Renderer classes use it. - * - * @function Phaser.Renderer.Canvas.SetTransform - * @since 3.12.0 - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on. - * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering. - * - * @return {boolean} `true` if the Game Object context was set, otherwise `false`. - */ -var SetTransform = function (renderer, ctx, src, camera, parentMatrix) -{ - var alpha = camera.alpha * src.alpha; - - if (alpha <= 0) - { - // Nothing to see, so don't waste time calculating stuff - return false; - } - - var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix); - var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - var calcMatrix = renderer._tempMatrix3; - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - gameObjectMatrix.e = src.x; - gameObjectMatrix.f = src.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(gameObjectMatrix, calcMatrix); - } - else - { - gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX; - gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(gameObjectMatrix, calcMatrix); - } - - // Blend Mode - ctx.globalCompositeOperation = renderer.blendModes[src.blendMode]; - - // Alpha - ctx.globalAlpha = alpha; - - ctx.save(); - - calcMatrix.setToContext(ctx); - - ctx.imageSmoothingEnabled = !(!renderer.antialias || (src.frame && src.frame.source.scaleMode)); - - return true; -}; - -module.exports = SetTransform; - - -/***/ }), -/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -7125,7 +7235,7 @@ module.exports = SetTransform; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(43); +var BlendModes = __webpack_require__(44); var GetAdvancedValue = __webpack_require__(15); /** @@ -7243,6 +7353,94 @@ var BuildGameObject = function (scene, gameObject, config) module.exports = BuildGameObject; +/***/ }), +/* 30 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix + * and then performs the following steps: + * + * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts. + * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given. + * 3. Sets the blend mode of the context to be that used by the Game Object. + * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera. + * 5. Saves the context state. + * 6. Sets the final matrix values into the context via setTransform. + * 7. If Renderer.antialias, or the frame.source.scaleMode is set, then imageSmoothingEnabled is set. + * + * This function is only meant to be used internally. Most of the Canvas Renderer classes use it. + * + * @function Phaser.Renderer.Canvas.SetTransform + * @since 3.12.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on. + * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering. + * + * @return {boolean} `true` if the Game Object context was set, otherwise `false`. + */ +var SetTransform = function (renderer, ctx, src, camera, parentMatrix) +{ + var alpha = camera.alpha * src.alpha; + + if (alpha <= 0) + { + // Nothing to see, so don't waste time calculating stuff + return false; + } + + var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix); + var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + var calcMatrix = renderer._tempMatrix3; + + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); + + // Undo the camera scroll + gameObjectMatrix.e = src.x; + gameObjectMatrix.f = src.y; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(gameObjectMatrix, calcMatrix); + } + else + { + gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX; + gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY; + + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(gameObjectMatrix, calcMatrix); + } + + // Blend Mode + ctx.globalCompositeOperation = renderer.blendModes[src.blendMode]; + + // Alpha + ctx.globalAlpha = alpha; + + ctx.save(); + + calcMatrix.setToContext(ctx); + + ctx.imageSmoothingEnabled = !(!renderer.antialias || (src.frame && src.frame.source.scaleMode)); + + return true; +}; + +module.exports = SetTransform; + + /***/ }), /* 31 */ /***/ (function(module, exports, __webpack_require__) { @@ -7261,8 +7459,8 @@ var Vertices = {}; module.exports = Vertices; -var Vector = __webpack_require__(37); -var Common = __webpack_require__(19); +var Vector = __webpack_require__(36); +var Common = __webpack_require__(20); (function() { @@ -7708,144 +7906,6 @@ var Common = __webpack_require__(19); /* 32 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Global constants. - * - * @ignore - */ - -var CONST = { - - /** - * Phaser Release Version - * - * @name Phaser.VERSION - * @const - * @type {string} - * @since 3.0.0 - */ - VERSION: '3.22.0', - - BlendModes: __webpack_require__(43), - - ScaleModes: __webpack_require__(157), - - /** - * AUTO Detect Renderer. - * - * @name Phaser.AUTO - * @const - * @type {integer} - * @since 3.0.0 - */ - AUTO: 0, - - /** - * Canvas Renderer. - * - * @name Phaser.CANVAS - * @const - * @type {integer} - * @since 3.0.0 - */ - CANVAS: 1, - - /** - * WebGL Renderer. - * - * @name Phaser.WEBGL - * @const - * @type {integer} - * @since 3.0.0 - */ - WEBGL: 2, - - /** - * Headless Renderer. - * - * @name Phaser.HEADLESS - * @const - * @type {integer} - * @since 3.0.0 - */ - HEADLESS: 3, - - /** - * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead - * to help you remember what the value is doing in your code. - * - * @name Phaser.FOREVER - * @const - * @type {integer} - * @since 3.0.0 - */ - FOREVER: -1, - - /** - * Direction constant. - * - * @name Phaser.NONE - * @const - * @type {integer} - * @since 3.0.0 - */ - NONE: 4, - - /** - * Direction constant. - * - * @name Phaser.UP - * @const - * @type {integer} - * @since 3.0.0 - */ - UP: 5, - - /** - * Direction constant. - * - * @name Phaser.DOWN - * @const - * @type {integer} - * @since 3.0.0 - */ - DOWN: 6, - - /** - * Direction constant. - * - * @name Phaser.LEFT - * @const - * @type {integer} - * @since 3.0.0 - */ - LEFT: 7, - - /** - * Direction constant. - * - * @name Phaser.RIGHT - * @const - * @type {integer} - * @since 3.0.0 - */ - RIGHT: 8 - -}; - -module.exports = CONST; - - -/***/ }), -/* 33 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -7853,362 +7913,7 @@ module.exports = CONST; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var Line = __webpack_require__(61); - -/** - * @classdesc - * 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 - * @memberof Phaser.GameObjects - * @constructor - * @since 3.13.0 - * - * @extends Phaser.GameObjects.Components.AlphaSingle - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.ComputedSize - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @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 {string} [type] - The internal type of the Shape. - * @param {any} [data] - The data of the source shape geometry, if any. - */ -var Shape = new Class({ - - Extends: GameObject, - - Mixins: [ - Components.AlphaSingle, - Components.BlendMode, - Components.ComputedSize, - Components.Depth, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Transform, - Components.Visible - ], - - initialize: - - function Shape (scene, type, data) - { - if (type === undefined) { type = 'Shape'; } - - GameObject.call(this, scene, type); - - /** - * The source Shape data. Typically a geometry object. - * You should not manipulate this directly. - * - * @name Phaser.GameObjects.Shape#data - * @type {any} - * @readonly - * @since 3.13.0 - */ - this.geom = data; - - /** - * Holds the polygon path data for filled rendering. - * - * @name Phaser.GameObjects.Shape#pathData - * @type {number[]} - * @readonly - * @since 3.13.0 - */ - this.pathData = []; - - /** - * Holds the earcut polygon path index data for filled rendering. - * - * @name Phaser.GameObjects.Shape#pathIndexes - * @type {integer[]} - * @readonly - * @since 3.13.0 - */ - this.pathIndexes = []; - - /** - * The fill color used by this Shape. - * - * @name Phaser.GameObjects.Shape#fillColor - * @type {number} - * @since 3.13.0 - */ - this.fillColor = 0xffffff; - - /** - * The fill alpha value used by this Shape. - * - * @name Phaser.GameObjects.Shape#fillAlpha - * @type {number} - * @since 3.13.0 - */ - this.fillAlpha = 1; - - /** - * The stroke color used by this Shape. - * - * @name Phaser.GameObjects.Shape#strokeColor - * @type {number} - * @since 3.13.0 - */ - this.strokeColor = 0xffffff; - - /** - * The stroke alpha value used by this Shape. - * - * @name Phaser.GameObjects.Shape#strokeAlpha - * @type {number} - * @since 3.13.0 - */ - this.strokeAlpha = 1; - - /** - * The stroke line width used by this Shape. - * - * @name Phaser.GameObjects.Shape#lineWidth - * @type {number} - * @since 3.13.0 - */ - this.lineWidth = 1; - - /** - * Controls if this Shape is filled or not. - * Note that some Shapes do not support being filled (such as Line shapes) - * - * @name Phaser.GameObjects.Shape#isFilled - * @type {boolean} - * @since 3.13.0 - */ - this.isFilled = false; - - /** - * Controls if this Shape is stroked or not. - * Note that some Shapes do not support being stroked (such as Iso Box shapes) - * - * @name Phaser.GameObjects.Shape#isStroked - * @type {boolean} - * @since 3.13.0 - */ - this.isStroked = false; - - /** - * Controls if this Shape path is closed during rendering when stroked. - * Note that some Shapes are always closed when stroked (such as Ellipse shapes) - * - * @name Phaser.GameObjects.Shape#closePath - * @type {boolean} - * @since 3.13.0 - */ - this.closePath = true; - - /** - * Private internal value. - * A Line used when parsing internal path data to avoid constant object re-creation. - * - * @name Phaser.GameObjects.Curve#_tempLine - * @type {Phaser.Geom.Line} - * @private - * @since 3.13.0 - */ - this._tempLine = new Line(); - - this.initPipeline(); - }, - - /** - * 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. - * - * @method Phaser.GameObjects.Shape#setFillStyle - * @since 3.13.0 - * - * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled. - * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given. - * - * @return {this} This Game Object instance. - */ - setFillStyle: function (color, alpha) - { - if (alpha === undefined) { alpha = 1; } - - if (color === undefined) - { - this.isFilled = false; - } - else - { - this.fillColor = color; - this.fillAlpha = alpha; - this.isFilled = true; - } - - return 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. - * - * @method Phaser.GameObjects.Shape#setStrokeStyle - * @since 3.13.0 - * - * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked. - * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked. - * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given. - * - * @return {this} This Game Object instance. - */ - setStrokeStyle: function (lineWidth, color, alpha) - { - if (alpha === undefined) { alpha = 1; } - - if (lineWidth === undefined) - { - this.isStroked = false; - } - else - { - this.lineWidth = lineWidth; - this.strokeColor = color; - this.strokeAlpha = alpha; - this.isStroked = true; - } - - return 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. - * - * @method Phaser.GameObjects.Shape#setClosePath - * @since 3.13.0 - * - * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`. - * - * @return {this} This Game Object instance. - */ - setClosePath: function (value) - { - this.closePath = value; - - return this; - }, - - /** - * Internal destroy handler, called as part of the destroy process. - * - * @method Phaser.GameObjects.Shape#preDestroy - * @protected - * @since 3.13.0 - */ - preDestroy: function () - { - this.geom = null; - this._tempLine = null; - this.pathData = []; - this.pathIndexes = []; - } - -}); - -module.exports = Shape; - - -/***/ }), -/* 34 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Tilemaps.Formats - */ - -module.exports = { - - /** - * CSV Map Type - * - * @name Phaser.Tilemaps.Formats.CSV - * @type {number} - * @since 3.0.0 - */ - CSV: 0, - - /** - * Tiled JSON Map Type - * - * @name Phaser.Tilemaps.Formats.TILED_JSON - * @type {number} - * @since 3.0.0 - */ - TILED_JSON: 1, - - /** - * 2D Array Map Type - * - * @name Phaser.Tilemaps.Formats.ARRAY_2D - * @type {number} - * @since 3.0.0 - */ - ARRAY_2D: 2, - - /** - * Weltmeister (Impact.js) Map Type - * - * @name Phaser.Tilemaps.Formats.WELTMEISTER - * @type {number} - * @since 3.0.0 - */ - WELTMEISTER: 3 - -}; - - -/***/ }), -/* 35 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(14); var Vector2 = __webpack_require__(3); /** @@ -8641,7 +8346,7 @@ var TransformMatrix = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. * - * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. */ multiply: function (rhs, out) { @@ -9166,7 +8871,7 @@ module.exports = TransformMatrix; /***/ }), -/* 36 */ +/* 33 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -9176,10 +8881,310 @@ module.exports = TransformMatrix; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(175); -var GetColor32 = __webpack_require__(314); -var HSVToRGB = __webpack_require__(176); -var RGBToHSV = __webpack_require__(315); +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var Line = __webpack_require__(61); + +/** + * @classdesc + * 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 + * @memberof Phaser.GameObjects + * @constructor + * @since 3.13.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @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 {string} [type] - The internal type of the Shape. + * @param {any} [data] - The data of the source shape geometry, if any. + */ +var Shape = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.AlphaSingle, + Components.BlendMode, + Components.ComputedSize, + Components.Depth, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Transform, + Components.Visible + ], + + initialize: + + function Shape (scene, type, data) + { + if (type === undefined) { type = 'Shape'; } + + GameObject.call(this, scene, type); + + /** + * The source Shape data. Typically a geometry object. + * You should not manipulate this directly. + * + * @name Phaser.GameObjects.Shape#data + * @type {any} + * @readonly + * @since 3.13.0 + */ + this.geom = data; + + /** + * Holds the polygon path data for filled rendering. + * + * @name Phaser.GameObjects.Shape#pathData + * @type {number[]} + * @readonly + * @since 3.13.0 + */ + this.pathData = []; + + /** + * Holds the earcut polygon path index data for filled rendering. + * + * @name Phaser.GameObjects.Shape#pathIndexes + * @type {integer[]} + * @readonly + * @since 3.13.0 + */ + this.pathIndexes = []; + + /** + * The fill color used by this Shape. + * + * @name Phaser.GameObjects.Shape#fillColor + * @type {number} + * @since 3.13.0 + */ + this.fillColor = 0xffffff; + + /** + * The fill alpha value used by this Shape. + * + * @name Phaser.GameObjects.Shape#fillAlpha + * @type {number} + * @since 3.13.0 + */ + this.fillAlpha = 1; + + /** + * The stroke color used by this Shape. + * + * @name Phaser.GameObjects.Shape#strokeColor + * @type {number} + * @since 3.13.0 + */ + this.strokeColor = 0xffffff; + + /** + * The stroke alpha value used by this Shape. + * + * @name Phaser.GameObjects.Shape#strokeAlpha + * @type {number} + * @since 3.13.0 + */ + this.strokeAlpha = 1; + + /** + * The stroke line width used by this Shape. + * + * @name Phaser.GameObjects.Shape#lineWidth + * @type {number} + * @since 3.13.0 + */ + this.lineWidth = 1; + + /** + * Controls if this Shape is filled or not. + * Note that some Shapes do not support being filled (such as Line shapes) + * + * @name Phaser.GameObjects.Shape#isFilled + * @type {boolean} + * @since 3.13.0 + */ + this.isFilled = false; + + /** + * Controls if this Shape is stroked or not. + * Note that some Shapes do not support being stroked (such as Iso Box shapes) + * + * @name Phaser.GameObjects.Shape#isStroked + * @type {boolean} + * @since 3.13.0 + */ + this.isStroked = false; + + /** + * Controls if this Shape path is closed during rendering when stroked. + * Note that some Shapes are always closed when stroked (such as Ellipse shapes) + * + * @name Phaser.GameObjects.Shape#closePath + * @type {boolean} + * @since 3.13.0 + */ + this.closePath = true; + + /** + * Private internal value. + * A Line used when parsing internal path data to avoid constant object re-creation. + * + * @name Phaser.GameObjects.Curve#_tempLine + * @type {Phaser.Geom.Line} + * @private + * @since 3.13.0 + */ + this._tempLine = new Line(); + + this.initPipeline(); + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Shape#setFillStyle + * @since 3.13.0 + * + * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled. + * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given. + * + * @return {this} This Game Object instance. + */ + setFillStyle: function (color, alpha) + { + if (alpha === undefined) { alpha = 1; } + + if (color === undefined) + { + this.isFilled = false; + } + else + { + this.fillColor = color; + this.fillAlpha = alpha; + this.isFilled = true; + } + + return 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. + * + * @method Phaser.GameObjects.Shape#setStrokeStyle + * @since 3.13.0 + * + * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked. + * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked. + * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given. + * + * @return {this} This Game Object instance. + */ + setStrokeStyle: function (lineWidth, color, alpha) + { + if (alpha === undefined) { alpha = 1; } + + if (lineWidth === undefined) + { + this.isStroked = false; + } + else + { + this.lineWidth = lineWidth; + this.strokeColor = color; + this.strokeAlpha = alpha; + this.isStroked = true; + } + + return 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. + * + * @method Phaser.GameObjects.Shape#setClosePath + * @since 3.13.0 + * + * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`. + * + * @return {this} This Game Object instance. + */ + setClosePath: function (value) + { + this.closePath = value; + + return this; + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method Phaser.GameObjects.Shape#preDestroy + * @protected + * @since 3.13.0 + */ + preDestroy: function () + { + this.geom = null; + this._tempLine = null; + this.pathData = []; + this.pathIndexes = []; + } + +}); + +module.exports = Shape; + + +/***/ }), +/* 34 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetColor = __webpack_require__(176); +var GetColor32 = __webpack_require__(313); +var HSVToRGB = __webpack_require__(177); +var RGBToHSV = __webpack_require__(314); /** * @namespace Phaser.Display.Color @@ -10029,7 +10034,62 @@ module.exports = Color; /***/ }), -/* 37 */ +/* 35 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Tilemaps.Formats + */ + +module.exports = { + + /** + * CSV Map Type + * + * @name Phaser.Tilemaps.Formats.CSV + * @type {number} + * @since 3.0.0 + */ + CSV: 0, + + /** + * Tiled JSON Map Type + * + * @name Phaser.Tilemaps.Formats.TILED_JSON + * @type {number} + * @since 3.0.0 + */ + TILED_JSON: 1, + + /** + * 2D Array Map Type + * + * @name Phaser.Tilemaps.Formats.ARRAY_2D + * @type {number} + * @since 3.0.0 + */ + ARRAY_2D: 2, + + /** + * Weltmeister (Impact.js) Map Type + * + * @name Phaser.Tilemaps.Formats.WELTMEISTER + * @type {number} + * @since 3.0.0 + */ + WELTMEISTER: 3 + +}; + + +/***/ }), +/* 36 */ /***/ (function(module, exports) { /** @@ -10273,7 +10333,7 @@ module.exports = Vector; })(); /***/ }), -/* 38 */ +/* 37 */ /***/ (function(module, exports) { /** @@ -10398,6 +10458,144 @@ module.exports = Bounds; })(); +/***/ }), +/* 38 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Global constants. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.23.0', + + BlendModes: __webpack_require__(44), + + ScaleModes: __webpack_require__(158), + + /** + * AUTO Detect Renderer. + * + * @name Phaser.AUTO + * @const + * @type {integer} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Canvas Renderer. + * + * @name Phaser.CANVAS + * @const + * @type {integer} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * WebGL Renderer. + * + * @name Phaser.WEBGL + * @const + * @type {integer} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * Headless Renderer. + * + * @name Phaser.HEADLESS + * @const + * @type {integer} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {integer} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {integer} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {integer} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {integer} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {integer} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {integer} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + /***/ }), /* 39 */ /***/ (function(module, exports) { @@ -10475,7 +10673,7 @@ module.exports = PropertyValueInc; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(14); /** * Convert the given angle from degrees, to the equivalent angle in radians. @@ -10497,6 +10695,43 @@ module.exports = DegToRad; /***/ }), /* 41 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Cameras.Scene2D.Events + */ + +module.exports = { + + DESTROY: __webpack_require__(669), + FADE_IN_COMPLETE: __webpack_require__(670), + FADE_IN_START: __webpack_require__(671), + FADE_OUT_COMPLETE: __webpack_require__(672), + FADE_OUT_START: __webpack_require__(673), + FLASH_COMPLETE: __webpack_require__(674), + FLASH_START: __webpack_require__(675), + PAN_COMPLETE: __webpack_require__(676), + PAN_START: __webpack_require__(677), + POST_RENDER: __webpack_require__(678), + PRE_RENDER: __webpack_require__(679), + ROTATE_COMPLETE: __webpack_require__(680), + ROTATE_START: __webpack_require__(681), + SHAKE_COMPLETE: __webpack_require__(682), + SHAKE_START: __webpack_require__(683), + ZOOM_COMPLETE: __webpack_require__(684), + ZOOM_START: __webpack_require__(685) + +}; + + +/***/ }), +/* 42 */ /***/ (function(module, exports) { /** @@ -10533,7 +10768,7 @@ module.exports = FillStyleCanvas; /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -10552,11 +10787,11 @@ var Bodies = {}; module.exports = Bodies; var Vertices = __webpack_require__(31); -var Common = __webpack_require__(19); +var Common = __webpack_require__(20); var Body = __webpack_require__(25); -var Bounds = __webpack_require__(38); -var Vector = __webpack_require__(37); -var decomp = __webpack_require__(505); +var Bounds = __webpack_require__(37); +var Vector = __webpack_require__(36); +var decomp = __webpack_require__(501); (function() { @@ -10891,7 +11126,7 @@ var decomp = __webpack_require__(505); /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports) { /** @@ -11230,7 +11465,7 @@ module.exports = { /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -11258,7 +11493,7 @@ module.exports = GetBottom; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -11291,7 +11526,7 @@ module.exports = SetTop; /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports) { /** @@ -11319,7 +11554,7 @@ module.exports = GetLeft; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports) { /** @@ -11352,7 +11587,7 @@ module.exports = SetLeft; /***/ }), -/* 48 */ +/* 49 */ /***/ (function(module, exports) { /** @@ -11380,7 +11615,7 @@ module.exports = GetRight; /***/ }), -/* 49 */ +/* 50 */ /***/ (function(module, exports) { /** @@ -11413,7 +11648,7 @@ module.exports = SetRight; /***/ }), -/* 50 */ +/* 51 */ /***/ (function(module, exports) { /** @@ -11446,7 +11681,7 @@ module.exports = SetBottom; /***/ }), -/* 51 */ +/* 52 */ /***/ (function(module, exports) { /** @@ -11474,7 +11709,7 @@ module.exports = GetTop; /***/ }), -/* 52 */ +/* 53 */ /***/ (function(module, exports) { /** @@ -11554,7 +11789,7 @@ module.exports = GEOM_CONST; /***/ }), -/* 53 */ +/* 54 */ /***/ (function(module, exports) { /** @@ -11589,7 +11824,7 @@ module.exports = Contains; /***/ }), -/* 54 */ +/* 55 */ /***/ (function(module, exports) { /** @@ -11622,41 +11857,6 @@ var DistanceBetween = function (x1, y1, x2, y2) module.exports = DistanceBetween; -/***/ }), -/* 55 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Cameras.Scene2D.Events - */ - -module.exports = { - - 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) - -}; - - /***/ }), /* 56 */ /***/ (function(module, exports, __webpack_require__) { @@ -11673,52 +11873,52 @@ module.exports = { module.exports = { - 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) + BOOT: __webpack_require__(844), + DESTROY: __webpack_require__(845), + DRAG_END: __webpack_require__(846), + DRAG_ENTER: __webpack_require__(847), + DRAG: __webpack_require__(848), + DRAG_LEAVE: __webpack_require__(849), + DRAG_OVER: __webpack_require__(850), + DRAG_START: __webpack_require__(851), + DROP: __webpack_require__(852), + GAME_OUT: __webpack_require__(853), + GAME_OVER: __webpack_require__(854), + GAMEOBJECT_DOWN: __webpack_require__(855), + GAMEOBJECT_DRAG_END: __webpack_require__(856), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(857), + GAMEOBJECT_DRAG: __webpack_require__(858), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(859), + GAMEOBJECT_DRAG_OVER: __webpack_require__(860), + GAMEOBJECT_DRAG_START: __webpack_require__(861), + GAMEOBJECT_DROP: __webpack_require__(862), + GAMEOBJECT_MOVE: __webpack_require__(863), + GAMEOBJECT_OUT: __webpack_require__(864), + GAMEOBJECT_OVER: __webpack_require__(865), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(866), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(867), + GAMEOBJECT_POINTER_OUT: __webpack_require__(868), + GAMEOBJECT_POINTER_OVER: __webpack_require__(869), + GAMEOBJECT_POINTER_UP: __webpack_require__(870), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(871), + GAMEOBJECT_UP: __webpack_require__(872), + GAMEOBJECT_WHEEL: __webpack_require__(873), + MANAGER_BOOT: __webpack_require__(874), + MANAGER_PROCESS: __webpack_require__(875), + MANAGER_UPDATE: __webpack_require__(876), + POINTER_DOWN: __webpack_require__(877), + POINTER_DOWN_OUTSIDE: __webpack_require__(878), + POINTER_MOVE: __webpack_require__(879), + POINTER_OUT: __webpack_require__(880), + POINTER_OVER: __webpack_require__(881), + POINTER_UP: __webpack_require__(882), + POINTER_UP_OUTSIDE: __webpack_require__(883), + POINTER_WHEEL: __webpack_require__(884), + POINTERLOCK_CHANGE: __webpack_require__(885), + PRE_UPDATE: __webpack_require__(886), + SHUTDOWN: __webpack_require__(887), + START: __webpack_require__(888), + UPDATE: __webpack_require__(889) }; @@ -11900,7 +12100,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(151); +var GetTileAt = __webpack_require__(153); var GetTilesWithin = __webpack_require__(26); /** @@ -12008,10 +12208,10 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(294); -var GetPoints = __webpack_require__(162); -var GEOM_CONST = __webpack_require__(52); -var Random = __webpack_require__(163); +var GetPoint = __webpack_require__(293); +var GetPoints = __webpack_require__(163); +var GEOM_CONST = __webpack_require__(53); +var Random = __webpack_require__(164); var Vector2 = __webpack_require__(3); /** @@ -12157,7 +12357,7 @@ var Line = new Class({ * @param {number} [x2=0] - The x coordinate of the lines ending point. * @param {number} [y2=0] - The y coordinate of the lines ending point. * - * @return {Phaser.Geom.Line} This Line object. + * @return {this} This Line object. */ setTo: function (x1, y1, x2, y2) { @@ -12410,29 +12610,29 @@ module.exports = Wrap; module.exports = { - 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) + COMPLETE: __webpack_require__(912), + DECODED: __webpack_require__(913), + DECODED_ALL: __webpack_require__(914), + DESTROY: __webpack_require__(915), + DETUNE: __webpack_require__(916), + GLOBAL_DETUNE: __webpack_require__(917), + GLOBAL_MUTE: __webpack_require__(918), + GLOBAL_RATE: __webpack_require__(919), + GLOBAL_VOLUME: __webpack_require__(920), + LOOP: __webpack_require__(921), + LOOPED: __webpack_require__(922), + MUTE: __webpack_require__(923), + PAUSE_ALL: __webpack_require__(924), + PAUSE: __webpack_require__(925), + PLAY: __webpack_require__(926), + RATE: __webpack_require__(927), + RESUME_ALL: __webpack_require__(928), + RESUME: __webpack_require__(929), + SEEK: __webpack_require__(930), + STOP_ALL: __webpack_require__(931), + STOP: __webpack_require__(932), + UNLOCKED: __webpack_require__(933), + VOLUME: __webpack_require__(934) }; @@ -12448,188 +12648,10 @@ module.exports = { */ var Class = __webpack_require__(0); -var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var SpriteRender = __webpack_require__(997); - -/** - * @classdesc - * A 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. - * - * @class Sprite - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.TextureCrop - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. - */ -var Sprite = new Class({ - - Extends: GameObject, - - Mixins: [ - Components.Alpha, - Components.BlendMode, - Components.Depth, - Components.Flip, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Size, - Components.TextureCrop, - Components.Tint, - Components.Transform, - Components.Visible, - SpriteRender - ], - - initialize: - - function Sprite (scene, x, y, texture, frame) - { - GameObject.call(this, scene, 'Sprite'); - - /** - * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. - * - * @name Phaser.GameObjects.Sprite#_crop - * @type {object} - * @private - * @since 3.11.0 - */ - this._crop = this.resetCropObject(); - - /** - * The Animation Controller of this Sprite. - * - * @name Phaser.GameObjects.Sprite#anims - * @type {Phaser.GameObjects.Components.Animation} - * @since 3.0.0 - */ - this.anims = new Components.Animation(this); - - this.setTexture(texture, frame); - this.setPosition(x, y); - this.setSizeToFrame(); - this.setOriginFromFrame(); - this.initPipeline(); - }, - - /** - * Update this Sprite's animations. - * - * @method Phaser.GameObjects.Sprite#preUpdate - * @protected - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - preUpdate: function (time, delta) - { - this.anims.update(time, delta); - }, - - /** - * Start playing the given animation. - * - * @method Phaser.GameObjects.Sprite#play - * @since 3.0.0 - * - * @param {string} key - The string-based key of the animation to play. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.Sprite} This Game Object. - */ - play: function (key, ignoreIfPlaying, startFrame) - { - this.anims.play(key, ignoreIfPlaying, startFrame); - - return this; - }, - - /** - * Build a JSON representation of this Sprite. - * - * @method Phaser.GameObjects.Sprite#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ - toJSON: function () - { - var data = Components.ToJSON(this); - - // Extra Sprite data is added here - - return data; - }, - - /** - * Handles the pre-destroy step for the Sprite, which removes the Animation component. - * - * @method Phaser.GameObjects.Sprite#preDestroy - * @private - * @since 3.14.0 - */ - preDestroy: function () - { - this.anims.destroy(); - - this.anims = undefined; - } - -}); - -module.exports = Sprite; - - -/***/ }), -/* 66 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(5); var IsPlainObject = __webpack_require__(7); @@ -12638,7 +12660,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -12742,7 +12764,7 @@ var JSONFile = new Class({ * Adds a JSON file, or array of JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -12757,14 +12779,14 @@ var JSONFile = new Class({ * 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 JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.json({ * key: 'wavedata', @@ -12775,7 +12797,7 @@ var JSONFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.json('wavedata', 'files/AlienWaveData.json'); * // and later in your game ... @@ -12794,7 +12816,7 @@ var JSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -12814,7 +12836,7 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -12822,7 +12844,7 @@ var JSONFile = new Class({ * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) { @@ -12846,7 +12868,7 @@ module.exports = JSONFile; /***/ }), -/* 67 */ +/* 66 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13080,7 +13102,7 @@ module.exports = MultiFile; /***/ }), -/* 68 */ +/* 67 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13098,9 +13120,9 @@ var Composite = {}; module.exports = Composite; -var Events = __webpack_require__(96); -var Common = __webpack_require__(19); -var Bounds = __webpack_require__(38); +var Events = __webpack_require__(93); +var Common = __webpack_require__(20); +var Bounds = __webpack_require__(37); var Body = __webpack_require__(25); (function() { @@ -13774,7 +13796,7 @@ var Body = __webpack_require__(25); /***/ }), -/* 69 */ +/* 68 */ /***/ (function(module, exports) { /** @@ -13825,7 +13847,7 @@ module.exports = WorldToTileX; /***/ }), -/* 70 */ +/* 69 */ /***/ (function(module, exports) { /** @@ -13876,7 +13898,7 @@ module.exports = WorldToTileY; /***/ }), -/* 71 */ +/* 70 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -13887,10 +13909,10 @@ module.exports = WorldToTileY; var Class = __webpack_require__(0); 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); +var GetPoint = __webpack_require__(283); +var GetPoints = __webpack_require__(284); +var GEOM_CONST = __webpack_require__(53); +var Random = __webpack_require__(160); /** * @classdesc @@ -14054,7 +14076,7 @@ var Circle = new Class({ * @param {number} [y=0] - The y position of the center of the circle. * @param {number} [radius=0] - The radius of the circle. * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setTo: function (x, y, radius) { @@ -14073,7 +14095,7 @@ var Circle = new Class({ * @method Phaser.Geom.Circle#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setEmpty: function () { @@ -14092,7 +14114,7 @@ var Circle = new Class({ * @param {number} [x=0] - The x position of the center of the circle. * @param {number} [y=0] - The y position of the center of the circle. * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setPosition: function (x, y) { @@ -14251,7 +14273,7 @@ module.exports = Circle; /***/ }), -/* 72 */ +/* 71 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -14933,7 +14955,7 @@ earcut.flatten = function (data) { /***/ }), -/* 73 */ +/* 72 */ /***/ (function(module, exports) { /** @@ -14975,7 +14997,7 @@ module.exports = Clone; /***/ }), -/* 74 */ +/* 73 */ /***/ (function(module, exports) { /** @@ -15023,10 +15045,297 @@ var SafeRange = function (array, startIndex, endIndex, throwError) module.exports = SafeRange; +/***/ }), +/* 74 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @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__(13); +var SpriteRender = __webpack_require__(993); + +/** + * @classdesc + * A 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. + * + * @class Sprite + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Size + * @extends Phaser.GameObjects.Components.TextureCrop + * @extends Phaser.GameObjects.Components.Tint + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. + */ +var Sprite = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Size, + Components.TextureCrop, + Components.Tint, + Components.Transform, + Components.Visible, + SpriteRender + ], + + initialize: + + function Sprite (scene, x, y, texture, frame) + { + GameObject.call(this, scene, 'Sprite'); + + /** + * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. + * + * @name Phaser.GameObjects.Sprite#_crop + * @type {object} + * @private + * @since 3.11.0 + */ + this._crop = this.resetCropObject(); + + /** + * The Animation Controller of this Sprite. + * + * @name Phaser.GameObjects.Sprite#anims + * @type {Phaser.GameObjects.Components.Animation} + * @since 3.0.0 + */ + this.anims = new Components.Animation(this); + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.setOriginFromFrame(); + this.initPipeline(); + }, + + /** + * Update this Sprite's animations. + * + * @method Phaser.GameObjects.Sprite#preUpdate + * @protected + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + preUpdate: function (time, delta) + { + this.anims.update(time, delta); + }, + + /** + * Start playing the given animation. + * + * @method Phaser.GameObjects.Sprite#play + * @since 3.0.0 + * + * @param {string} key - The string-based key of the animation to play. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {this} This Game Object. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + this.anims.play(key, ignoreIfPlaying, startFrame); + + return this; + }, + + /** + * Build a JSON representation of this Sprite. + * + * @method Phaser.GameObjects.Sprite#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ + toJSON: function () + { + var data = Components.ToJSON(this); + + // Extra Sprite data is added here + + return data; + }, + + /** + * Handles the pre-destroy step for the Sprite, which removes the Animation component. + * + * @method Phaser.GameObjects.Sprite#preDestroy + * @private + * @since 3.14.0 + */ + preDestroy: function () + { + this.anims.destroy(); + + this.anims = undefined; + } + +}); + +module.exports = Sprite; + + /***/ }), /* 75 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var EaseMap = __webpack_require__(122); +var UppercaseFirst = __webpack_require__(194); + +/** + * This internal function is used to return the correct ease function for a Tween. + * + * It can take a variety of input, including an EaseMap based string, or a custom function. + * + * @function Phaser.Tweens.Builders.GetEaseFunction + * @since 3.0.0 + * + * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function. + * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. + * + * @return {function} The ease function. + */ +var GetEaseFunction = function (ease, easeParams) +{ + // Default ease function + var easeFunction = EaseMap.Power0; + + // Prepare ease function + if (typeof ease === 'string') + { + // String based look-up + + // 1) They specified it correctly + if (EaseMap.hasOwnProperty(ease)) + { + easeFunction = EaseMap[ease]; + } + else + { + // Do some string manipulation to try and find it + var direction = ''; + + if (ease.indexOf('.')) + { + // quad.in = Quad.easeIn + // quad.out = Quad.easeOut + // quad.inout = Quad.easeInOut + + direction = ease.substr(ease.indexOf('.') + 1); + + if (direction.toLowerCase() === 'in') + { + direction = 'easeIn'; + } + else if (direction.toLowerCase() === 'out') + { + direction = 'easeOut'; + } + else if (direction.toLowerCase() === 'inout') + { + direction = 'easeInOut'; + } + } + + ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction); + + if (EaseMap.hasOwnProperty(ease)) + { + easeFunction = EaseMap[ease]; + } + } + } + else if (typeof ease === 'function') + { + // Custom function + easeFunction = ease; + } + else if (Array.isArray(ease) && ease.length === 4) + { + // Bezier function (TODO) + } + + // No custom ease parameters? + if (!easeParams) + { + // Return ease function + return easeFunction; + } + + var cloneParams = easeParams.slice(0); + + cloneParams.unshift(0); + + // Return ease function with custom ease parameters + return function (v) + { + cloneParams[0] = v; + + return easeFunction.apply(this, cloneParams); + }; +}; + +module.exports = GetEaseFunction; + + +/***/ }), +/* 76 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -15099,7 +15408,7 @@ module.exports = StrokePathWebGL; /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15109,12 +15418,12 @@ module.exports = StrokePathWebGL; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(92); -var GetPoint = __webpack_require__(448); -var GetPoints = __webpack_require__(449); -var GEOM_CONST = __webpack_require__(52); +var Contains = __webpack_require__(89); +var GetPoint = __webpack_require__(451); +var GetPoints = __webpack_require__(452); +var GEOM_CONST = __webpack_require__(53); var Line = __webpack_require__(61); -var Random = __webpack_require__(168); +var Random = __webpack_require__(169); /** * @classdesc @@ -15302,7 +15611,7 @@ var Triangle = new Class({ * @param {number} [x3=0] - `x` coordinate of the third point. * @param {number} [y3=0] - `y` coordinate of the third point. * - * @return {Phaser.Geom.Triangle} This Triangle object. + * @return {this} This Triangle object. */ setTo: function (x1, y1, x2, y2, x3, y3) { @@ -15546,7 +15855,7 @@ module.exports = Triangle; /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15556,10 +15865,10 @@ module.exports = Triangle; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -15567,7 +15876,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -15711,7 +16020,7 @@ var ImageFile = new Class({ * Adds an Image, or array of Images, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -15726,7 +16035,7 @@ var ImageFile = new Class({ * 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. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback * of animated gifs to Canvas elements. @@ -15737,7 +16046,7 @@ var ImageFile = new Class({ * 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.image({ * key: 'logo', @@ -15748,7 +16057,7 @@ var ImageFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` 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.image('logo', 'images/AtariLogo.png'); * // and later in your game ... @@ -15767,13 +16076,13 @@ var ImageFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -15789,14 +16098,14 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string|string[]} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('image', function (key, url, xhrSettings) { @@ -15820,7 +16129,7 @@ module.exports = ImageFile; /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15838,11 +16147,11 @@ var Constraint = {}; module.exports = Constraint; var Vertices = __webpack_require__(31); -var Vector = __webpack_require__(37); -var Sleeping = __webpack_require__(95); -var Bounds = __webpack_require__(38); -var Axes = __webpack_require__(146); -var Common = __webpack_require__(19); +var Vector = __webpack_require__(36); +var Sleeping = __webpack_require__(92); +var Bounds = __webpack_require__(37); +var Axes = __webpack_require__(148); +var Common = __webpack_require__(20); (function() { @@ -16309,7 +16618,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports) { /** @@ -16345,7 +16654,7 @@ module.exports = SetTileCollision; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -16356,7 +16665,7 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(467); +var Rectangle = __webpack_require__(470); /** * @classdesc @@ -16791,7 +17100,7 @@ var Tile = new Class({ * @since 3.0.0 * * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check. - * @param {object} [output] - [description] + * @param {Phaser.Geom.Rectangle} [output] - Optional Rectangle object to store the results in. * * @return {(Phaser.Geom.Rectangle|object)} */ @@ -17183,7 +17492,7 @@ module.exports = Tile; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports) { /** @@ -17211,7 +17520,7 @@ module.exports = GetCenterX; /***/ }), -/* 82 */ +/* 83 */ /***/ (function(module, exports) { /** @@ -17246,7 +17555,7 @@ module.exports = SetCenterX; /***/ }), -/* 83 */ +/* 84 */ /***/ (function(module, exports) { /** @@ -17274,7 +17583,7 @@ module.exports = GetCenterY; /***/ }), -/* 84 */ +/* 85 */ /***/ (function(module, exports) { /** @@ -17309,7 +17618,7 @@ module.exports = SetCenterY; /***/ }), -/* 85 */ +/* 86 */ /***/ (function(module, exports) { /** @@ -17355,7 +17664,7 @@ module.exports = SpliceOne; /***/ }), -/* 86 */ +/* 87 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17849,17 +18158,16 @@ var Curve = new Class({ return this.getTangent(t, out); }, - // Given a distance in pixels, get a t to find p. /** - * [description] + * Given a distance in pixels, get a t to find p. * * @method Phaser.Curves.Curve#getTFromDistance * @since 3.0.0 * - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The distance. */ getTFromDistance: function (distance, divisions) { @@ -17871,19 +18179,17 @@ var Curve = new Class({ return this.getUtoTmapping(0, distance, divisions); }, - // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant - /** - * [description] + * Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant. * * @method Phaser.Curves.Curve#getUtoTmapping * @since 3.0.0 * - * @param {number} u - [description] - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {number} u - A float between 0 and 1. + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The equidistant value. */ getUtoTmapping: function (u, distance, divisions) { @@ -17975,7 +18281,7 @@ module.exports = Curve; /***/ }), -/* 87 */ +/* 88 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -17990,306 +18296,22 @@ module.exports = Curve; module.exports = { - 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) + ADD: __webpack_require__(891), + COMPLETE: __webpack_require__(892), + FILE_COMPLETE: __webpack_require__(893), + FILE_KEY_COMPLETE: __webpack_require__(894), + FILE_LOAD_ERROR: __webpack_require__(895), + FILE_LOAD: __webpack_require__(896), + FILE_PROGRESS: __webpack_require__(897), + POST_PROCESS: __webpack_require__(898), + PROGRESS: __webpack_require__(899), + START: __webpack_require__(900) }; -/***/ }), -/* 88 */ -/***/ (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); - -/** - * Creates a new Object using all values from obj1 and obj2. - * If a value exists in both obj1 and obj2, the value in obj1 is used. - * - * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this - * function on shallow objects. - * - * @function Phaser.Utils.Objects.Merge - * @since 3.0.0 - * - * @param {object} obj1 - The first object. - * @param {object} obj2 - The second object. - * - * @return {object} A new object containing the union of obj1's and obj2's properties. - */ -var Merge = function (obj1, obj2) -{ - var clone = Clone(obj1); - - for (var key in obj2) - { - if (!clone.hasOwnProperty(key)) - { - clone[key] = obj2[key]; - } - } - - return clone; -}; - -module.exports = Merge; - - /***/ }), /* 89 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @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__(1000); - -/** - * @classdesc - * An Image Game Object. - * - * An Image is a light-weight Game Object useful for the display of static images in your game, - * such as logos, backgrounds, scenery or other non-animated elements. Images can have input - * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an - * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. - * - * @class Image - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.TextureCrop - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. - */ -var Image = new Class({ - - Extends: GameObject, - - Mixins: [ - Components.Alpha, - Components.BlendMode, - Components.Depth, - Components.Flip, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Size, - Components.TextureCrop, - Components.Tint, - Components.Transform, - Components.Visible, - ImageRender - ], - - initialize: - - function Image (scene, x, y, texture, frame) - { - GameObject.call(this, scene, 'Image'); - - /** - * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. - * - * @name Phaser.GameObjects.Image#_crop - * @type {object} - * @private - * @since 3.11.0 - */ - this._crop = this.resetCropObject(); - - this.setTexture(texture, frame); - this.setPosition(x, y); - this.setSizeToFrame(); - this.setOriginFromFrame(); - this.initPipeline(); - } - -}); - -module.exports = Image; - - -/***/ }), -/* 90 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var EaseMap = __webpack_require__(179); -var UppercaseFirst = __webpack_require__(194); - -/** - * This internal function is used to return the correct ease function for a Tween. - * - * It can take a variety of input, including an EaseMap based string, or a custom function. - * - * @function Phaser.Tweens.Builders.GetEaseFunction - * @since 3.0.0 - * - * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function. - * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. - * - * @return {function} The ease function. - */ -var GetEaseFunction = function (ease, easeParams) -{ - // Default ease function - var easeFunction = EaseMap.Power0; - - // Prepare ease function - if (typeof ease === 'string') - { - // String based look-up - - // 1) They specified it correctly - if (EaseMap.hasOwnProperty(ease)) - { - easeFunction = EaseMap[ease]; - } - else - { - // Do some string manipulation to try and find it - var direction = ''; - - if (ease.indexOf('.')) - { - // quad.in = Quad.easeIn - // quad.out = Quad.easeOut - // quad.inout =Quad.easeInOut - - direction = ease.substr(ease.indexOf('.') + 1); - - if (direction.toLowerCase() === 'in') - { - direction = 'easeIn'; - } - else if (direction.toLowerCase() === 'out') - { - direction = 'easeOut'; - } - else if (direction.toLowerCase() === 'inout') - { - direction = 'easeInOut'; - } - } - - ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction); - - if (EaseMap.hasOwnProperty(ease)) - { - easeFunction = EaseMap[ease]; - } - } - } - else if (typeof ease === 'function') - { - // Custom function - easeFunction = ease; - } - else if (Array.isArray(ease) && ease.length === 4) - { - // Bezier function (TODO) - } - - // No custom ease parameters? - if (!easeParams) - { - // Return ease function - return easeFunction; - } - - var cloneParams = easeParams.slice(0); - - cloneParams.unshift(0); - - // Return ease function with custom ease parameters - return function (v) - { - cloneParams[0] = v; - - return easeFunction.apply(this, cloneParams); - }; -}; - -module.exports = GetEaseFunction; - - -/***/ }), -/* 91 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Determine whether the source object has a property with the specified key. - * - * @function Phaser.Utils.Objects.HasValue - * @since 3.0.0 - * - * @param {object} source - The source object to be checked. - * @param {string} key - The property to check for within the object - * - * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`. - */ -var HasValue = function (source, key) -{ - return (source.hasOwnProperty(key)); -}; - -module.exports = HasValue; - - -/***/ }), -/* 92 */ /***/ (function(module, exports) { /** @@ -18342,7 +18364,7 @@ module.exports = Contains; /***/ }), -/* 93 */ +/* 90 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18418,7 +18440,7 @@ module.exports = LineToLine; /***/ }), -/* 94 */ +/* 91 */ /***/ (function(module, exports) { /** @@ -18446,7 +18468,7 @@ module.exports = Angle; /***/ }), -/* 95 */ +/* 92 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18459,7 +18481,7 @@ var Sleeping = {}; module.exports = Sleeping; -var Events = __webpack_require__(96); +var Events = __webpack_require__(93); (function() { @@ -18581,7 +18603,7 @@ var Events = __webpack_require__(96); /***/ }), -/* 96 */ +/* 93 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18596,7 +18618,7 @@ var Events = {}; module.exports = Events; -var Common = __webpack_require__(19); +var Common = __webpack_require__(20); (function() { @@ -18699,7 +18721,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 97 */ +/* 94 */ /***/ (function(module, exports) { /** @@ -18833,7 +18855,7 @@ module.exports = ALIGN_CONST; /***/ }), -/* 98 */ +/* 95 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -18842,7 +18864,7 @@ module.exports = ALIGN_CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -18867,7 +18889,41 @@ module.exports = FromPercent; /***/ }), -/* 99 */ +/* 96 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @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; + + +/***/ }), +/* 97 */ /***/ (function(module, exports) { /** @@ -18908,7 +18964,7 @@ module.exports = GetBoolean; /***/ }), -/* 100 */ +/* 98 */ /***/ (function(module, exports) { /** @@ -19080,7 +19136,7 @@ module.exports = TWEEN_CONST; /***/ }), -/* 101 */ +/* 99 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19090,7 +19146,7 @@ module.exports = TWEEN_CONST; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(303); +var Events = __webpack_require__(302); /** * @callback DataEachCallback @@ -19113,7 +19169,7 @@ var Events = __webpack_require__(303); * @since 3.0.0 * * @param {object} parent - The object that this DataManager belongs to. - * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter. + * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter. */ var DataManager = new Class({ @@ -19340,7 +19396,7 @@ var DataManager = new Class({ * @param {(string|object)} key - The key to set the value for. Or an object or 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. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ set: function (key, data) { @@ -19364,6 +19420,72 @@ var DataManager = new Class({ return this; }, + /** + * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#inc + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + inc: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (data === undefined) + { + data = 1; + } + + var value = this.get(key); + if (value === undefined) + { + value = 0; + } + + this.set(key, (value + data)); + + return this; + }, + + /** + * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#toggle + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + toggle: function (key) + { + if (this._frozen) + { + return this; + } + + this.set(key, !this.get(key)); + + return this; + }, + /** * Internal value setter, called automatically by the `set` method. * @@ -19377,7 +19499,7 @@ var DataManager = new Class({ * @param {string} key - The key to set the value for. * @param {*} data - The value to set. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setValue: function (key, data) { @@ -19441,7 +19563,7 @@ var DataManager = new Class({ * @param {*} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ each: function (callback, context) { @@ -19478,7 +19600,7 @@ var DataManager = new Class({ * @param {Object.} data - The data to merge. * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ merge: function (data, overwrite) { @@ -19514,7 +19636,7 @@ var DataManager = new Class({ * * @param {(string|string[])} key - The key to remove, or an array of keys to remove. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ remove: function (key) { @@ -19548,7 +19670,7 @@ var DataManager = new Class({ * * @param {string} key - The key to set the value for. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ removeValue: function (key) { @@ -19620,7 +19742,7 @@ var DataManager = new Class({ * * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setFreeze: function (value) { @@ -19635,7 +19757,7 @@ var DataManager = new Class({ * @method Phaser.Data.DataManager#reset * @since 3.0.0 * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ reset: function () { @@ -19721,7 +19843,7 @@ module.exports = DataManager; /***/ }), -/* 102 */ +/* 100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19736,23 +19858,23 @@ module.exports = DataManager; module.exports = { - 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) + DESTROY: __webpack_require__(604), + VIDEO_COMPLETE: __webpack_require__(605), + VIDEO_CREATED: __webpack_require__(606), + VIDEO_ERROR: __webpack_require__(607), + VIDEO_LOOP: __webpack_require__(608), + VIDEO_PLAY: __webpack_require__(609), + VIDEO_SEEKED: __webpack_require__(610), + VIDEO_SEEKING: __webpack_require__(611), + VIDEO_STOP: __webpack_require__(612), + VIDEO_TIMEOUT: __webpack_require__(613), + VIDEO_UNLOCKED: __webpack_require__(614) }; /***/ }), -/* 103 */ +/* 101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -19765,10 +19887,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__(55); +var Events = __webpack_require__(41); var Rectangle = __webpack_require__(11); -var TransformMatrix = __webpack_require__(35); -var ValueToColor = __webpack_require__(174); +var TransformMatrix = __webpack_require__(32); +var ValueToColor = __webpack_require__(175); var Vector2 = __webpack_require__(3); /** @@ -20366,7 +20488,7 @@ var BaseCamera = new Class({ * * @param {number} x - The horizontal coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOnX: function (x) { @@ -20393,7 +20515,7 @@ var BaseCamera = new Class({ * * @param {number} y - The vertical coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOnY: function (y) { @@ -20420,7 +20542,7 @@ var BaseCamera = new Class({ * @param {number} x - The horizontal coordinate to center on. * @param {number} y - The vertical coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOn: function (x, y) { @@ -20436,7 +20558,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerToBounds: function () { @@ -20461,7 +20583,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerToSize: function () { @@ -20629,7 +20751,7 @@ var BaseCamera = new Class({ * * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group)} entries - The Game Object, or array of Game Objects, to be ignored by this Camera. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ ignore: function (entries) { @@ -20799,7 +20921,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ removeBounds: function () { @@ -20822,7 +20944,7 @@ var BaseCamera = new Class({ * * @param {number} [value=0] - The cameras angle of rotation, given in degrees. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setAngle: function (value) { @@ -20846,7 +20968,7 @@ var BaseCamera = new Class({ * * @param {(string|number|Phaser.Types.Display.InputColorObject)} [color='rgba(0,0,0,0)'] - The color value. In CSS, hex or numeric color notation. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setBackgroundColor: function (color) { @@ -20887,7 +21009,7 @@ var BaseCamera = new Class({ * @param {integer} height - The height of the bounds, in pixels. * @param {boolean} [centerOn=false] - If `true` the Camera will automatically be centered on the new bounds. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setBounds: function (x, y, width, height, centerOn) { @@ -20945,7 +21067,7 @@ var BaseCamera = new Class({ * * @param {string} [value=''] - The name of the Camera. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setName: function (value) { @@ -20967,7 +21089,7 @@ var BaseCamera = new Class({ * @param {number} x - The top-left x coordinate of the Camera viewport. * @param {number} [y=x] - The top-left y coordinate of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setPosition: function (x, y) { @@ -20989,7 +21111,7 @@ var BaseCamera = new Class({ * * @param {number} [value=0] - The rotation of the Camera, in radians. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setRotation: function (value) { @@ -21010,7 +21132,7 @@ var BaseCamera = new Class({ * * @param {boolean} value - `true` to round Camera pixels, `false` to not. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setRoundPixels: function (value) { @@ -21029,7 +21151,7 @@ var BaseCamera = new Class({ * * @param {Phaser.Scene} scene - The Scene the camera is bound to. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setScene: function (scene) { @@ -21073,7 +21195,7 @@ var BaseCamera = new Class({ * @param {number} x - The x coordinate of the Camera in the game world. * @param {number} [y=x] - The y coordinate of the Camera in the game world. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setScroll: function (x, y) { @@ -21098,7 +21220,7 @@ var BaseCamera = new Class({ * @param {integer} width - The width of the Camera viewport. * @param {integer} [height=width] - The height of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setSize: function (width, height) { @@ -21129,7 +21251,7 @@ var BaseCamera = new Class({ * @param {integer} width - The width of the Camera viewport. * @param {integer} [height=width] - The height of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setViewport: function (x, y, width, height) { @@ -21156,7 +21278,7 @@ var BaseCamera = new Class({ * * @param {number} [value=1] - The zoom value of the Camera. The minimum it can be is 0.001. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setZoom: function (value) { @@ -21673,7 +21795,7 @@ module.exports = BaseCamera; /***/ }), -/* 104 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21688,18 +21810,18 @@ module.exports = BaseCamera; module.exports = { - 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) + ENTER_FULLSCREEN: __webpack_require__(725), + FULLSCREEN_FAILED: __webpack_require__(726), + FULLSCREEN_UNSUPPORTED: __webpack_require__(727), + LEAVE_FULLSCREEN: __webpack_require__(728), + ORIENTATION_CHANGE: __webpack_require__(729), + RESIZE: __webpack_require__(730) }; /***/ }), -/* 105 */ +/* 103 */ /***/ (function(module, exports) { /** @@ -21743,7 +21865,52 @@ module.exports = SnapFloor; /***/ }), -/* 106 */ +/* 104 */ +/***/ (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__(72); + +/** + * Creates a new Object using all values from obj1 and obj2. + * If a value exists in both obj1 and obj2, the value in obj1 is used. + * + * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this + * function on shallow objects. + * + * @function Phaser.Utils.Objects.Merge + * @since 3.0.0 + * + * @param {object} obj1 - The first object. + * @param {object} obj2 - The second object. + * + * @return {object} A new object containing the union of obj1's and obj2's properties. + */ +var Merge = function (obj1, obj2) +{ + var clone = Clone(obj1); + + for (var key in obj2) + { + if (!clone.hasOwnProperty(key)) + { + clone[key] = obj2[key]; + } + } + + return clone; +}; + +module.exports = Merge; + + +/***/ }), +/* 105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -21753,8 +21920,8 @@ module.exports = SnapFloor; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(20); -var Extend = __webpack_require__(17); +var Clamp = __webpack_require__(19); +var Extend = __webpack_require__(18); /** * @classdesc @@ -22562,7 +22729,7 @@ module.exports = Frame; /***/ }), -/* 107 */ +/* 106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22572,11 +22739,11 @@ module.exports = Frame; */ var Class = __webpack_require__(0); -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); +var Contains = __webpack_require__(107); +var GetPoint = __webpack_require__(424); +var GetPoints = __webpack_require__(425); +var GEOM_CONST = __webpack_require__(53); +var Random = __webpack_require__(168); /** * @classdesc @@ -22743,7 +22910,7 @@ var Ellipse = new Class({ * @param {number} width - The width of the ellipse. * @param {number} height - The height of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setTo: function (x, y, width, height) { @@ -22762,7 +22929,7 @@ var Ellipse = new Class({ * @method Phaser.Geom.Ellipse#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setEmpty: function () { @@ -22781,7 +22948,7 @@ var Ellipse = new Class({ * @param {number} x - The x position of the center of the ellipse. * @param {number} y - The y position of the center of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setPosition: function (x, y) { @@ -22803,7 +22970,7 @@ var Ellipse = new Class({ * @param {number} width - The width of the ellipse. * @param {number} [height=width] - The height of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setSize: function (width, height) { @@ -22944,7 +23111,7 @@ module.exports = Ellipse; /***/ }), -/* 108 */ +/* 107 */ /***/ (function(module, exports) { /** @@ -22986,7 +23153,7 @@ module.exports = Contains; /***/ }), -/* 109 */ +/* 108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22995,15 +23162,15 @@ module.exports = Contains; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(259); +var Actions = __webpack_require__(258); var Class = __webpack_require__(0); -var Events = __webpack_require__(102); -var GetFastValue = __webpack_require__(1); +var Events = __webpack_require__(100); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(5); var IsPlainObject = __webpack_require__(7); -var Range = __webpack_require__(415); -var Set = __webpack_require__(110); -var Sprite = __webpack_require__(65); +var Range = __webpack_require__(418); +var Set = __webpack_require__(140); +var Sprite = __webpack_require__(74); /** * @classdesc @@ -23512,7 +23679,7 @@ var Group = new Class({ * @param {Phaser.GameObjects.GameObject} child - The Game Object to add. * @param {boolean} [addToScene=false] - Also add the Game Object to the scene. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ add: function (child, addToScene) { @@ -23561,7 +23728,7 @@ var Group = new Class({ * @param {Phaser.GameObjects.GameObject[]} children - The Game Objects to add. * @param {boolean} [addToScene=false] - Also add the Game Objects to the scene. * - * @return {Phaser.GameObjects.Group} This group. + * @return {this} This group. */ addMultiple: function (children, addToScene) { @@ -23590,7 +23757,7 @@ var Group = new Class({ * @param {boolean} [removeFromScene=false] - Optionally remove the Group member from the Scene it belongs to. * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group member. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ remove: function (child, removeFromScene, destroyChild) { @@ -23644,7 +23811,7 @@ var Group = new Class({ * @param {boolean} [removeFromScene=false] - Optionally remove each Group member from the Scene. * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group members. * - * @return {Phaser.GameObjects.Group} This group. + * @return {this} This group. */ clear: function (removeFromScene, destroyChild) { @@ -24007,7 +24174,7 @@ var Group = new Class({ * @param {string} key - The string-based key of the animation to play. * @param {string} [startFrame=0] - Optionally start the animation playing from this frame index. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ playAnimation: function (key, startFrame) { @@ -24106,7 +24273,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ propertyValueSet: function (key, value, step, index, direction) { @@ -24127,7 +24294,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ propertyValueInc: function (key, value, step, index, direction) { @@ -24145,7 +24312,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setX: function (value, step) { @@ -24163,7 +24330,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setY: function (value, step) { @@ -24183,7 +24350,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setXY: function (x, y, stepX, stepY) { @@ -24201,7 +24368,7 @@ var Group = new Class({ * @param {number} value - The amount to be added to the `x` property. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incX: function (value, step) { @@ -24219,7 +24386,7 @@ var Group = new Class({ * @param {number} value - The amount to be added to the `y` property. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incY: function (value, step) { @@ -24239,7 +24406,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incXY: function (x, y, stepX, stepY) { @@ -24261,7 +24428,7 @@ var Group = new Class({ * @param {number} y - The y coordinate to place the first item in the array at. * @param {integer} [direction=0] - The iteration direction. 0 = first to last and 1 = last to first. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ shiftPosition: function (x, y, direction) { @@ -24279,7 +24446,7 @@ var Group = new Class({ * @param {number} value - The amount to set the angle to, in degrees. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ angle: function (value, step) { @@ -24297,7 +24464,7 @@ var Group = new Class({ * @param {number} value - The amount to set the rotation to, in radians. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotate: function (value, step) { @@ -24315,7 +24482,7 @@ var Group = new Class({ * @param {Phaser.Types.Math.Vector2Like} point - Any object with public `x` and `y` properties. * @param {number} angle - The angle to rotate by, in radians. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotateAround: function (point, angle) { @@ -24334,7 +24501,7 @@ var Group = new Class({ * @param {number} angle - The angle to rotate by, in radians. * @param {number} distance - The distance from the point of rotation in pixels. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotateAroundDistance: function (point, angle, distance) { @@ -24352,7 +24519,7 @@ var Group = new Class({ * @param {number} value - The amount to set the alpha to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setAlpha: function (value, step) { @@ -24372,7 +24539,7 @@ var Group = new Class({ * @param {number} [bottomLeft] - The tint to be applied to the bottom-left corner of item. * @param {number} [bottomRight] - The tint to be applied to the bottom-right corner of item. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setTint: function (topLeft, topRight, bottomLeft, bottomRight) { @@ -24392,7 +24559,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `originX` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `originY` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setOrigin: function (originX, originY, stepX, stepY) { @@ -24410,7 +24577,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleX: function (value, step) { @@ -24428,7 +24595,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleY: function (value, step) { @@ -24448,7 +24615,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `scaleY` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleXY: function (scaleX, scaleY, stepX, stepY) { @@ -24466,7 +24633,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setDepth: function (value, step) { @@ -24483,7 +24650,7 @@ var Group = new Class({ * * @param {number} value - The amount to set the property to. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setBlendMode: function (value) { @@ -24501,7 +24668,7 @@ var Group = new Class({ * @param {*} hitArea - 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 {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setHitArea: function (hitArea, hitAreaCallback) { @@ -24516,7 +24683,7 @@ var Group = new Class({ * @method Phaser.GameObjects.Group#shuffle * @since 3.21.0 * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ shuffle: function () { @@ -24568,7 +24735,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setVisible: function (value, index, direction) { @@ -24583,7 +24750,7 @@ var Group = new Class({ * @method Phaser.GameObjects.Group#toggleVisible * @since 3.0.0 * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ toggleVisible: function () { @@ -24624,7 +24791,7 @@ module.exports = Group; /***/ }), -/* 110 */ +/* 109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24634,442 +24801,123 @@ module.exports = Group; */ var Class = __webpack_require__(0); - -/** - * @callback EachSetCallback - * - * @param {E} entry - The Set entry. - * @param {number} index - The index of the entry within the Set. - * - * @return {?boolean} The callback result. - */ +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var ImageRender = __webpack_require__(996); /** * @classdesc - * A Set is a collection of unique elements. + * An Image Game Object. * - * @class Set - * @memberof Phaser.Structs + * 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. + * + * @class Image + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects * @constructor * @since 3.0.0 * - * @generic T - * @genericUse {T[]} - [elements] + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Size + * @extends Phaser.GameObjects.Components.TextureCrop + * @extends Phaser.GameObjects.Components.Tint + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible * - * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set. + * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. */ -var Set = new Class({ +var Image = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Size, + Components.TextureCrop, + Components.Tint, + Components.Transform, + Components.Visible, + ImageRender + ], initialize: - function Set (elements) + function Image (scene, x, y, texture, frame) { + GameObject.call(this, scene, 'Image'); + /** - * The entries of this Set. Stored internally as an array. + * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. * - * @genericUse {T[]} - [$type] - * - * @name Phaser.Structs.Set#entries - * @type {Array.<*>} - * @default [] - * @since 3.0.0 + * @name Phaser.GameObjects.Image#_crop + * @type {object} + * @private + * @since 3.11.0 */ - this.entries = []; - - if (Array.isArray(elements)) - { - for (var i = 0; i < elements.length; i++) - { - this.set(elements[i]); - } - } - }, - - /** - * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect. - * - * @method Phaser.Structs.Set#set - * @since 3.0.0 - * - * @genericUse {T} - [value] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {*} value - The value to insert into this Set. - * - * @return {Phaser.Structs.Set} This Set object. - */ - set: function (value) - { - if (this.entries.indexOf(value) === -1) - { - this.entries.push(value); - } - - return this; - }, - - /** - * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value. - * If no elements of this Set satisfy the condition then this method will return `null`. - * - * @method Phaser.Structs.Set#get - * @since 3.0.0 - * - * @genericUse {T} - [value,$return] - * - * @param {string} property - The property name to check on the elements of this Set. - * @param {*} value - The value to check for. - * - * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition. - */ - get: function (property, value) - { - for (var i = 0; i < this.entries.length; i++) - { - var entry = this.entries[i]; - - if (entry[property] === value) - { - return entry; - } - } - }, - - /** - * Returns an array containing all the values in this Set. - * - * @method Phaser.Structs.Set#getArray - * @since 3.0.0 - * - * @genericUse {T[]} - [$return] - * - * @return {Array.<*>} An array containing all the values in this Set. - */ - getArray: function () - { - return this.entries.slice(0); - }, - - /** - * Removes the given value from this Set if this Set contains that value. - * - * @method Phaser.Structs.Set#delete - * @since 3.0.0 - * - * @genericUse {T} - [value] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {*} value - The value to remove from the Set. - * - * @return {Phaser.Structs.Set} This Set object. - */ - delete: function (value) - { - var index = this.entries.indexOf(value); - - if (index > -1) - { - this.entries.splice(index, 1); - } - - return this; - }, - - /** - * Dumps the contents of this Set to the console via `console.group`. - * - * @method Phaser.Structs.Set#dump - * @since 3.0.0 - */ - dump: function () - { - // eslint-disable-next-line no-console - console.group('Set'); - - for (var i = 0; i < this.entries.length; i++) - { - var entry = this.entries[i]; - console.log(entry); - } - - // eslint-disable-next-line no-console - console.groupEnd(); - }, - - /** - * Passes each value in this Set to the given callback. - * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`. - * - * @method Phaser.Structs.Set#each - * @since 3.0.0 - * - * @genericUse {EachSetCallback.} - [callback] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. - * @param {*} [callbackScope] - The scope of the callback. - * - * @return {Phaser.Structs.Set} This Set object. - */ - each: function (callback, callbackScope) - { - var i; - var temp = this.entries.slice(); - var len = temp.length; - - if (callbackScope) - { - for (i = 0; i < len; i++) - { - if (callback.call(callbackScope, temp[i], i) === false) - { - break; - } - } - } - else - { - for (i = 0; i < len; i++) - { - if (callback(temp[i], i) === false) - { - break; - } - } - } - - return this; - }, - - /** - * Passes each value in this Set to the given callback. - * For when you absolutely know this Set won't be modified during the iteration. - * - * @method Phaser.Structs.Set#iterate - * @since 3.0.0 - * - * @genericUse {EachSetCallback.} - [callback] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. - * @param {*} [callbackScope] - The scope of the callback. - * - * @return {Phaser.Structs.Set} This Set object. - */ - iterate: function (callback, callbackScope) - { - var i; - var len = this.entries.length; - - if (callbackScope) - { - for (i = 0; i < len; i++) - { - if (callback.call(callbackScope, this.entries[i], i) === false) - { - break; - } - } - } - else - { - for (i = 0; i < len; i++) - { - if (callback(this.entries[i], i) === false) - { - break; - } - } - } - - return this; - }, - - /** - * Goes through each entry in this Set and invokes the given function on them, passing in the arguments. - * - * @method Phaser.Structs.Set#iterateLocal - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {string} callbackKey - The key of the function to be invoked on each Set entry. - * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. - * - * @return {Phaser.Structs.Set} This Set object. - */ - iterateLocal: function (callbackKey) - { - var i; - var args = []; - - for (i = 1; i < arguments.length; i++) - { - args.push(arguments[i]); - } - - var len = this.entries.length; - - for (i = 0; i < len; i++) - { - var entry = this.entries[i]; - - entry[callbackKey].apply(entry, args); - } - - return this; - }, - - /** - * Clears this Set so that it no longer contains any values. - * - * @method Phaser.Structs.Set#clear - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @return {Phaser.Structs.Set} This Set object. - */ - clear: function () - { - this.entries.length = 0; - - return this; - }, - - /** - * Returns `true` if this Set contains the given value, otherwise returns `false`. - * - * @method Phaser.Structs.Set#contains - * @since 3.0.0 - * - * @genericUse {T} - [value] - * - * @param {*} value - The value to check for in this Set. - * - * @return {boolean} `true` if the given value was found in this Set, otherwise `false`. - */ - contains: function (value) - { - return (this.entries.indexOf(value) > -1); - }, - - /** - * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument. - * - * @method Phaser.Structs.Set#union - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to perform the union with. - * - * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument. - */ - union: function (set) - { - var newSet = new Set(); - - set.entries.forEach(function (value) - { - newSet.set(value); - }); - - this.entries.forEach(function (value) - { - newSet.set(value); - }); - - return newSet; - }, - - /** - * Returns a new Set that contains only the values which are in this Set and that are also in the given Set. - * - * @method Phaser.Structs.Set#intersect - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to intersect this set with. - * - * @return {Phaser.Structs.Set} The result of the intersection, as a new Set. - */ - intersect: function (set) - { - var newSet = new Set(); - - this.entries.forEach(function (value) - { - if (set.contains(value)) - { - newSet.set(value); - } - }); - - return newSet; - }, - - /** - * Returns a new Set containing all the values in this Set which are *not* also in the given Set. - * - * @method Phaser.Structs.Set#difference - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to perform the difference with. - * - * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method. - */ - difference: function (set) - { - var newSet = new Set(); - - this.entries.forEach(function (value) - { - if (!set.contains(value)) - { - newSet.set(value); - } - }); - - return newSet; - }, - - /** - * The size of this Set. This is the number of entries within it. - * Changing the size will truncate the Set if the given value is smaller than the current size. - * Increasing the size larger than the current size has no effect. - * - * @name Phaser.Structs.Set#size - * @type {integer} - * @since 3.0.0 - */ - size: { - - get: function () - { - return this.entries.length; - }, - - set: function (value) - { - if (value < this.entries.length) - { - return this.entries.length = value; - } - else - { - return this.entries.length; - } - } + this._crop = this.resetCropObject(); + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.setOriginFromFrame(); + this.initPipeline(); } }); -module.exports = Set; +module.exports = Image; + + +/***/ }), +/* 110 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Determine whether the source object has a property with the specified key. + * + * @function Phaser.Utils.Objects.HasValue + * @since 3.0.0 + * + * @param {object} source - The source object to be checked. + * @param {string} key - The property to check for within the object + * + * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`. + */ +var HasValue = function (source, key) +{ + return (source.hasOwnProperty(key)); +}; + +module.exports = HasValue; /***/ }), @@ -25140,153 +24988,6 @@ module.exports = FillPathWebGL; /* 112 */ /***/ (function(module, exports) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Collision Types - Determine if and how entities collide with each other. - * - * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves, - * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE - * collisions, both entities are moved. LITE or PASSIVE entities don't collide - * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. - * FIXED collisions is undefined. - * - * @namespace Phaser.Physics.Impact.COLLIDES - * @memberof Phaser.Physics.Impact - * @since 3.0.0 - */ - -module.exports = { - - /** - * Never collides. - * - * @name Phaser.Physics.Impact.COLLIDES.NEVER - * @type {integer} - * @const - * @since 3.0.0 - */ - NEVER: 0, - - /** - * Lite collision. - * - * @name Phaser.Physics.Impact.COLLIDES.LITE - * @type {integer} - * @const - * @since 3.0.0 - */ - LITE: 1, - - /** - * Passive collision. - * - * @name Phaser.Physics.Impact.COLLIDES.PASSIVE - * @type {integer} - * @const - * @since 3.0.0 - */ - PASSIVE: 2, - - /** - * Active collision. - * - * @name Phaser.Physics.Impact.COLLIDES.ACTIVE - * @type {integer} - * @const - * @since 3.0.0 - */ - ACTIVE: 4, - - /** - * Fixed collision. - * - * @name Phaser.Physics.Impact.COLLIDES.FIXED - * @type {integer} - * @const - * @since 3.0.0 - */ - FIXED: 8 - -}; - - -/***/ }), -/* 113 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Collision Types - Determine if and how entities collide with each other. - * - * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves, - * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE - * collisions, both entities are moved. LITE or PASSIVE entities don't collide - * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. - * FIXED collisions is undefined. - * - * @namespace Phaser.Physics.Impact.TYPE - * @memberof Phaser.Physics.Impact - * @since 3.0.0 - */ -module.exports = { - - /** - * Collides with nothing. - * - * @name Phaser.Physics.Impact.TYPE.NONE - * @type {integer} - * @const - * @since 3.0.0 - */ - NONE: 0, - - /** - * Type A. Collides with Type B. - * - * @name Phaser.Physics.Impact.TYPE.A - * @type {integer} - * @const - * @since 3.0.0 - */ - A: 1, - - /** - * Type B. Collides with Type A. - * - * @name Phaser.Physics.Impact.TYPE.B - * @type {integer} - * @const - * @since 3.0.0 - */ - B: 2, - - /** - * Collides with both types A and B. - * - * @name Phaser.Physics.Impact.TYPE.BOTH - * @type {integer} - * @const - * @since 3.0.0 - */ - BOTH: 3 - -}; - - -/***/ }), -/* 114 */ -/***/ (function(module, exports) { - /** * The `Matter.Pair` module contains methods for creating and manipulating collision pairs. * @@ -25410,7 +25111,7 @@ module.exports = Pair; /***/ }), -/* 115 */ +/* 113 */ /***/ (function(module, exports) { /** @@ -25441,7 +25142,7 @@ module.exports = IsInLayerBounds; /***/ }), -/* 116 */ +/* 114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25451,7 +25152,7 @@ module.exports = IsInLayerBounds; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -25464,7 +25165,7 @@ var GetFastValue = __webpack_require__(1); * @constructor * @since 3.0.0 * - * @param {object} [config] - [description] + * @param {Phaser.Types.Tilemaps.LayerDataConfig} [config] - The Layer Data configuration object. */ var LayerData = new Class({ @@ -25484,7 +25185,7 @@ var LayerData = new Class({ this.name = GetFastValue(config, 'name', 'layer'); /** - * The x offset of where to draw from the top left + * The x offset of where to draw from the top left. * * @name Phaser.Tilemaps.LayerData#x * @type {number} @@ -25493,7 +25194,7 @@ var LayerData = new Class({ this.x = GetFastValue(config, 'x', 0); /** - * The y offset of where to draw from the top left + * The y offset of where to draw from the top left. * * @name Phaser.Tilemaps.LayerData#y * @type {number} @@ -25502,7 +25203,7 @@ var LayerData = new Class({ this.y = GetFastValue(config, 'y', 0); /** - * The width in tile of the layer. + * The width of the layer in tiles. * * @name Phaser.Tilemaps.LayerData#width * @type {number} @@ -25511,7 +25212,7 @@ var LayerData = new Class({ this.width = GetFastValue(config, 'width', 0); /** - * The height in tiles of the layer. + * The height of the layer in tiles. * * @name Phaser.Tilemaps.LayerData#height * @type {number} @@ -25538,7 +25239,7 @@ var LayerData = new Class({ this.tileHeight = GetFastValue(config, 'tileHeight', 0); /** - * [description] + * The base tile width. * * @name Phaser.Tilemaps.LayerData#baseTileWidth * @type {number} @@ -25547,7 +25248,7 @@ var LayerData = new Class({ this.baseTileWidth = GetFastValue(config, 'baseTileWidth', this.tileWidth); /** - * [description] + * The base tile height. * * @name Phaser.Tilemaps.LayerData#baseTileHeight * @type {number} @@ -25574,7 +25275,7 @@ var LayerData = new Class({ this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.baseTileHeight); /** - * [description] + * The alpha value of the layer. * * @name Phaser.Tilemaps.LayerData#alpha * @type {number} @@ -25583,7 +25284,7 @@ var LayerData = new Class({ this.alpha = GetFastValue(config, 'alpha', 1); /** - * [description] + * Is the layer visible or not? * * @name Phaser.Tilemaps.LayerData#visible * @type {boolean} @@ -25595,13 +25296,13 @@ var LayerData = new Class({ * Layer specific properties (can be specified in Tiled) * * @name Phaser.Tilemaps.LayerData#properties - * @type {object} + * @type {object[]} * @since 3.0.0 */ - this.properties = GetFastValue(config, 'properties', {}); + this.properties = GetFastValue(config, 'properties', []); /** - * [description] + * Tile ID index map. * * @name Phaser.Tilemaps.LayerData#indexes * @type {array} @@ -25610,7 +25311,7 @@ var LayerData = new Class({ this.indexes = GetFastValue(config, 'indexes', []); /** - * [description] + * Tile Collision ID index map. * * @name Phaser.Tilemaps.LayerData#collideIndexes * @type {array} @@ -25619,7 +25320,7 @@ var LayerData = new Class({ this.collideIndexes = GetFastValue(config, 'collideIndexes', []); /** - * [description] + * An array of callbacks. * * @name Phaser.Tilemaps.LayerData#callbacks * @type {array} @@ -25628,7 +25329,7 @@ var LayerData = new Class({ this.callbacks = GetFastValue(config, 'callbacks', []); /** - * [description] + * An array of physics bodies. * * @name Phaser.Tilemaps.LayerData#bodies * @type {array} @@ -25637,7 +25338,7 @@ var LayerData = new Class({ this.bodies = GetFastValue(config, 'bodies', []); /** - * An array of the tile indexes + * An array of the tile data indexes. * * @name Phaser.Tilemaps.LayerData#data * @type {Phaser.Tilemaps.Tile[][]} @@ -25646,7 +25347,7 @@ var LayerData = new Class({ this.data = GetFastValue(config, 'data', []); /** - * [description] + * A reference to the Tilemap layer that owns this data. * * @name Phaser.Tilemaps.LayerData#tilemapLayer * @type {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} @@ -25661,7 +25362,7 @@ module.exports = LayerData; /***/ }), -/* 117 */ +/* 115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25671,7 +25372,7 @@ module.exports = LayerData; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -25767,7 +25468,7 @@ var MapData = new Class({ this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.tileHeight); /** - * [description] + * The format of the map data. * * @name Phaser.Tilemaps.MapData#format * @type {integer} @@ -25871,7 +25572,7 @@ var MapData = new Class({ this.imageCollections = GetFastValue(config, 'imageCollections', []); /** - * [description] + * An array of tile instances. * * @name Phaser.Tilemaps.MapData#tiles * @type {array} @@ -25886,7 +25587,7 @@ module.exports = MapData; /***/ }), -/* 118 */ +/* 116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25895,14 +25596,418 @@ module.exports = MapData; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(43); -var Circle = __webpack_require__(71); +var Class = __webpack_require__(0); + +/** + * @classdesc + * A Tileset is a combination of an image containing the tiles and a container for data about + * each tile. + * + * @class Tileset + * @memberof Phaser.Tilemaps + * @constructor + * @since 3.0.0 + * + * @param {string} name - The name of the tileset in the map data. + * @param {integer} firstgid - The first tile index this tileset contains. + * @param {integer} [tileWidth=32] - Width of each tile (in pixels). + * @param {integer} [tileHeight=32] - Height of each tile (in pixels). + * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels). + * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels). + * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset. + * These typically are custom properties created in Tiled when editing a tileset. + * @param {object} [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. + */ +var Tileset = new Class({ + + initialize: + + function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData) + { + if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; } + if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; } + if (tileMargin === undefined) { tileMargin = 0; } + if (tileSpacing === undefined) { tileSpacing = 0; } + if (tileProperties === undefined) { tileProperties = {}; } + if (tileData === undefined) { tileData = {}; } + + /** + * The name of the Tileset. + * + * @name Phaser.Tilemaps.Tileset#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The starting index of the first tile index this Tileset contains. + * + * @name Phaser.Tilemaps.Tileset#firstgid + * @type {integer} + * @since 3.0.0 + */ + this.firstgid = firstgid; + + /** + * The width of each tile (in pixels). Use setTileSize to change. + * + * @name Phaser.Tilemaps.Tileset#tileWidth + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileWidth = tileWidth; + + /** + * The height of each tile (in pixels). Use setTileSize to change. + * + * @name Phaser.Tilemaps.Tileset#tileHeight + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileHeight = tileHeight; + + /** + * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. + * + * @name Phaser.Tilemaps.Tileset#tileMargin + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileMargin = tileMargin; + + /** + * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. + * + * @name Phaser.Tilemaps.Tileset#tileSpacing + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileSpacing = tileSpacing; + + /** + * Tileset-specific properties per tile that are typically defined in the Tiled editor in the + * Tileset editor. + * + * @name Phaser.Tilemaps.Tileset#tileProperties + * @type {object} + * @since 3.0.0 + */ + this.tileProperties = tileProperties; + + /** + * 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. + * + * @name Phaser.Tilemaps.Tileset#tileData + * @type {object} + * @since 3.0.0 + */ + this.tileData = tileData; + + /** + * The cached image that contains the individual tiles. Use setImage to set. + * + * @name Phaser.Tilemaps.Tileset#image + * @type {?Phaser.Textures.Texture} + * @readonly + * @since 3.0.0 + */ + this.image = null; + + /** + * The gl texture used by the WebGL renderer. + * + * @name Phaser.Tilemaps.Tileset#glTexture + * @type {?WebGLTexture} + * @readonly + * @since 3.11.0 + */ + this.glTexture = null; + + /** + * The number of tile rows in the the tileset. + * + * @name Phaser.Tilemaps.Tileset#rows + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.rows = 0; + + /** + * The number of tile columns in the tileset. + * + * @name Phaser.Tilemaps.Tileset#columns + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.columns = 0; + + /** + * The total number of tiles in the tileset. + * + * @name Phaser.Tilemaps.Tileset#total + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.total = 0; + + /** + * 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}. + * + * @name Phaser.Tilemaps.Tileset#texCoordinates + * @type {object[]} + * @readonly + * @since 3.0.0 + */ + this.texCoordinates = []; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileProperties + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?(object|undefined)} + */ + getTileProperties: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.tileProperties[tileIndex - this.firstgid]; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileData + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object|undefined} + */ + getTileData: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.tileData[tileIndex - this.firstgid]; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object} + */ + getTileCollisionGroup: function (tileIndex) + { + var data = this.getTileData(tileIndex); + + return (data && data.objectgroup) ? data.objectgroup : null; + }, + + /** + * Returns true if and only if this Tileset contains the given tile index. + * + * @method Phaser.Tilemaps.Tileset#containsTileIndex + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {boolean} + */ + containsTileIndex: function (tileIndex) + { + return ( + tileIndex >= this.firstgid && + tileIndex < (this.firstgid + this.total) + ); + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object} Object in the form { x, y } representing the top-left UV coordinate + * within the Tileset image. + */ + getTileTextureCoordinates: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.texCoordinates[tileIndex - this.firstgid]; + }, + + /** + * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setImage + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The image that contains the tiles. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setImage: function (texture) + { + this.image = texture; + + this.glTexture = texture.get().source.glTexture; + + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + + return this; + }, + + /** + * Sets the tile width & height and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setTileSize + * @since 3.0.0 + * + * @param {integer} [tileWidth] - The width of a tile in pixels. + * @param {integer} [tileHeight] - The height of a tile in pixels. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setTileSize: function (tileWidth, tileHeight) + { + if (tileWidth !== undefined) { this.tileWidth = tileWidth; } + if (tileHeight !== undefined) { this.tileHeight = tileHeight; } + + if (this.image) + { + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + } + + return this; + }, + + /** + * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setSpacing + * @since 3.0.0 + * + * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels). + * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels). + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setSpacing: function (margin, spacing) + { + if (margin !== undefined) { this.tileMargin = margin; } + if (spacing !== undefined) { this.tileSpacing = spacing; } + + if (this.image) + { + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + } + + return this; + }, + + /** + * Updates tile texture coordinates and tileset data. + * + * @method Phaser.Tilemaps.Tileset#updateTileData + * @since 3.0.0 + * + * @param {integer} imageWidth - The (expected) width of the image to slice. + * @param {integer} imageHeight - The (expected) height of the image to slice. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + updateTileData: function (imageWidth, imageHeight) + { + var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing); + var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing); + + if (rowCount % 1 !== 0 || colCount % 1 !== 0) + { + console.warn('Image tile area not tile size multiple in: ' + this.name); + } + + // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated + // - hence the floor when calculating the rows/columns. + rowCount = Math.floor(rowCount); + colCount = Math.floor(colCount); + + this.rows = rowCount; + this.columns = colCount; + + // In Tiled, "empty" spaces in a tileset count as tiles and hence count towards the gid + this.total = rowCount * colCount; + + this.texCoordinates.length = 0; + + var tx = this.tileMargin; + var ty = this.tileMargin; + + for (var y = 0; y < this.rows; y++) + { + for (var x = 0; x < this.columns; x++) + { + this.texCoordinates.push({ x: tx, y: ty }); + tx += this.tileWidth + this.tileSpacing; + } + + tx = this.tileMargin; + ty += this.tileHeight + this.tileSpacing; + } + + return this; + } + +}); + +module.exports = Tileset; + + +/***/ }), +/* 117 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BlendModes = __webpack_require__(44); +var Circle = __webpack_require__(70); var CircleContains = __webpack_require__(60); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(53); +var RectangleContains = __webpack_require__(54); /** * @classdesc @@ -26047,7 +26152,7 @@ var Zone = new Class({ * @param {number} height - The height of this Game Object. * @param {boolean} [resizeInput=true] - If this Zone has a Rectangle for a hit area this argument will resize the hit area as well. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setSize: function (width, height, resizeInput) { @@ -26079,7 +26184,7 @@ var Zone = new Class({ * @param {number} width - The width of this Game Object. * @param {number} height - The height of this Game Object. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setDisplaySize: function (width, height) { @@ -26098,7 +26203,7 @@ var Zone = new Class({ * * @param {number} radius - The radius of the Circle that will form the Drop Zone. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setCircleDropZone: function (radius) { @@ -26115,7 +26220,7 @@ var Zone = new Class({ * @param {number} width - The width of the rectangle drop zone. * @param {number} height - The height of the rectangle drop zone. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setRectangleDropZone: function (width, height) { @@ -26131,7 +26236,7 @@ var Zone = new Class({ * @param {object} shape - A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape. * @param {Phaser.Types.Input.HitAreaCallback} callback - A function that will return `true` if the given x/y coords it is sent are within the shape. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setDropZone: function (shape, callback) { @@ -26199,7 +26304,7 @@ module.exports = Zone; /***/ }), -/* 119 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26214,30 +26319,30 @@ module.exports = Zone; module.exports = { - 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) + ADD_ANIMATION: __webpack_require__(556), + ANIMATION_COMPLETE: __webpack_require__(557), + ANIMATION_REPEAT: __webpack_require__(558), + ANIMATION_RESTART: __webpack_require__(559), + ANIMATION_START: __webpack_require__(560), + PAUSE_ALL: __webpack_require__(561), + REMOVE_ANIMATION: __webpack_require__(562), + RESUME_ALL: __webpack_require__(563), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(564), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(565), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(566), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(567), + SPRITE_ANIMATION_KEY_START: __webpack_require__(568), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(569), + SPRITE_ANIMATION_REPEAT: __webpack_require__(570), + SPRITE_ANIMATION_RESTART: __webpack_require__(571), + SPRITE_ANIMATION_START: __webpack_require__(572), + SPRITE_ANIMATION_UPDATE: __webpack_require__(573) }; /***/ }), -/* 120 */ +/* 119 */ /***/ (function(module, exports) { /** @@ -26265,7 +26370,7 @@ module.exports = Perimeter; /***/ }), -/* 121 */ +/* 120 */ /***/ (function(module, exports) { /** @@ -26394,7 +26499,7 @@ module.exports = Pipeline; /***/ }), -/* 122 */ +/* 121 */ /***/ (function(module, exports) { /** @@ -26434,6 +26539,87 @@ var Shuffle = function (array) module.exports = Shuffle; +/***/ }), +/* 122 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Back = __webpack_require__(320); +var Bounce = __webpack_require__(321); +var Circular = __webpack_require__(322); +var Cubic = __webpack_require__(323); +var Elastic = __webpack_require__(324); +var Expo = __webpack_require__(325); +var Linear = __webpack_require__(326); +var Quadratic = __webpack_require__(327); +var Quartic = __webpack_require__(328); +var Quintic = __webpack_require__(329); +var Sine = __webpack_require__(330); +var Stepped = __webpack_require__(331); + +// EaseMap +module.exports = { + + Power0: Linear, + Power1: Quadratic.Out, + Power2: Cubic.Out, + Power3: Quartic.Out, + Power4: Quintic.Out, + + Linear: Linear, + Quad: Quadratic.Out, + Cubic: Cubic.Out, + Quart: Quartic.Out, + Quint: Quintic.Out, + Sine: Sine.Out, + Expo: Expo.Out, + Circ: Circular.Out, + Elastic: Elastic.Out, + Back: Back.Out, + Bounce: Bounce.Out, + Stepped: Stepped, + + 'Quad.easeIn': Quadratic.In, + 'Cubic.easeIn': Cubic.In, + 'Quart.easeIn': Quartic.In, + 'Quint.easeIn': Quintic.In, + 'Sine.easeIn': Sine.In, + 'Expo.easeIn': Expo.In, + 'Circ.easeIn': Circular.In, + 'Elastic.easeIn': Elastic.In, + 'Back.easeIn': Back.In, + 'Bounce.easeIn': Bounce.In, + + 'Quad.easeOut': Quadratic.Out, + 'Cubic.easeOut': Cubic.Out, + 'Quart.easeOut': Quartic.Out, + 'Quint.easeOut': Quintic.Out, + 'Sine.easeOut': Sine.Out, + 'Expo.easeOut': Expo.Out, + 'Circ.easeOut': Circular.Out, + 'Elastic.easeOut': Elastic.Out, + 'Back.easeOut': Back.Out, + 'Bounce.easeOut': Bounce.Out, + + 'Quad.easeInOut': Quadratic.InOut, + 'Cubic.easeInOut': Cubic.InOut, + 'Quart.easeInOut': Quartic.InOut, + 'Quint.easeInOut': Quintic.InOut, + 'Sine.easeInOut': Sine.InOut, + 'Expo.easeInOut': Expo.InOut, + 'Circ.easeInOut': Circular.InOut, + 'Elastic.easeInOut': Elastic.InOut, + 'Back.easeInOut': Back.InOut, + 'Bounce.easeInOut': Bounce.InOut + +}; + + /***/ }), /* 123 */ /***/ (function(module, exports) { @@ -26634,7 +26820,7 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(752))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(751))) /***/ }), /* 125 */ @@ -26757,27 +26943,22 @@ module.exports = init(); */ /** - * Check whether the given values are fuzzily equal. + * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. - * - * @function Phaser.Math.Fuzzy.Equal + * @function Phaser.Math.FloatBetween * @since 3.0.0 * - * @param {number} a - The first value. - * @param {number} b - The second value. - * @param {number} [epsilon=0.0001] - The epsilon. + * @param {number} min - The lower bound for the float, inclusive. + * @param {number} max - The upper bound for the float exclusive. * - * @return {boolean} `true` if the values are fuzzily equal, otherwise `false`. + * @return {number} A random float within the given range. */ -var Equal = function (a, b, epsilon) +var FloatBetween = function (min, max) { - if (epsilon === undefined) { epsilon = 0.0001; } - - return Math.abs(a - b) < epsilon; + return Math.random() * (max - min) + min; }; -module.exports = Equal; +module.exports = FloatBetween; /***/ }), @@ -26837,6 +27018,775 @@ module.exports = { /***/ }), /* 129 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var Utils = __webpack_require__(10); + +/** + * @classdesc + * WebGLPipeline is a class that describes the way elements will be renderered + * in WebGL, specially focused on batching vertices (batching is not provided). + * Pipelines are mostly used for describing 2D rendering passes but it's + * flexible enough to be used for any type of rendering including 3D. + * Internally WebGLPipeline will handle things like compiling shaders, + * creating vertex buffers, assigning primitive topology and binding + * vertex attributes. + * + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - gl: Current WebGL context. + * - 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. + * - vertices: An optional buffer of vertices + * - attributes: An array describing the vertex attributes + * + * The vertex attributes properties are: + * - name : String - Name of the attribute in the vertex shader + * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 + * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) + * - normalized : boolean - Is the attribute normalized + * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C + * Here you can find more information of how to describe an attribute: + * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer + * + * @class WebGLPipeline + * @memberof Phaser.Renderer.WebGL + * @constructor + * @since 3.0.0 + * + * @param {object} config - The configuration object for this WebGL Pipeline, as described above. + */ +var WebGLPipeline = new Class({ + + initialize: + + function WebGLPipeline (config) + { + /** + * Name of the Pipeline. Used for identifying + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#name + * @type {string} + * @since 3.0.0 + */ + this.name = 'WebGLPipeline'; + + /** + * The Game which owns this WebGL Pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#game + * @type {Phaser.Game} + * @since 3.0.0 + */ + this.game = config.game; + + /** + * The canvas which this WebGL Pipeline renders to. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#view + * @type {HTMLCanvasElement} + * @since 3.0.0 + */ + this.view = config.game.canvas; + + /** + * Used to store the current game resolution + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution + * @type {number} + * @since 3.0.0 + */ + this.resolution = 1; + + /** + * Width of the current viewport + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#width + * @type {number} + * @since 3.0.0 + */ + this.width = 0; + + /** + * Height of the current viewport + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#height + * @type {number} + * @since 3.0.0 + */ + this.height = 0; + + /** + * The WebGL context this WebGL Pipeline uses. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#gl + * @type {WebGLRenderingContext} + * @since 3.0.0 + */ + this.gl = config.gl; + + /** + * How many vertices have been fed to the current pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.vertexCount = 0; + + /** + * The limit of vertices that the pipeline can hold + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity + * @type {integer} + * @since 3.0.0 + */ + this.vertexCapacity = config.vertexCapacity; + + /** + * The WebGL Renderer which owns this WebGL Pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.0.0 + */ + this.renderer = config.renderer; + + /** + * Raw byte buffer of vertices. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData + * @type {ArrayBuffer} + * @since 3.0.0 + */ + this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); + + /** + * The handle to a WebGL vertex buffer object. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer + * @type {WebGLBuffer} + * @since 3.0.0 + */ + this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); + + /** + * The handle to a WebGL program + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#program + * @type {WebGLProgram} + * @since 3.0.0 + */ + this.program = this.renderer.createProgram(config.vertShader, config.fragShader); + + /** + * Array of objects that describe the vertex attributes + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes + * @type {object} + * @since 3.0.0 + */ + this.attributes = config.attributes; + + /** + * The size in bytes of the vertex + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize + * @type {integer} + * @since 3.0.0 + */ + this.vertexSize = config.vertexSize; + + /** + * The primitive topology which the pipeline will use to submit draw calls + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#topology + * @type {integer} + * @since 3.0.0 + */ + this.topology = config.topology; + + /** + * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources + * to the GPU. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes + * @type {Uint8Array} + * @since 3.0.0 + */ + this.bytes = new Uint8Array(this.vertexData); + + /** + * This will store the amount of components of 32 bit length + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount + * @type {integer} + * @since 3.0.0 + */ + this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; + + /** + * Indicates if the current pipeline is active or not for this frame only. + * Reset in the onRender method. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#active + * @type {boolean} + * @since 3.10.0 + */ + this.active = false; + }, + + /** + * Called when the Game has fully booted and the Renderer has finished setting up. + * + * By this stage all Game level systems are now in place and you can perform any final + * tasks that the pipeline may need that relied on game systems such as the Texture Manager. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#boot + * @since 3.11.0 + */ + boot: function () + { + }, + + /** + * Adds a description of vertex attribute to the pipeline + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute + * @since 3.2.0 + * + * @param {string} name - Name of the vertex attribute + * @param {integer} size - Vertex component size + * @param {integer} type - Type of the attribute + * @param {boolean} normalized - Is the value normalized to a range + * @param {integer} offset - Byte offset to the beginning of the first element in the vertex + * + * @return {this} This WebGLPipeline instance. + */ + addAttribute: function (name, size, type, normalized, offset) + { + this.attributes.push({ + name: name, + size: size, + type: this.renderer.glFormats[type], + normalized: normalized, + offset: offset + }); + + this.vertexComponentCount = Utils.getComponentCount( + this.attributes, + this.gl + ); + return this; + }, + + /** + * Check if the current batch of vertices is full. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush + * @since 3.0.0 + * + * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. + */ + shouldFlush: function () + { + return (this.vertexCount >= this.vertexCapacity); + }, + + /** + * Resizes the properties used to describe the viewport + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#resize + * @since 3.0.0 + * + * @param {number} width - The new width of this WebGL Pipeline. + * @param {number} height - The new height of this WebGL Pipeline. + * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. + * + * @return {this} This WebGLPipeline instance. + */ + resize: function (width, height, resolution) + { + this.width = width * resolution; + this.height = height * resolution; + this.resolution = resolution; + + return this; + }, + + /** + * Binds the pipeline resources, including programs, vertex buffers and binds attributes + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#bind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + var gl = this.gl; + var vertexBuffer = this.vertexBuffer; + var attributes = this.attributes; + var program = this.program; + var renderer = this.renderer; + var vertexSize = this.vertexSize; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + } + else if (location !== -1) + { + gl.disableVertexAttribArray(location); + } + } + + return this; + }, + + /** + * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. + * + * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onBind: function () + { + // This is for updating uniform data it's called on each bind attempt. + return this; + }, + + /** + * Called before each frame is rendered, but after the canvas has been cleared. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPreRender: function () + { + // called once every frame + return this; + }, + + /** + * Called before a Scene's Camera is rendered. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. + * + * @return {this} This WebGLPipeline instance. + */ + onRender: function () + { + // called for each camera + return this; + }, + + /** + * Called after each frame has been completely rendered and snapshots have been taken. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPostRender: function () + { + // called once every frame + return this; + }, + + /** + * Uploads the vertex data and emits a draw call + * for the current batch of vertices. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#flush + * @since 3.0.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; + + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + gl.drawArrays(topology, 0, vertexCount); + + this.vertexCount = 0; + this.flushLocked = false; + + return this; + }, + + /** + * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + destroy: function () + { + var gl = this.gl; + + gl.deleteProgram(this.program); + gl.deleteBuffer(this.vertexBuffer); + + delete this.program; + delete this.vertexBuffer; + delete this.gl; + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new value of the `float` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1: function (name, x) + { + this.renderer.setFloat1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec2` uniform. + * @param {number} y - The new Y component of the `vec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2: function (name, x, y) + { + this.renderer.setFloat2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec3` uniform. + * @param {number} y - The new Y component of the `vec3` uniform. + * @param {number} z - The new Z component of the `vec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3: function (name, x, y, z) + { + this.renderer.setFloat3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - X component of the uniform + * @param {number} y - Y component of the uniform + * @param {number} z - Z component of the uniform + * @param {number} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4: function (name, x, y, z, w) + { + this.renderer.setFloat4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1v: function (name, arr) + { + this.renderer.setFloat1v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2v: function (name, arr) + { + this.renderer.setFloat2v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3v: function (name, arr) + { + this.renderer.setFloat3v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4v: function (name, arr) + { + this.renderer.setFloat4v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new value of the `int` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt1: function (name, x) + { + this.renderer.setInt1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec2` uniform. + * @param {integer} y - The new Y component of the `ivec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt2: function (name, x, y) + { + this.renderer.setInt2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec3` uniform. + * @param {integer} y - The new Y component of the `ivec3` uniform. + * @param {integer} z - The new Z component of the `ivec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt3: function (name, x, y, z) + { + this.renderer.setInt3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - X component of the uniform + * @param {integer} y - Y component of the uniform + * @param {integer} z - Z component of the uniform + * @param {integer} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setInt4: function (name, x, y, z, w) + { + this.renderer.setInt4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix2: function (name, transpose, matrix) + { + this.renderer.setMatrix2(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix3: function (name, transpose, matrix) + { + this.renderer.setMatrix3(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Should the matrix be transpose + * @param {Float32Array} matrix - Matrix data + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix4: function (name, transpose, matrix) + { + this.renderer.setMatrix4(this.program, name, transpose, matrix); + + return this; + } + +}); + +module.exports = WebGLPipeline; + + +/***/ }), +/* 130 */ /***/ (function(module, exports) { /** @@ -26894,7 +27844,7 @@ module.exports = AddToDOM; /***/ }), -/* 130 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26903,7 +27853,7 @@ module.exports = AddToDOM; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(85); +var SpliceOne = __webpack_require__(86); /** * Removes the given item, or array of items, from the array. @@ -26985,7 +27935,7 @@ module.exports = Remove; /***/ }), -/* 131 */ +/* 132 */ /***/ (function(module, exports) { /** @@ -27891,7 +28841,7 @@ module.exports = KeyCodes; /***/ }), -/* 132 */ +/* 133 */ /***/ (function(module, exports) { /** @@ -28014,7 +28964,7 @@ module.exports = CONST; /***/ }), -/* 133 */ +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28025,20 +28975,17 @@ module.exports = CONST; */ var Class = __webpack_require__(0); -var Clone = __webpack_require__(73); +var Clone = __webpack_require__(72); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(64); var GameEvents = __webpack_require__(21); -var NOOP = __webpack_require__(2); +var NOOP = __webpack_require__(1); +var GetAll = __webpack_require__(407); +var GetFirst = __webpack_require__(408); /** * @classdesc - * The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback. - * The audio file type and the encoding of those files are extremely important. - * - * Not all browsers can play all audio formats. - * - * There is a good guide to what's supported [here](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). + * Base class for other Sound Manager classes. * * @class BaseSoundManager * @extends Phaser.Events.EventEmitter @@ -28047,6 +28994,10 @@ var NOOP = __webpack_require__(2); * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. + * + * @see Phaser.Sound.HTML5AudioSoundManager + * @see Phaser.Sound.NoAudioSoundManager + * @see Phaser.Sound.WebAudioSoundManager */ var BaseSoundManager = new Class({ @@ -28166,22 +29117,8 @@ var BaseSoundManager = new Class({ */ this.unlocked = false; - game.events.on(GameEvents.BLUR, function () - { - if (this.pauseOnBlur) - { - this.onBlur(); - } - }, this); - - game.events.on(GameEvents.FOCUS, function () - { - if (this.pauseOnBlur) - { - this.onFocus(); - } - }, this); - + game.events.on(GameEvents.BLUR, this.onGameBlur, this); + game.events.on(GameEvents.FOCUS, this.onGameFocus, this); game.events.on(GameEvents.PRE_STEP, this.update, this); game.events.once(GameEvents.DESTROY, this.destroy, this); }, @@ -28245,6 +29182,36 @@ var BaseSoundManager = new Class({ return sound; }, + /** + * Gets the first sound in the manager matching the given key, if any. + * + * @method Phaser.Sound.BaseSoundManager#get + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {?Phaser.Sound.BaseSound} - The sound, or null. + */ + get: function (key) + { + return GetFirst(this.sounds, 'key', key); + }, + + /** + * Gets any sounds in the manager matching the given key. + * + * @method Phaser.Sound.BaseSoundManager#getAll + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {Phaser.Sound.BaseSound[]} - The sounds, or an empty array. + */ + getAll: function (key) + { + return GetAll(this.sounds, 'key', key); + }, + /** * Adds a new sound to the sound manager and plays it. * The sound will be automatically removed (destroyed) once playback ends. @@ -28285,8 +29252,9 @@ var BaseSoundManager = new Class({ }, /** - * Enables playing audio sprite sound on the fly without the need to keep a reference to it. - * Sound will auto destroy once its playback ends. + * Adds a new audio sprite sound to the sound manager and plays it. + * The sprite 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#playAudioSprite * @listens Phaser.Sound.Events#COMPLETE @@ -28334,6 +29302,23 @@ var BaseSoundManager = new Class({ return false; }, + + /** + * Removes all sounds from the manager, destroying the sounds. + * + * @method Phaser.Sound.BaseSoundManager#removeAll + * @since 3.23.0 + */ + removeAll: function () + { + this.sounds.forEach(function (sound) + { + sound.destroy(); + }); + + this.sounds.length = 0; + }, + /** * Removes all sounds from the sound manager that have an asset key matching the given value. * The removed sounds are destroyed before removal. @@ -28417,6 +29402,29 @@ var BaseSoundManager = new Class({ this.emit(Events.STOP_ALL, this); }, + + /** + * Stops any sounds matching the given key. + * + * @method Phaser.Sound.BaseSoundManager#stopByKey + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {number} - How many sounds were stopped. + */ + stopByKey: function (key) + { + var stopped = 0; + + this.getAll(key).forEach(function (sound) + { + if (sound.stop()) { stopped++; } + }); + + return stopped; + }, + /** * Method used internally for unlocking audio playback on devices that * require user interaction before any sound can be played on a web page. @@ -28452,6 +29460,36 @@ var BaseSoundManager = new Class({ */ onFocus: NOOP, + /** + * Internal handler for Phaser.Core.Events#BLUR. + * + * @method Phaser.Sound.BaseSoundManager#onGameBlur + * @private + * @since 3.23.0 + */ + onGameBlur: function () + { + if (this.pauseOnBlur) + { + this.onBlur(); + } + }, + + /** + * Internal handler for Phaser.Core.Events#FOCUS. + * + * @method Phaser.Sound.BaseSoundManager#onGameFocus + * @private + * @since 3.23.0 + */ + onGameFocus: function () + { + if (this.pauseOnBlur) + { + this.onFocus(); + } + }, + /** * Update method called on every game step. * Removes destroyed sounds and updates every active sound in the game. @@ -28496,12 +29534,13 @@ var BaseSoundManager = new Class({ */ destroy: function () { + this.game.events.off(GameEvents.BLUR, this.onGameBlur, this); + this.game.events.off(GameEvents.FOCUS, this.onGameFocus, this); + this.game.events.off(GameEvents.PRE_STEP, this.update, this); + this.removeAllListeners(); - this.forEachActiveSound(function (sound) - { - sound.destroy(); - }); + this.removeAll(); this.sounds.length = 0; this.sounds = null; @@ -28639,7 +29678,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 134 */ +/* 135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28652,8 +29691,8 @@ module.exports = BaseSoundManager; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(64); -var Extend = __webpack_require__(17); -var NOOP = __webpack_require__(2); +var Extend = __webpack_require__(18); +var NOOP = __webpack_require__(1); /** * @classdesc @@ -29139,7 +30178,7 @@ module.exports = BaseSound; /***/ }), -/* 135 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29150,8 +30189,8 @@ module.exports = BaseSound; var ArrayUtils = __webpack_require__(196); var Class = __webpack_require__(0); -var NOOP = __webpack_require__(2); -var StableSort = __webpack_require__(137); +var NOOP = __webpack_require__(1); +var StableSort = __webpack_require__(138); /** * @callback EachListCallback @@ -29955,7 +30994,7 @@ module.exports = List; /***/ }), -/* 136 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29965,7 +31004,7 @@ module.exports = List; */ var CheckMatrix = __webpack_require__(197); -var TransposeMatrix = __webpack_require__(413); +var TransposeMatrix = __webpack_require__(416); /** * Rotates the array matrix based on the given rotation value. @@ -30027,7 +31066,7 @@ module.exports = RotateMatrix; /***/ }), -/* 137 */ +/* 138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30172,7 +31211,7 @@ else {} })(); /***/ }), -/* 138 */ +/* 139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30183,11 +31222,11 @@ else {} var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var GetBitmapTextSize = __webpack_require__(975); -var ParseFromAtlas = __webpack_require__(976); +var GameObject = __webpack_require__(13); +var GetBitmapTextSize = __webpack_require__(971); +var ParseFromAtlas = __webpack_require__(972); var ParseXMLBitmapFont = __webpack_require__(200); -var Render = __webpack_require__(977); +var Render = __webpack_require__(973); /** * @classdesc @@ -30901,7 +31940,456 @@ module.exports = BitmapText; /***/ }), -/* 139 */ +/* 140 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @callback EachSetCallback + * + * @param {E} entry - The Set entry. + * @param {number} index - The index of the entry within the Set. + * + * @return {?boolean} The callback result. + */ + +/** + * @classdesc + * A Set is a collection of unique elements. + * + * @class Set + * @memberof Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [elements] + * + * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set. + */ +var Set = new Class({ + + initialize: + + function Set (elements) + { + /** + * The entries of this Set. Stored internally as an array. + * + * @genericUse {T[]} - [$type] + * + * @name Phaser.Structs.Set#entries + * @type {Array.<*>} + * @default [] + * @since 3.0.0 + */ + this.entries = []; + + if (Array.isArray(elements)) + { + for (var i = 0; i < elements.length; i++) + { + this.set(elements[i]); + } + } + }, + + /** + * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect. + * + * @method Phaser.Structs.Set#set + * @since 3.0.0 + * + * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {*} value - The value to insert into this Set. + * + * @return {Phaser.Structs.Set} This Set object. + */ + set: function (value) + { + if (this.entries.indexOf(value) === -1) + { + this.entries.push(value); + } + + return this; + }, + + /** + * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value. + * If no elements of this Set satisfy the condition then this method will return `null`. + * + * @method Phaser.Structs.Set#get + * @since 3.0.0 + * + * @genericUse {T} - [value,$return] + * + * @param {string} property - The property name to check on the elements of this Set. + * @param {*} value - The value to check for. + * + * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition. + */ + get: function (property, value) + { + for (var i = 0; i < this.entries.length; i++) + { + var entry = this.entries[i]; + + if (entry[property] === value) + { + return entry; + } + } + }, + + /** + * Returns an array containing all the values in this Set. + * + * @method Phaser.Structs.Set#getArray + * @since 3.0.0 + * + * @genericUse {T[]} - [$return] + * + * @return {Array.<*>} An array containing all the values in this Set. + */ + getArray: function () + { + return this.entries.slice(0); + }, + + /** + * Removes the given value from this Set if this Set contains that value. + * + * @method Phaser.Structs.Set#delete + * @since 3.0.0 + * + * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {*} value - The value to remove from the Set. + * + * @return {Phaser.Structs.Set} This Set object. + */ + delete: function (value) + { + var index = this.entries.indexOf(value); + + if (index > -1) + { + this.entries.splice(index, 1); + } + + return this; + }, + + /** + * Dumps the contents of this Set to the console via `console.group`. + * + * @method Phaser.Structs.Set#dump + * @since 3.0.0 + */ + dump: function () + { + // eslint-disable-next-line no-console + console.group('Set'); + + for (var i = 0; i < this.entries.length; i++) + { + var entry = this.entries[i]; + console.log(entry); + } + + // eslint-disable-next-line no-console + console.groupEnd(); + }, + + /** + * Passes each value in this Set to the given callback. + * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`. + * + * @method Phaser.Structs.Set#each + * @since 3.0.0 + * + * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. + * @param {*} [callbackScope] - The scope of the callback. + * + * @return {Phaser.Structs.Set} This Set object. + */ + each: function (callback, callbackScope) + { + var i; + var temp = this.entries.slice(); + var len = temp.length; + + if (callbackScope) + { + for (i = 0; i < len; i++) + { + if (callback.call(callbackScope, temp[i], i) === false) + { + break; + } + } + } + else + { + for (i = 0; i < len; i++) + { + if (callback(temp[i], i) === false) + { + break; + } + } + } + + return this; + }, + + /** + * Passes each value in this Set to the given callback. + * For when you absolutely know this Set won't be modified during the iteration. + * + * @method Phaser.Structs.Set#iterate + * @since 3.0.0 + * + * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. + * @param {*} [callbackScope] - The scope of the callback. + * + * @return {Phaser.Structs.Set} This Set object. + */ + iterate: function (callback, callbackScope) + { + var i; + var len = this.entries.length; + + if (callbackScope) + { + for (i = 0; i < len; i++) + { + if (callback.call(callbackScope, this.entries[i], i) === false) + { + break; + } + } + } + else + { + for (i = 0; i < len; i++) + { + if (callback(this.entries[i], i) === false) + { + break; + } + } + } + + return this; + }, + + /** + * Goes through each entry in this Set and invokes the given function on them, passing in the arguments. + * + * @method Phaser.Structs.Set#iterateLocal + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {string} callbackKey - The key of the function to be invoked on each Set entry. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {Phaser.Structs.Set} This Set object. + */ + iterateLocal: function (callbackKey) + { + var i; + var args = []; + + for (i = 1; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + var len = this.entries.length; + + for (i = 0; i < len; i++) + { + var entry = this.entries[i]; + + entry[callbackKey].apply(entry, args); + } + + return this; + }, + + /** + * Clears this Set so that it no longer contains any values. + * + * @method Phaser.Structs.Set#clear + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @return {Phaser.Structs.Set} This Set object. + */ + clear: function () + { + this.entries.length = 0; + + return this; + }, + + /** + * Returns `true` if this Set contains the given value, otherwise returns `false`. + * + * @method Phaser.Structs.Set#contains + * @since 3.0.0 + * + * @genericUse {T} - [value] + * + * @param {*} value - The value to check for in this Set. + * + * @return {boolean} `true` if the given value was found in this Set, otherwise `false`. + */ + contains: function (value) + { + return (this.entries.indexOf(value) > -1); + }, + + /** + * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument. + * + * @method Phaser.Structs.Set#union + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to perform the union with. + * + * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument. + */ + union: function (set) + { + var newSet = new Set(); + + set.entries.forEach(function (value) + { + newSet.set(value); + }); + + this.entries.forEach(function (value) + { + newSet.set(value); + }); + + return newSet; + }, + + /** + * Returns a new Set that contains only the values which are in this Set and that are also in the given Set. + * + * @method Phaser.Structs.Set#intersect + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to intersect this set with. + * + * @return {Phaser.Structs.Set} The result of the intersection, as a new Set. + */ + intersect: function (set) + { + var newSet = new Set(); + + this.entries.forEach(function (value) + { + if (set.contains(value)) + { + newSet.set(value); + } + }); + + return newSet; + }, + + /** + * Returns a new Set containing all the values in this Set which are *not* also in the given Set. + * + * @method Phaser.Structs.Set#difference + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to perform the difference with. + * + * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method. + */ + difference: function (set) + { + var newSet = new Set(); + + this.entries.forEach(function (value) + { + if (!set.contains(value)) + { + newSet.set(value); + } + }); + + return newSet; + }, + + /** + * The size of this Set. This is the number of entries within it. + * Changing the size will truncate the Set if the given value is smaller than the current size. + * Increasing the size larger than the current size has no effect. + * + * @name Phaser.Structs.Set#size + * @type {integer} + * @since 3.0.0 + */ + size: { + + get: function () + { + return this.entries.length; + }, + + set: function (value) + { + if (value < this.entries.length) + { + return this.entries.length = value; + } + else + { + return this.entries.length; + } + } + + } + +}); + +module.exports = Set; + + +/***/ }), +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30912,9 +32400,9 @@ module.exports = BitmapText; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1102); -var NOOP = __webpack_require__(2); +var GameObject = __webpack_require__(13); +var MeshRender = __webpack_require__(1103); +var NOOP = __webpack_require__(1); /** * @classdesc @@ -31072,7 +32560,7 @@ module.exports = Mesh; /***/ }), -/* 140 */ +/* 142 */ /***/ (function(module, exports) { /** @@ -31110,7 +32598,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 141 */ +/* 143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31218,7 +32706,7 @@ module.exports = InputPluginCache; /***/ }), -/* 142 */ +/* 144 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31233,19 +32721,19 @@ module.exports = InputPluginCache; module.exports = { - 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) + ANY_KEY_DOWN: __webpack_require__(1243), + ANY_KEY_UP: __webpack_require__(1244), + COMBO_MATCH: __webpack_require__(1245), + DOWN: __webpack_require__(1246), + KEY_DOWN: __webpack_require__(1247), + KEY_UP: __webpack_require__(1248), + UP: __webpack_require__(1249) }; /***/ }), -/* 143 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -31286,7 +32774,7 @@ module.exports = GetURL; /***/ }), -/* 144 */ +/* 146 */ /***/ (function(module, exports) { /** @@ -31306,16 +32794,18 @@ module.exports = GetURL; * @param {string} [user=''] - Optional username for the XHR request. * @param {string} [password=''] - Optional password for the XHR request. * @param {integer} [timeout=0] - Optional XHR timeout value. + * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value. * * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader. */ -var XHRSettings = function (responseType, async, user, password, timeout) +var XHRSettings = function (responseType, async, user, password, timeout, withCredentials) { if (responseType === undefined) { responseType = ''; } if (async === undefined) { async = true; } if (user === undefined) { user = ''; } if (password === undefined) { password = ''; } if (timeout === undefined) { timeout = 0; } + if (withCredentials === undefined) { withCredentials = false; } // Before sending a request, set the xhr.responseType to "text", // "arraybuffer", "blob", or "document", depending on your data needs. @@ -31336,12 +32826,16 @@ var XHRSettings = function (responseType, async, user, password, timeout) timeout: timeout, // setRequestHeader + headers: undefined, header: undefined, headerValue: undefined, requestedWith: false, // overrideMimeType - overrideMimeType: undefined + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials }; }; @@ -31350,7 +32844,7 @@ module.exports = XHRSettings; /***/ }), -/* 145 */ +/* 147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31360,8 +32854,8 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(229); -var Sprite = __webpack_require__(65); +var Components = __webpack_require__(230); +var Sprite = __webpack_require__(74); /** * @classdesc @@ -31451,7 +32945,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 146 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31464,8 +32958,8 @@ var Axes = {}; module.exports = Axes; -var Vector = __webpack_require__(37); -var Common = __webpack_require__(19); +var Vector = __webpack_require__(36); +var Common = __webpack_require__(20); (function() { @@ -31521,7 +33015,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 147 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31536,24 +33030,24 @@ var Common = __webpack_require__(19); module.exports = { - 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) + Bounce: __webpack_require__(1321), + Collision: __webpack_require__(1322), + Force: __webpack_require__(1323), + Friction: __webpack_require__(1324), + Gravity: __webpack_require__(1325), + Mass: __webpack_require__(1326), + Static: __webpack_require__(1327), + Sensor: __webpack_require__(1328), + SetBody: __webpack_require__(1329), + Sleep: __webpack_require__(1330), + Transform: __webpack_require__(1347), + Velocity: __webpack_require__(1348) }; /***/ }), -/* 148 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31568,9 +33062,9 @@ var Detector = {}; module.exports = Detector; -var SAT = __webpack_require__(149); -var Pair = __webpack_require__(114); -var Bounds = __webpack_require__(38); +var SAT = __webpack_require__(151); +var Pair = __webpack_require__(112); +var Bounds = __webpack_require__(37); (function() { @@ -31666,7 +33160,7 @@ var Bounds = __webpack_require__(38); /***/ }), -/* 149 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31682,7 +33176,7 @@ var SAT = {}; module.exports = SAT; var Vertices = __webpack_require__(31); -var Vector = __webpack_require__(37); +var Vector = __webpack_require__(36); (function() { @@ -31942,7 +33436,7 @@ var Vector = __webpack_require__(37); /***/ }), -/* 150 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31957,54 +33451,54 @@ var Vector = __webpack_require__(37); module.exports = { - CalculateFacesAt: __webpack_require__(245), + CalculateFacesAt: __webpack_require__(244), 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), + Copy: __webpack_require__(1369), + CreateFromTiles: __webpack_require__(1370), + CullTiles: __webpack_require__(1371), + Fill: __webpack_require__(1372), + FilterTiles: __webpack_require__(1373), + FindByIndex: __webpack_require__(1374), + FindTile: __webpack_require__(1375), + ForEachTile: __webpack_require__(1376), + GetTileAt: __webpack_require__(153), + GetTileAtWorldXY: __webpack_require__(1377), GetTilesWithin: __webpack_require__(26), - 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) + GetTilesWithinShape: __webpack_require__(1378), + GetTilesWithinWorldXY: __webpack_require__(1379), + HasTileAt: __webpack_require__(510), + HasTileAtWorldXY: __webpack_require__(1380), + IsInLayerBounds: __webpack_require__(113), + PutTileAt: __webpack_require__(245), + PutTileAtWorldXY: __webpack_require__(1381), + PutTilesAt: __webpack_require__(1382), + Randomize: __webpack_require__(1383), + RemoveTileAt: __webpack_require__(511), + RemoveTileAtWorldXY: __webpack_require__(1384), + RenderDebug: __webpack_require__(1385), + ReplaceByIndex: __webpack_require__(509), + SetCollision: __webpack_require__(1386), + SetCollisionBetween: __webpack_require__(1387), + SetCollisionByExclusion: __webpack_require__(1388), + SetCollisionByProperty: __webpack_require__(1389), + SetCollisionFromCollisionGroup: __webpack_require__(1390), + SetTileIndexCallback: __webpack_require__(1391), + SetTileLocationCallback: __webpack_require__(1392), + Shuffle: __webpack_require__(1393), + SwapByIndex: __webpack_require__(1394), + TileToWorldX: __webpack_require__(154), + TileToWorldXY: __webpack_require__(1395), + TileToWorldY: __webpack_require__(155), + WeightedRandomize: __webpack_require__(1396), + WorldToTileX: __webpack_require__(68), + WorldToTileXY: __webpack_require__(1397), + WorldToTileY: __webpack_require__(69) }; /***/ }), -/* 151 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32013,7 +33507,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(115); +var IsInLayerBounds = __webpack_require__(113); /** * Gets a tile at the given tile coordinates from the given layer. @@ -32060,7 +33554,7 @@ module.exports = GetTileAt; /***/ }), -/* 152 */ +/* 154 */ /***/ (function(module, exports) { /** @@ -32105,7 +33599,7 @@ module.exports = TileToWorldX; /***/ }), -/* 153 */ +/* 155 */ /***/ (function(module, exports) { /** @@ -32150,411 +33644,7 @@ module.exports = TileToWorldY; /***/ }), -/* 154 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A Tileset is a combination of an image containing the tiles and a container for data about - * each tile. - * - * @class Tileset - * @memberof Phaser.Tilemaps - * @constructor - * @since 3.0.0 - * - * @param {string} name - The name of the tileset in the map data. - * @param {integer} firstgid - The first tile index this tileset contains. - * @param {integer} [tileWidth=32] - Width of each tile (in pixels). - * @param {integer} [tileHeight=32] - Height of each tile (in pixels). - * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels). - * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels). - * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset. - * These typically are custom properties created in Tiled when editing a tileset. - * @param {object} [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. - */ -var Tileset = new Class({ - - initialize: - - function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData) - { - if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; } - if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; } - if (tileMargin === undefined) { tileMargin = 0; } - if (tileSpacing === undefined) { tileSpacing = 0; } - if (tileProperties === undefined) { tileProperties = {}; } - if (tileData === undefined) { tileData = {}; } - - /** - * The name of the Tileset. - * - * @name Phaser.Tilemaps.Tileset#name - * @type {string} - * @since 3.0.0 - */ - this.name = name; - - /** - * The starting index of the first tile index this Tileset contains. - * - * @name Phaser.Tilemaps.Tileset#firstgid - * @type {integer} - * @since 3.0.0 - */ - this.firstgid = firstgid; - - /** - * The width of each tile (in pixels). Use setTileSize to change. - * - * @name Phaser.Tilemaps.Tileset#tileWidth - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileWidth = tileWidth; - - /** - * The height of each tile (in pixels). Use setTileSize to change. - * - * @name Phaser.Tilemaps.Tileset#tileHeight - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileHeight = tileHeight; - - /** - * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. - * - * @name Phaser.Tilemaps.Tileset#tileMargin - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileMargin = tileMargin; - - /** - * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. - * - * @name Phaser.Tilemaps.Tileset#tileSpacing - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileSpacing = tileSpacing; - - /** - * Tileset-specific properties per tile that are typically defined in the Tiled editor in the - * Tileset editor. - * - * @name Phaser.Tilemaps.Tileset#tileProperties - * @type {object} - * @since 3.0.0 - */ - this.tileProperties = tileProperties; - - /** - * 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. - * - * @name Phaser.Tilemaps.Tileset#tileData - * @type {object} - * @since 3.0.0 - */ - this.tileData = tileData; - - /** - * The cached image that contains the individual tiles. Use setImage to set. - * - * @name Phaser.Tilemaps.Tileset#image - * @type {?Phaser.Textures.Texture} - * @readonly - * @since 3.0.0 - */ - this.image = null; - - /** - * The gl texture used by the WebGL renderer. - * - * @name Phaser.Tilemaps.Tileset#glTexture - * @type {?WebGLTexture} - * @readonly - * @since 3.11.0 - */ - this.glTexture = null; - - /** - * The number of tile rows in the the tileset. - * - * @name Phaser.Tilemaps.Tileset#rows - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.rows = 0; - - /** - * The number of tile columns in the tileset. - * - * @name Phaser.Tilemaps.Tileset#columns - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.columns = 0; - - /** - * The total number of tiles in the tileset. - * - * @name Phaser.Tilemaps.Tileset#total - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.total = 0; - - /** - * 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}. - * - * @name Phaser.Tilemaps.Tileset#texCoordinates - * @type {object[]} - * @readonly - * @since 3.0.0 - */ - this.texCoordinates = []; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileProperties - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?(object|undefined)} - */ - getTileProperties: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.tileProperties[tileIndex - this.firstgid]; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileData - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object|undefined} - */ - getTileData: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.tileData[tileIndex - this.firstgid]; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object} - */ - getTileCollisionGroup: function (tileIndex) - { - var data = this.getTileData(tileIndex); - - return (data && data.objectgroup) ? data.objectgroup : null; - }, - - /** - * Returns true if and only if this Tileset contains the given tile index. - * - * @method Phaser.Tilemaps.Tileset#containsTileIndex - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {boolean} - */ - containsTileIndex: function (tileIndex) - { - return ( - tileIndex >= this.firstgid && - tileIndex < (this.firstgid + this.total) - ); - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object} Object in the form { x, y } representing the top-left UV coordinate - * within the Tileset image. - */ - getTileTextureCoordinates: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.texCoordinates[tileIndex - this.firstgid]; - }, - - /** - * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setImage - * @since 3.0.0 - * - * @param {Phaser.Textures.Texture} texture - The image that contains the tiles. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setImage: function (texture) - { - this.image = texture; - - this.glTexture = texture.get().source.glTexture; - - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - - return this; - }, - - /** - * Sets the tile width & height and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setTileSize - * @since 3.0.0 - * - * @param {integer} [tileWidth] - The width of a tile in pixels. - * @param {integer} [tileHeight] - The height of a tile in pixels. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setTileSize: function (tileWidth, tileHeight) - { - if (tileWidth !== undefined) { this.tileWidth = tileWidth; } - if (tileHeight !== undefined) { this.tileHeight = tileHeight; } - - if (this.image) - { - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - } - - return this; - }, - - /** - * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setSpacing - * @since 3.0.0 - * - * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels). - * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels). - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setSpacing: function (margin, spacing) - { - if (margin !== undefined) { this.tileMargin = margin; } - if (spacing !== undefined) { this.tileSpacing = spacing; } - - if (this.image) - { - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - } - - return this; - }, - - /** - * Updates tile texture coordinates and tileset data. - * - * @method Phaser.Tilemaps.Tileset#updateTileData - * @since 3.0.0 - * - * @param {integer} imageWidth - The (expected) width of the image to slice. - * @param {integer} imageHeight - The (expected) height of the image to slice. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - updateTileData: function (imageWidth, imageHeight) - { - var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing); - var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing); - - if (rowCount % 1 !== 0 || colCount % 1 !== 0) - { - console.warn('Image tile area not tile size multiple in: ' + this.name); - } - - // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated - // - hence the floor when calculating the rows/columns. - rowCount = Math.floor(rowCount); - colCount = Math.floor(colCount); - - this.rows = rowCount; - this.columns = colCount; - - // In Tiled, "empty" spaces in a tileset count as tiles and hence count towards the gid - this.total = rowCount * colCount; - - this.texCoordinates.length = 0; - - var tx = this.tileMargin; - var ty = this.tileMargin; - - for (var y = 0; y < this.rows; y++) - { - for (var x = 0; x < this.columns; x++) - { - this.texCoordinates.push({ x: tx, y: ty }); - tx += this.tileWidth + this.tileSpacing; - } - - tx = this.tileMargin; - ty += this.tileHeight + this.tileSpacing; - } - - return this; - } - -}); - -module.exports = Tileset; - - -/***/ }), -/* 155 */ +/* 156 */ /***/ (function(module, exports) { /** @@ -32618,7 +33708,7 @@ module.exports = GetNewValue; /***/ }), -/* 156 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32627,17 +33717,17 @@ module.exports = GetNewValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(255); +var Defaults = __webpack_require__(254); var GetAdvancedValue = __webpack_require__(15); -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 GetBoolean = __webpack_require__(97); +var GetEaseFunction = __webpack_require__(75); +var GetNewValue = __webpack_require__(156); +var GetProps = __webpack_require__(532); +var GetTargets = __webpack_require__(252); var GetValue = __webpack_require__(5); -var GetValueOp = __webpack_require__(254); -var Tween = __webpack_require__(256); -var TweenData = __webpack_require__(258); +var GetValueOp = __webpack_require__(253); +var Tween = __webpack_require__(255); +var TweenData = __webpack_require__(257); /** * Creates a new Tween. @@ -32751,7 +33841,7 @@ module.exports = TweenBuilder; /***/ }), -/* 157 */ +/* 158 */ /***/ (function(module, exports) { /** @@ -32805,7 +33895,7 @@ module.exports = ScaleModes; /***/ }), -/* 158 */ +/* 159 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32844,7 +33934,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 159 */ +/* 160 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32888,7 +33978,7 @@ module.exports = Random; /***/ }), -/* 160 */ +/* 161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32897,12 +33987,12 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(119); -var FindClosestInSorted = __webpack_require__(289); -var Frame = __webpack_require__(290); +var Events = __webpack_require__(118); +var FindClosestInSorted = __webpack_require__(288); +var Frame = __webpack_require__(289); var GetValue = __webpack_require__(5); /** @@ -33117,9 +34207,9 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#addFrame * @since 3.0.0 * - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description] + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ addFrame: function (config) { @@ -33133,9 +34223,9 @@ var Animation = new Class({ * @since 3.0.0 * * @param {integer} index - The index to insert the frame at within the animation. - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description] + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ addFrameAt: function (index, config) { @@ -33181,13 +34271,14 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when this Animation completes playback. + * Optionally, hides the parent Game Object, then stops playback. * * @method Phaser.Animations.Animation#completeAnimation * @protected * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ completeAnimation: function (component) { @@ -33200,14 +34291,15 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when this Animation first starts to play. + * Sets the accumulator and nextTick properties. * * @method Phaser.Animations.Animation#getFirstTick * @protected * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] - * @param {boolean} [includeDelay=true] - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. */ getFirstTick: function (component, includeDelay) { @@ -33240,16 +34332,16 @@ var Animation = new Class({ }, /** - * [description] + * Creates AnimationFrame instances based on the given frame data. * * @method Phaser.Animations.Animation#getFrames * @since 3.0.0 * - * @param {Phaser.Textures.TextureManager} textureManager - [description] - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - [description] - * @param {string} [defaultTextureKey] - [description] + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. * - * @return {Phaser.Animations.AnimationFrame[]} [description] + * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. */ getFrames: function (textureManager, frames, defaultTextureKey) { @@ -33342,12 +34434,12 @@ var Animation = new Class({ }, /** - * [description] + * Called internally. Sets the accumulator and nextTick values of the current Animation. * * @method Phaser.Animations.Animation#getNextTick * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ getNextTick: function (component) { @@ -33482,7 +34574,11 @@ var Animation = new Class({ if (component._reverse === !isReverse && component.repeatCounter > 0) { - component.forward = isReverse; + if (!component._repeatDelay || component.pendingRepeat) + + { + component.forward = isReverse; + } this.repeatAnimation(component); @@ -33517,12 +34613,13 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when the Animation is playing backwards. + * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. * * @method Phaser.Animations.Animation#previousFrame * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ previousFrame: function (component) { @@ -33580,14 +34677,15 @@ var Animation = new Class({ }, /** - * [description] + * Removes the given AnimationFrame from this Animation instance. + * This is a global action. Any Game Object using this Animation will be impacted by this change. * * @method Phaser.Animations.Animation#removeFrame * @since 3.0.0 * - * @param {Phaser.Animations.AnimationFrame} frame - [description] + * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ removeFrame: function (frame) { @@ -33610,7 +34708,7 @@ var Animation = new Class({ * * @param {integer} index - The index in the AnimationFrame array * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ removeFrameAt: function (index) { @@ -33622,7 +34720,8 @@ var Animation = new Class({ }, /** - * [description] + * Called internally during playback. Forces the animation to repeat, providing there are enough counts left + * in the repeat counter. * * @method Phaser.Animations.Animation#repeatAnimation * @fires Phaser.Animations.Events#ANIMATION_REPEAT @@ -33630,7 +34729,7 @@ var Animation = new Class({ * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ repeatAnimation: function (component) { @@ -33675,7 +34774,7 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#setFrame * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ setFrame: function (component) { @@ -33696,7 +34795,7 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#toJSON * @since 3.0.0 * - * @return {Phaser.Types.Animations.JSONAnimation} [description] + * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. */ toJSON: function () { @@ -33724,12 +34823,12 @@ var Animation = new Class({ }, /** - * [description] + * Called internally whenever frames are added to, or removed from, this Animation. * * @method Phaser.Animations.Animation#updateFrameSequence * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ updateFrameSequence: function () { @@ -33781,12 +34880,12 @@ var Animation = new Class({ }, /** - * [description] + * Pauses playback of this Animation. The paused state is set immediately. * * @method Phaser.Animations.Animation#pause * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ pause: function () { @@ -33796,12 +34895,12 @@ var Animation = new Class({ }, /** - * [description] + * Resumes playback of this Animation. The paused state is reset immediately. * * @method Phaser.Animations.Animation#resume * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ resume: function () { @@ -33811,7 +34910,9 @@ var Animation = new Class({ }, /** - * [description] + * Destroys this Animation instance. It will remove all event listeners, + * remove this animation and its key from the global Animation Manager, + * and then destroy all Animation Frames in turn. * * @method Phaser.Animations.Animation#destroy * @since 3.0.0 @@ -33841,7 +34942,7 @@ module.exports = Animation; /***/ }), -/* 161 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33850,22 +34951,26 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(120); +var Perimeter = __webpack_require__(119); var Point = __webpack_require__(4); /** - * Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right. + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. * * @function Phaser.Geom.Rectangle.GetPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rectangle - [description] - * @param {number} position - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. */ var GetPoint = function (rectangle, position, out) { @@ -33918,7 +35023,7 @@ module.exports = GetPoint; /***/ }), -/* 162 */ +/* 163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33955,7 +35060,7 @@ var GetPoints = function (line, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Length(line) / stepRate; } @@ -33983,7 +35088,7 @@ module.exports = GetPoints; /***/ }), -/* 163 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34023,7 +35128,7 @@ module.exports = Random; /***/ }), -/* 164 */ +/* 165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34061,7 +35166,7 @@ module.exports = Random; /***/ }), -/* 165 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34093,7 +35198,7 @@ module.exports = Wrap; /***/ }), -/* 166 */ +/* 167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34125,7 +35230,7 @@ module.exports = WrapDegrees; /***/ }), -/* 167 */ +/* 168 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34166,7 +35271,7 @@ module.exports = Random; /***/ }), -/* 168 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34178,17 +35283,17 @@ module.exports = Random; var Point = __webpack_require__(4); /** - * [description] + * Returns a random Point from within the area of the given Triangle. * * @function Phaser.Geom.Triangle.Random * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Triangle} triangle - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get a random point from. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of a random position within the Triangle. */ var Random = function (triangle, out) { @@ -34222,7 +35327,7 @@ module.exports = Random; /***/ }), -/* 169 */ +/* 170 */ /***/ (function(module, exports) { /** @@ -34234,16 +35339,20 @@ module.exports = Random; /** * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * * @function Phaser.Math.RotateAroundDistance * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * @param {number} distance - The distance from (x, y) to place the point at. * - * @return {Phaser.Geom.Point} The given point. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAroundDistance = function (point, x, y, angle, distance) { @@ -34259,7 +35368,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 170 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -34298,7 +35407,7 @@ module.exports = SmootherStep; /***/ }), -/* 171 */ +/* 172 */ /***/ (function(module, exports) { /** @@ -34345,7 +35454,7 @@ module.exports = SmoothStep; /***/ }), -/* 172 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34718,7 +35827,7 @@ module.exports = Map; /***/ }), -/* 173 */ +/* 174 */ /***/ (function(module, exports) { /** @@ -34750,7 +35859,7 @@ module.exports = Map; * @function Phaser.Utils.String.Pad * @since 3.0.0 * - * @param {string} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. + * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. * @param {integer} [len=0] - The number of characters to be added. * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). @@ -34794,7 +35903,7 @@ module.exports = Pad; /***/ }), -/* 174 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34803,10 +35912,10 @@ module.exports = Pad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(313); -var IntegerToColor = __webpack_require__(316); -var ObjectToColor = __webpack_require__(318); -var RGBStringToColor = __webpack_require__(319); +var HexStringToColor = __webpack_require__(312); +var IntegerToColor = __webpack_require__(315); +var ObjectToColor = __webpack_require__(317); +var RGBStringToColor = __webpack_require__(318); /** * Converts the given source color value into an instance of a Color class. @@ -34850,7 +35959,7 @@ module.exports = ValueToColor; /***/ }), -/* 175 */ +/* 176 */ /***/ (function(module, exports) { /** @@ -34880,7 +35989,7 @@ module.exports = GetColor; /***/ }), -/* 176 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34889,7 +35998,7 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(175); +var GetColor = __webpack_require__(176); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -34981,7 +36090,7 @@ module.exports = HSVToRGB; /***/ }), -/* 177 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -35113,7 +36222,7 @@ module.exports = Smoothing(); /***/ }), -/* 178 */ +/* 179 */ /***/ (function(module, exports) { /** @@ -35149,87 +36258,6 @@ var CenterOn = function (rect, x, y) module.exports = CenterOn; -/***/ }), -/* 179 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -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 = { - - Power0: Linear, - Power1: Quadratic.Out, - Power2: Cubic.Out, - Power3: Quartic.Out, - Power4: Quintic.Out, - - Linear: Linear, - Quad: Quadratic.Out, - Cubic: Cubic.Out, - Quart: Quartic.Out, - Quint: Quintic.Out, - Sine: Sine.Out, - Expo: Expo.Out, - Circ: Circular.Out, - Elastic: Elastic.Out, - Back: Back.Out, - Bounce: Bounce.Out, - Stepped: Stepped, - - 'Quad.easeIn': Quadratic.In, - 'Cubic.easeIn': Cubic.In, - 'Quart.easeIn': Quartic.In, - 'Quint.easeIn': Quintic.In, - 'Sine.easeIn': Sine.In, - 'Expo.easeIn': Expo.In, - 'Circ.easeIn': Circular.In, - 'Elastic.easeIn': Elastic.In, - 'Back.easeIn': Back.In, - 'Bounce.easeIn': Bounce.In, - - 'Quad.easeOut': Quadratic.Out, - 'Cubic.easeOut': Cubic.Out, - 'Quart.easeOut': Quartic.Out, - 'Quint.easeOut': Quintic.Out, - 'Sine.easeOut': Sine.Out, - 'Expo.easeOut': Expo.Out, - 'Circ.easeOut': Circular.Out, - 'Elastic.easeOut': Elastic.Out, - 'Back.easeOut': Back.Out, - 'Bounce.easeOut': Bounce.Out, - - 'Quad.easeInOut': Quadratic.InOut, - 'Cubic.easeInOut': Cubic.InOut, - 'Quart.easeInOut': Quartic.InOut, - 'Quint.easeInOut': Quintic.InOut, - 'Sine.easeInOut': Sine.InOut, - 'Expo.easeInOut': Expo.InOut, - 'Circ.easeInOut': Circular.InOut, - 'Elastic.easeInOut': Elastic.InOut, - 'Back.easeInOut': Back.InOut, - 'Bounce.easeInOut': Bounce.InOut - -}; - - /***/ }), /* 180 */ /***/ (function(module, exports, __webpack_require__) { @@ -35432,8 +36460,8 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(14); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Math @@ -35442,8 +36470,8 @@ var Extend = __webpack_require__(17); var PhaserMath = { // Collections of functions - Angle: __webpack_require__(757), - Distance: __webpack_require__(765), + Angle: __webpack_require__(756), + Distance: __webpack_require__(766), Easing: __webpack_require__(771), Fuzzy: __webpack_require__(772), Interpolation: __webpack_require__(775), @@ -35459,13 +36487,13 @@ var PhaserMath = { Between: __webpack_require__(183), CatmullRom: __webpack_require__(182), CeilTo: __webpack_require__(786), - Clamp: __webpack_require__(20), + Clamp: __webpack_require__(19), DegToRad: __webpack_require__(40), Difference: __webpack_require__(787), Factorial: __webpack_require__(342), - FloatBetween: __webpack_require__(348), + FloatBetween: __webpack_require__(126), FloorTo: __webpack_require__(788), - FromPercent: __webpack_require__(98), + FromPercent: __webpack_require__(95), GetSpeed: __webpack_require__(789), IsEven: __webpack_require__(790), IsEvenStrict: __webpack_require__(791), @@ -35477,26 +36505,26 @@ var PhaserMath = { 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), + Rotate: __webpack_require__(348), + RotateAround: __webpack_require__(294), + RotateAroundDistance: __webpack_require__(170), + RoundAwayFromZero: __webpack_require__(349), RoundTo: __webpack_require__(798), SinCosTableGenerator: __webpack_require__(799), - SmootherStep: __webpack_require__(170), - SmoothStep: __webpack_require__(171), + SmootherStep: __webpack_require__(171), + SmoothStep: __webpack_require__(172), ToXY: __webpack_require__(800), - TransformXY: __webpack_require__(351), + TransformXY: __webpack_require__(350), Within: __webpack_require__(801), Wrap: __webpack_require__(63), // Vector classes Vector2: __webpack_require__(3), Vector3: __webpack_require__(185), - Vector4: __webpack_require__(352), - Matrix3: __webpack_require__(353), - Matrix4: __webpack_require__(354), - Quaternion: __webpack_require__(355), + Vector4: __webpack_require__(351), + Matrix3: __webpack_require__(352), + Matrix4: __webpack_require__(353), + Quaternion: __webpack_require__(354), RotateVec3: __webpack_require__(802) }; @@ -35521,16 +36549,16 @@ module.exports = PhaserMath; */ /** - * Calculates a Catmull-Rom value. + * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5. * * @function Phaser.Math.CatmullRom * @since 3.0.0 * - * @param {number} t - [description] - * @param {number} p0 - [description] - * @param {number} p1 - [description] - * @param {number} p2 - [description] - * @param {number} p3 - [description] + * @param {number} t - The amount to interpolate by. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. * * @return {number} The Catmull-Rom value. */ @@ -35586,7 +36614,7 @@ module.exports = Between; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(14); /** * Convert the given angle in radians, to the equivalent angle in degrees. @@ -36531,783 +37559,14 @@ module.exports = DefaultPlugins; */ var Class = __webpack_require__(0); +var Earcut = __webpack_require__(71); +var GetFastValue = __webpack_require__(2); +var ModelViewProjection = __webpack_require__(188); +var ShaderSourceFS = __webpack_require__(364); +var ShaderSourceVS = __webpack_require__(365); +var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); - -/** - * @classdesc - * WebGLPipeline is a class that describes the way elements will be renderered - * in WebGL, specially focused on batching vertices (batching is not provided). - * Pipelines are mostly used for describing 2D rendering passes but it's - * flexible enough to be used for any type of rendering including 3D. - * Internally WebGLPipeline will handle things like compiling shaders, - * creating vertex buffers, assigning primitive topology and binding - * vertex attributes. - * - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - gl: Current WebGL context. - * - 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. - * - vertices: An optional buffer of vertices - * - attributes: An array describing the vertex attributes - * - * The vertex attributes properties are: - * - name : String - Name of the attribute in the vertex shader - * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 - * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) - * - normalized : boolean - Is the attribute normalized - * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C - * Here you can find more information of how to describe an attribute: - * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer - * - * @class WebGLPipeline - * @memberof Phaser.Renderer.WebGL - * @constructor - * @since 3.0.0 - * - * @param {object} config - The configuration object for this WebGL Pipeline, as described above. - */ -var WebGLPipeline = new Class({ - - initialize: - - function WebGLPipeline (config) - { - /** - * Name of the Pipeline. Used for identifying - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#name - * @type {string} - * @since 3.0.0 - */ - this.name = 'WebGLPipeline'; - - /** - * The Game which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#game - * @type {Phaser.Game} - * @since 3.0.0 - */ - this.game = config.game; - - /** - * The canvas which this WebGL Pipeline renders to. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#view - * @type {HTMLCanvasElement} - * @since 3.0.0 - */ - this.view = config.game.canvas; - - /** - * Used to store the current game resolution - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = 1; - - /** - * Width of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#width - * @type {number} - * @since 3.0.0 - */ - this.width = 0; - - /** - * Height of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#height - * @type {number} - * @since 3.0.0 - */ - this.height = 0; - - /** - * The WebGL context this WebGL Pipeline uses. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#gl - * @type {WebGLRenderingContext} - * @since 3.0.0 - */ - this.gl = config.gl; - - /** - * How many vertices have been fed to the current pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.vertexCount = 0; - - /** - * The limit of vertices that the pipeline can hold - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity - * @type {integer} - * @since 3.0.0 - */ - this.vertexCapacity = config.vertexCapacity; - - /** - * The WebGL Renderer which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer - * @type {Phaser.Renderer.WebGL.WebGLRenderer} - * @since 3.0.0 - */ - this.renderer = config.renderer; - - /** - * Raw byte buffer of vertices. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData - * @type {ArrayBuffer} - * @since 3.0.0 - */ - this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); - - /** - * The handle to a WebGL vertex buffer object. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer - * @type {WebGLBuffer} - * @since 3.0.0 - */ - this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); - - /** - * The handle to a WebGL program - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#program - * @type {WebGLProgram} - * @since 3.0.0 - */ - this.program = this.renderer.createProgram(config.vertShader, config.fragShader); - - /** - * Array of objects that describe the vertex attributes - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes - * @type {object} - * @since 3.0.0 - */ - this.attributes = config.attributes; - - /** - * The size in bytes of the vertex - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {integer} - * @since 3.0.0 - */ - this.vertexSize = config.vertexSize; - - /** - * The primitive topology which the pipeline will use to submit draw calls - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {integer} - * @since 3.0.0 - */ - this.topology = config.topology; - - /** - * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources - * to the GPU. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes - * @type {Uint8Array} - * @since 3.0.0 - */ - this.bytes = new Uint8Array(this.vertexData); - - /** - * This will store the amount of components of 32 bit length - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount - * @type {integer} - * @since 3.0.0 - */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); - - /** - * Indicates if the current pipeline is flushing the contents to the GPU. - * When the variable is set the flush function will be locked. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked - * @type {boolean} - * @since 3.1.0 - */ - this.flushLocked = false; - - /** - * Indicates if the current pipeline is active or not for this frame only. - * Reset in the onRender method. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#active - * @type {boolean} - * @since 3.10.0 - */ - this.active = false; - }, - - /** - * Called when the Game has fully booted and the Renderer has finished setting up. - * - * By this stage all Game level systems are now in place and you can perform any final - * tasks that the pipeline may need that relied on game systems such as the Texture Manager. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#boot - * @since 3.11.0 - */ - boot: function () - { - }, - - /** - * Adds a description of vertex attribute to the pipeline - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute - * @since 3.2.0 - * - * @param {string} name - Name of the vertex attribute - * @param {integer} size - Vertex component size - * @param {integer} type - Type of the attribute - * @param {boolean} normalized - Is the value normalized to a range - * @param {integer} offset - Byte offset to the beginning of the first element in the vertex - * - * @return {this} This WebGLPipeline instance. - */ - addAttribute: function (name, size, type, normalized, offset) - { - this.attributes.push({ - name: name, - size: size, - type: this.renderer.glFormats[type], - normalized: normalized, - offset: offset - }); - - this.vertexComponentCount = Utils.getComponentCount( - this.attributes, - this.gl - ); - return this; - }, - - /** - * Check if the current batch of vertices is full. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush - * @since 3.0.0 - * - * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. - */ - shouldFlush: function () - { - return (this.vertexCount >= this.vertexCapacity); - }, - - /** - * Resizes the properties used to describe the viewport - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width of this WebGL Pipeline. - * @param {number} height - The new height of this WebGL Pipeline. - * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - this.width = width * resolution; - this.height = height * resolution; - this.resolution = resolution; - - return this; - }, - - /** - * Binds the pipeline resources, including programs, vertex buffers and binds attributes - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#bind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - bind: function () - { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; - var renderer = this.renderer; - var vertexSize = this.vertexSize; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - } - else if (location !== -1) - { - gl.disableVertexAttribArray(location); - } - } - - return this; - }, - - /** - * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. - * - * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onBind: function () - { - // This is for updating uniform data it's called on each bind attempt. - return this; - }, - - /** - * Called before each frame is rendered, but after the canvas has been cleared. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPreRender: function () - { - // called once every frame - return this; - }, - - /** - * Called before a Scene's Camera is rendered. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. - * - * @return {this} This WebGLPipeline instance. - */ - onRender: function () - { - // called for each camera - return this; - }, - - /** - * Called after each frame has been completely rendered and snapshots have been taken. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPostRender: function () - { - // called once every frame - return this; - }, - - /** - * Uploads the vertex data and emits a draw call - * for the current batch of vertices. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#flush - * @since 3.0.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; - - if (vertexCount === 0) - { - this.flushLocked = false; - return; - } - - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - gl.drawArrays(topology, 0, vertexCount); - - this.vertexCount = 0; - this.flushLocked = false; - - return this; - }, - - /** - * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - destroy: function () - { - var gl = this.gl; - - gl.deleteProgram(this.program); - gl.deleteBuffer(this.vertexBuffer); - - delete this.program; - delete this.vertexBuffer; - delete this.gl; - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new value of the `float` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1: function (name, x) - { - this.renderer.setFloat1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec2` uniform. - * @param {number} y - The new Y component of the `vec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2: function (name, x, y) - { - this.renderer.setFloat2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec3` uniform. - * @param {number} y - The new Y component of the `vec3` uniform. - * @param {number} z - The new Z component of the `vec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3: function (name, x, y, z) - { - this.renderer.setFloat3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - X component of the uniform - * @param {number} y - Y component of the uniform - * @param {number} z - Z component of the uniform - * @param {number} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4: function (name, x, y, z, w) - { - this.renderer.setFloat4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1v: function (name, arr) - { - this.renderer.setFloat1v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2v: function (name, arr) - { - this.renderer.setFloat2v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3v: function (name, arr) - { - this.renderer.setFloat3v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4v: function (name, arr) - { - this.renderer.setFloat4v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new value of the `int` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt1: function (name, x) - { - this.renderer.setInt1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec2` uniform. - * @param {integer} y - The new Y component of the `ivec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt2: function (name, x, y) - { - this.renderer.setInt2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec3` uniform. - * @param {integer} y - The new Y component of the `ivec3` uniform. - * @param {integer} z - The new Z component of the `ivec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt3: function (name, x, y, z) - { - this.renderer.setInt3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - X component of the uniform - * @param {integer} y - Y component of the uniform - * @param {integer} z - Z component of the uniform - * @param {integer} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setInt4: function (name, x, y, z, w) - { - this.renderer.setInt4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix2: function (name, transpose, matrix) - { - this.renderer.setMatrix2(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix3: function (name, transpose, matrix) - { - this.renderer.setMatrix3(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Should the matrix be transpose - * @param {Float32Array} matrix - Matrix data - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix4: function (name, transpose, matrix) - { - this.renderer.setMatrix4(this.program, name, transpose, matrix); - - return this; - } - -}); - -module.exports = WebGLPipeline; - - -/***/ }), -/* 188 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Earcut = __webpack_require__(72); -var GetFastValue = __webpack_require__(1); -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__(187); +var WebGLPipeline = __webpack_require__(129); /** * @classdesc @@ -38796,6 +39055,756 @@ var TextureTintPipeline = new Class({ module.exports = TextureTintPipeline; +/***/ }), +/* 188 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Implements a model view projection matrices. + * Pipelines can implement this for doing 2D and 3D rendering. + * + * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection + * @since 3.0.0 + */ +var ModelViewProjection = { + + /** + * Dirty flag for checking if model matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + modelMatrixDirty: false, + + /** + * Dirty flag for checking if view matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + viewMatrixDirty: false, + + /** + * Dirty flag for checking if projection matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + projectionMatrixDirty: false, + + /** + * Model matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + modelMatrix: null, + + /** + * View matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + viewMatrix: null, + + /** + * Projection matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + projectionMatrix: null, + + /** + * Initializes MVP matrices with an identity matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit + * @since 3.0.0 + */ + mvpInit: function () + { + this.modelMatrixDirty = true; + this.viewMatrixDirty = true; + this.projectionMatrixDirty = true; + + 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 + ]); + + return this; + }, + + /** + * If dirty flags are set then the matrices are uploaded to the GPU. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate + * @since 3.0.0 + */ + mvpUpdate: function () + { + var program = this.program; + + if (this.modelMatrixDirty) + { + this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); + this.modelMatrixDirty = false; + } + + if (this.viewMatrixDirty) + { + this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); + this.viewMatrixDirty = false; + } + + if (this.projectionMatrixDirty) + { + this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); + this.projectionMatrixDirty = false; + } + + return this; + }, + + /** + * Loads an identity matrix to the model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity + * @since 3.0.0 + */ + modelIdentity: function () + { + var modelMatrix = this.modelMatrix; + + modelMatrix[0] = 1; + modelMatrix[1] = 0; + modelMatrix[2] = 0; + modelMatrix[3] = 0; + modelMatrix[4] = 0; + modelMatrix[5] = 1; + modelMatrix[6] = 0; + modelMatrix[7] = 0; + modelMatrix[8] = 0; + modelMatrix[9] = 0; + modelMatrix[10] = 1; + modelMatrix[11] = 0; + modelMatrix[12] = 0; + modelMatrix[13] = 0; + modelMatrix[14] = 0; + modelMatrix[15] = 1; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Scale model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + modelScale: function (x, y, z) + { + var modelMatrix = this.modelMatrix; + + modelMatrix[0] = modelMatrix[0] * x; + modelMatrix[1] = modelMatrix[1] * x; + modelMatrix[2] = modelMatrix[2] * x; + modelMatrix[3] = modelMatrix[3] * x; + modelMatrix[4] = modelMatrix[4] * y; + modelMatrix[5] = modelMatrix[5] * y; + modelMatrix[6] = modelMatrix[6] * y; + modelMatrix[7] = modelMatrix[7] * y; + modelMatrix[8] = modelMatrix[8] * z; + modelMatrix[9] = modelMatrix[9] * z; + modelMatrix[10] = modelMatrix[10] * z; + modelMatrix[11] = modelMatrix[11] * z; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Translate model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + modelTranslate: function (x, y, z) + { + var modelMatrix = this.modelMatrix; + + modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12]; + modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13]; + modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14]; + modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15]; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the X axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateX: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a10 = modelMatrix[4]; + var a11 = modelMatrix[5]; + var a12 = modelMatrix[6]; + var a13 = modelMatrix[7]; + var a20 = modelMatrix[8]; + var a21 = modelMatrix[9]; + var a22 = modelMatrix[10]; + var a23 = modelMatrix[11]; + + modelMatrix[4] = a10 * c + a20 * s; + modelMatrix[5] = a11 * c + a21 * s; + modelMatrix[6] = a12 * c + a22 * s; + modelMatrix[7] = a13 * c + a23 * s; + modelMatrix[8] = a20 * c - a10 * s; + modelMatrix[9] = a21 * c - a11 * s; + modelMatrix[10] = a22 * c - a12 * s; + modelMatrix[11] = a23 * c - a13 * s; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the Y axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateY: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = modelMatrix[0]; + var a01 = modelMatrix[1]; + var a02 = modelMatrix[2]; + var a03 = modelMatrix[3]; + var a20 = modelMatrix[8]; + var a21 = modelMatrix[9]; + var a22 = modelMatrix[10]; + var a23 = modelMatrix[11]; + + modelMatrix[0] = a00 * c - a20 * s; + modelMatrix[1] = a01 * c - a21 * s; + modelMatrix[2] = a02 * c - a22 * s; + modelMatrix[3] = a03 * c - a23 * s; + modelMatrix[8] = a00 * s + a20 * c; + modelMatrix[9] = a01 * s + a21 * c; + modelMatrix[10] = a02 * s + a22 * c; + modelMatrix[11] = a03 * s + a23 * c; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the Z axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateZ: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = modelMatrix[0]; + var a01 = modelMatrix[1]; + var a02 = modelMatrix[2]; + var a03 = modelMatrix[3]; + var a10 = modelMatrix[4]; + var a11 = modelMatrix[5]; + var a12 = modelMatrix[6]; + var a13 = modelMatrix[7]; + + modelMatrix[0] = a00 * c + a10 * s; + modelMatrix[1] = a01 * c + a11 * s; + modelMatrix[2] = a02 * c + a12 * s; + modelMatrix[3] = a03 * c + a13 * s; + modelMatrix[4] = a10 * c - a00 * s; + modelMatrix[5] = a11 * c - a01 * s; + modelMatrix[6] = a12 * c - a02 * s; + modelMatrix[7] = a13 * c - a03 * s; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Loads identity matrix into the view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity + * @since 3.0.0 + * + * @return {this} This Model View Projection. + */ + viewIdentity: function () + { + var viewMatrix = this.viewMatrix; + + viewMatrix[0] = 1; + viewMatrix[1] = 0; + viewMatrix[2] = 0; + viewMatrix[3] = 0; + viewMatrix[4] = 0; + viewMatrix[5] = 1; + viewMatrix[6] = 0; + viewMatrix[7] = 0; + viewMatrix[8] = 0; + viewMatrix[9] = 0; + viewMatrix[10] = 1; + viewMatrix[11] = 0; + viewMatrix[12] = 0; + viewMatrix[13] = 0; + viewMatrix[14] = 0; + viewMatrix[15] = 1; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Scales view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + viewScale: function (x, y, z) + { + var viewMatrix = this.viewMatrix; + + viewMatrix[0] = viewMatrix[0] * x; + viewMatrix[1] = viewMatrix[1] * x; + viewMatrix[2] = viewMatrix[2] * x; + viewMatrix[3] = viewMatrix[3] * x; + viewMatrix[4] = viewMatrix[4] * y; + viewMatrix[5] = viewMatrix[5] * y; + viewMatrix[6] = viewMatrix[6] * y; + viewMatrix[7] = viewMatrix[7] * y; + viewMatrix[8] = viewMatrix[8] * z; + viewMatrix[9] = viewMatrix[9] * z; + viewMatrix[10] = viewMatrix[10] * z; + viewMatrix[11] = viewMatrix[11] * z; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Translates view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + viewTranslate: function (x, y, z) + { + var viewMatrix = this.viewMatrix; + + viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12]; + viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13]; + viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14]; + viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15]; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the X axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateX: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a10 = viewMatrix[4]; + var a11 = viewMatrix[5]; + var a12 = viewMatrix[6]; + var a13 = viewMatrix[7]; + var a20 = viewMatrix[8]; + var a21 = viewMatrix[9]; + var a22 = viewMatrix[10]; + var a23 = viewMatrix[11]; + + viewMatrix[4] = a10 * c + a20 * s; + viewMatrix[5] = a11 * c + a21 * s; + viewMatrix[6] = a12 * c + a22 * s; + viewMatrix[7] = a13 * c + a23 * s; + viewMatrix[8] = a20 * c - a10 * s; + viewMatrix[9] = a21 * c - a11 * s; + viewMatrix[10] = a22 * c - a12 * s; + viewMatrix[11] = a23 * c - a13 * s; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the Y axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateY: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = viewMatrix[0]; + var a01 = viewMatrix[1]; + var a02 = viewMatrix[2]; + var a03 = viewMatrix[3]; + var a20 = viewMatrix[8]; + var a21 = viewMatrix[9]; + var a22 = viewMatrix[10]; + var a23 = viewMatrix[11]; + + viewMatrix[0] = a00 * c - a20 * s; + viewMatrix[1] = a01 * c - a21 * s; + viewMatrix[2] = a02 * c - a22 * s; + viewMatrix[3] = a03 * c - a23 * s; + viewMatrix[8] = a00 * s + a20 * c; + viewMatrix[9] = a01 * s + a21 * c; + viewMatrix[10] = a02 * s + a22 * c; + viewMatrix[11] = a03 * s + a23 * c; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the Z axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateZ: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = viewMatrix[0]; + var a01 = viewMatrix[1]; + var a02 = viewMatrix[2]; + var a03 = viewMatrix[3]; + var a10 = viewMatrix[4]; + var a11 = viewMatrix[5]; + var a12 = viewMatrix[6]; + var a13 = viewMatrix[7]; + + viewMatrix[0] = a00 * c + a10 * s; + viewMatrix[1] = a01 * c + a11 * s; + viewMatrix[2] = a02 * c + a12 * s; + viewMatrix[3] = a03 * c + a13 * s; + viewMatrix[4] = a10 * c - a00 * s; + viewMatrix[5] = a11 * c - a01 * s; + viewMatrix[6] = a12 * c - a02 * s; + viewMatrix[7] = a13 * c - a03 * s; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D + * @since 3.0.0 + * + * @param {Float32Array} matrix2D - The Matrix2D. + * + * @return {this} This Model View Projection. + */ + viewLoad2D: function (matrix2D) + { + var vm = this.viewMatrix; + + vm[0] = matrix2D[0]; + vm[1] = matrix2D[1]; + vm[2] = 0.0; + vm[3] = 0.0; + vm[4] = matrix2D[2]; + vm[5] = matrix2D[3]; + vm[6] = 0.0; + vm[7] = 0.0; + vm[8] = matrix2D[4]; + vm[9] = matrix2D[5]; + vm[10] = 1.0; + vm[11] = 0.0; + vm[12] = 0.0; + vm[13] = 0.0; + vm[14] = 0.0; + vm[15] = 1.0; + + this.viewMatrixDirty = true; + + return this; + }, + + + /** + * Copies a 4x4 matrix into the view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad + * @since 3.0.0 + * + * @param {Float32Array} matrix - The Matrix2D. + * + * @return {this} This Model View Projection. + */ + viewLoad: function (matrix) + { + var vm = this.viewMatrix; + + vm[0] = matrix[0]; + vm[1] = matrix[1]; + vm[2] = matrix[2]; + vm[3] = matrix[3]; + vm[4] = matrix[4]; + vm[5] = matrix[5]; + vm[6] = matrix[6]; + vm[7] = matrix[7]; + vm[8] = matrix[8]; + vm[9] = matrix[9]; + vm[10] = matrix[10]; + vm[11] = matrix[11]; + vm[12] = matrix[12]; + vm[13] = matrix[13]; + vm[14] = matrix[14]; + vm[15] = matrix[15]; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Loads identity matrix into the projection matrix. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity + * @since 3.0.0 + * + * @return {this} This Model View Projection. + */ + projIdentity: function () + { + var projectionMatrix = this.projectionMatrix; + + projectionMatrix[0] = 1; + projectionMatrix[1] = 0; + projectionMatrix[2] = 0; + projectionMatrix[3] = 0; + projectionMatrix[4] = 0; + projectionMatrix[5] = 1; + projectionMatrix[6] = 0; + projectionMatrix[7] = 0; + projectionMatrix[8] = 0; + projectionMatrix[9] = 0; + projectionMatrix[10] = 1; + projectionMatrix[11] = 0; + projectionMatrix[12] = 0; + projectionMatrix[13] = 0; + projectionMatrix[14] = 0; + projectionMatrix[15] = 1; + + this.projectionMatrixDirty = true; + + return this; + }, + + /** + * Sets up an orthographic projection matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho + * @since 3.0.0 + * + * @param {number} left - The left value. + * @param {number} right - The right value. + * @param {number} bottom - The bottom value. + * @param {number} top - The top value. + * @param {number} near - The near value. + * @param {number} far - The far value. + * + * @return {this} This Model View Projection. + */ + projOrtho: function (left, right, bottom, top, near, far) + { + var projectionMatrix = this.projectionMatrix; + var leftRight = 1.0 / (left - right); + var bottomTop = 1.0 / (bottom - top); + var nearFar = 1.0 / (near - far); + + projectionMatrix[0] = -2.0 * leftRight; + projectionMatrix[1] = 0.0; + projectionMatrix[2] = 0.0; + projectionMatrix[3] = 0.0; + projectionMatrix[4] = 0.0; + projectionMatrix[5] = -2.0 * bottomTop; + projectionMatrix[6] = 0.0; + projectionMatrix[7] = 0.0; + projectionMatrix[8] = 0.0; + projectionMatrix[9] = 0.0; + projectionMatrix[10] = 2.0 * nearFar; + projectionMatrix[11] = 0.0; + projectionMatrix[12] = (left + right) * leftRight; + projectionMatrix[13] = (top + bottom) * bottomTop; + projectionMatrix[14] = (far + near) * nearFar; + projectionMatrix[15] = 1.0; + + this.projectionMatrixDirty = true; + + return this; + }, + + /** + * Sets up a perspective projection matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp + * @since 3.0.0 + * + * @param {number} fovY - The fov value. + * @param {number} aspectRatio - The aspectRatio value. + * @param {number} near - The near value. + * @param {number} far - The far value. + * + * @return {this} This Model View Projection. + */ + projPersp: function (fovY, aspectRatio, near, far) + { + var projectionMatrix = this.projectionMatrix; + var fov = 1.0 / Math.tan(fovY / 2.0); + var nearFar = 1.0 / (near - far); + + projectionMatrix[0] = fov / aspectRatio; + projectionMatrix[1] = 0.0; + projectionMatrix[2] = 0.0; + projectionMatrix[3] = 0.0; + projectionMatrix[4] = 0.0; + projectionMatrix[5] = fov; + projectionMatrix[6] = 0.0; + projectionMatrix[7] = 0.0; + projectionMatrix[8] = 0.0; + projectionMatrix[9] = 0.0; + projectionMatrix[10] = (far + near) * nearFar; + projectionMatrix[11] = -1.0; + projectionMatrix[12] = 0.0; + projectionMatrix[13] = 0.0; + projectionMatrix[14] = (2.0 * far * near) * nearFar; + projectionMatrix[15] = 0.0; + + this.projectionMatrixDirty = true; + + return this; + } +}; + +module.exports = ModelViewProjection; + + /***/ }), /* 189 */ /***/ (function(module, exports, __webpack_require__) { @@ -38807,7 +39816,7 @@ module.exports = TextureTintPipeline; */ var Rectangle = __webpack_require__(11); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(14); // points is an array of Point-like objects, // either 2 dimensional arrays, or objects with public x/y properties: @@ -38894,10 +39903,10 @@ module.exports = FromPoints; var CONST = { - CENTER: __webpack_require__(383), - ORIENTATION: __webpack_require__(384), - SCALE_MODE: __webpack_require__(385), - ZOOM: __webpack_require__(386) + CENTER: __webpack_require__(384), + ORIENTATION: __webpack_require__(385), + SCALE_MODE: __webpack_require__(386), + ZOOM: __webpack_require__(387) }; @@ -39042,13 +40051,13 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(132); +var CONST = __webpack_require__(133); 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__(399); +var Events = __webpack_require__(22); +var GetPhysicsPlugins = __webpack_require__(901); +var GetScenePlugins = __webpack_require__(902); +var NOOP = __webpack_require__(1); +var Settings = __webpack_require__(400); /** * @classdesc @@ -39151,7 +40160,7 @@ var Systems = new Class({ /** * A reference to the global Animations Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.anims` property. * * @name Phaser.Scenes.Systems#anims @@ -39163,7 +40172,7 @@ var Systems = new Class({ /** * A reference to the global Cache. The Cache stores all files bought in to Phaser via * the Loader, with the exception of images. Images are stored in the Texture Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.cache` property. * * @name Phaser.Scenes.Systems#cache @@ -39174,7 +40183,7 @@ var Systems = new Class({ /** * A reference to the global Plugins Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.plugins` property. * * @name Phaser.Scenes.Systems#plugins @@ -39186,7 +40195,7 @@ var Systems = new Class({ /** * A reference to the global registry. This is a game-wide instance of the Data Manager, allowing * you to exchange data between Scenes via a universal and shared point. - * + * * In the default set-up you can access this from within a Scene via the `this.registry` property. * * @name Phaser.Scenes.Systems#registry @@ -39197,7 +40206,7 @@ var Systems = new Class({ /** * A reference to the global Scale Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.scale` property. * * @name Phaser.Scenes.Systems#scale @@ -39208,7 +40217,7 @@ var Systems = new Class({ /** * A reference to the global Sound Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.sound` property. * * @name Phaser.Scenes.Systems#sound @@ -39219,7 +40228,7 @@ var Systems = new Class({ /** * A reference to the global Texture Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.textures` property. * * @name Phaser.Scenes.Systems#textures @@ -39232,9 +40241,9 @@ var Systems = new Class({ /** * A reference to the Scene's Game Object Factory. - * + * * Use this to quickly and easily create new Game Object's. - * + * * In the default set-up you can access this from within a Scene via the `this.add` property. * * @name Phaser.Scenes.Systems#add @@ -39245,9 +40254,9 @@ var Systems = new Class({ /** * A reference to the Scene's Camera Manager. - * + * * Use this to manipulate and create Cameras for this specific Scene. - * + * * In the default set-up you can access this from within a Scene via the `this.cameras` property. * * @name Phaser.Scenes.Systems#cameras @@ -39258,9 +40267,9 @@ var Systems = new Class({ /** * A reference to the Scene's Display List. - * + * * Use this to organize the children contained in the display list. - * + * * In the default set-up you can access this from within a Scene via the `this.children` property. * * @name Phaser.Scenes.Systems#displayList @@ -39271,9 +40280,9 @@ var Systems = new Class({ /** * A reference to the Scene's Event Manager. - * + * * Use this to listen for Scene specific events, such as `pause` and `shutdown`. - * + * * In the default set-up you can access this from within a Scene via the `this.events` property. * * @name Phaser.Scenes.Systems#events @@ -39284,11 +40293,11 @@ var Systems = new Class({ /** * A reference to the Scene's Game Object Creator. - * + * * Use this to quickly and easily create new Game Object's. The difference between this and the * Game Object Factory, is that the Creator just creates and returns Game Object instances, it * doesn't then add them to the Display List or Update List. - * + * * In the default set-up you can access this from within a Scene via the `this.make` property. * * @name Phaser.Scenes.Systems#make @@ -39299,10 +40308,10 @@ var Systems = new Class({ /** * A reference to the Scene Manager Plugin. - * + * * Use this to manipulate both this and other Scene's in your game, for example to launch a parallel Scene, * or pause or resume a Scene, or switch from this Scene to another. - * + * * In the default set-up you can access this from within a Scene via the `this.scene` property. * * @name Phaser.Scenes.Systems#scenePlugin @@ -39313,12 +40322,12 @@ var Systems = new Class({ /** * A reference to the Scene's Update List. - * + * * Use this to organize the children contained in the update list. - * + * * The Update List is responsible for managing children that need their `preUpdate` methods called, * in order to process so internal components, such as Sprites with Animations. - * + * * In the default set-up there is no reference to this from within the Scene itself. * * @name Phaser.Scenes.Systems#updateList @@ -39402,7 +40411,7 @@ var Systems = new Class({ * * @method Phaser.Scenes.Systems#step * @fires Phaser.Scenes.Events#PRE_UPDATE - * @fires Phaser.Scenes.Events#_UPDATE + * @fires Phaser.Scenes.Events#UPDATE * @fires Phaser.Scenes.Events#POST_UPDATE * @since 3.0.0 * @@ -39470,7 +40479,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#pause * @fires Phaser.Scenes.Events#PAUSE * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'pause' event. * * @return {Phaser.Scenes.Systems} This Systems object. @@ -39525,7 +40534,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#sleep * @fires Phaser.Scenes.Events#SLEEP * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'sleep' event. * * @return {Phaser.Scenes.Systems} This Systems object. @@ -39574,14 +40583,14 @@ var Systems = new Class({ /** * 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} + * @return {any} */ getData: function () { @@ -39699,7 +40708,7 @@ var Systems = new Class({ /** * Set the active state of this Scene. - * + * * An active Scene will run its core update loop. * * @method Phaser.Scenes.Systems#setActive @@ -39762,7 +40771,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#shutdown * @fires Phaser.Scenes.Events#SHUTDOWN * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'shutdown' event. */ shutdown: function (data) @@ -39862,8 +40871,8 @@ module.exports = UppercaseFirst; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(106); -var TextureSource = __webpack_require__(402); +var Frame = __webpack_require__(105); +var TextureSource = __webpack_require__(403); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -40387,39 +41396,39 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(944), + Matrix: __webpack_require__(942), - 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), + Add: __webpack_require__(949), + AddAt: __webpack_require__(950), + BringToTop: __webpack_require__(951), + CountAllMatching: __webpack_require__(952), + Each: __webpack_require__(953), + EachInRange: __webpack_require__(954), + FindClosestInSorted: __webpack_require__(288), + GetAll: __webpack_require__(407), + GetFirst: __webpack_require__(408), 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) + MoveDown: __webpack_require__(955), + MoveTo: __webpack_require__(956), + MoveUp: __webpack_require__(957), + NumberArray: __webpack_require__(958), + NumberArrayStep: __webpack_require__(959), + QuickSelect: __webpack_require__(417), + Range: __webpack_require__(418), + Remove: __webpack_require__(131), + RemoveAt: __webpack_require__(960), + RemoveBetween: __webpack_require__(961), + RemoveRandomElement: __webpack_require__(962), + Replace: __webpack_require__(963), + RotateLeft: __webpack_require__(304), + RotateRight: __webpack_require__(305), + SafeRange: __webpack_require__(73), + SendToBack: __webpack_require__(964), + SetAll: __webpack_require__(965), + Shuffle: __webpack_require__(121), + SpliceOne: __webpack_require__(86), + StableSort: __webpack_require__(138), + Swap: __webpack_require__(966) }; @@ -40532,7 +41541,7 @@ module.exports = GetRandom; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(972); +var Events = __webpack_require__(968); /** * @classdesc @@ -40960,13 +41969,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(980); -var Bob = __webpack_require__(983); +var BlitterRender = __webpack_require__(976); +var Bob = __webpack_require__(979); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Frame = __webpack_require__(106); -var GameObject = __webpack_require__(14); -var List = __webpack_require__(135); +var Frame = __webpack_require__(105); +var GameObject = __webpack_require__(13); +var List = __webpack_require__(136); /** * @callback CreateCallback @@ -41261,14 +42270,14 @@ module.exports = Blitter; */ var ArrayUtils = __webpack_require__(196); -var BlendModes = __webpack_require__(43); +var BlendModes = __webpack_require__(44); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Events = __webpack_require__(102); -var GameObject = __webpack_require__(14); +var Events = __webpack_require__(100); +var GameObject = __webpack_require__(13); var Rectangle = __webpack_require__(11); -var Render = __webpack_require__(984); -var Union = __webpack_require__(417); +var Render = __webpack_require__(980); +var Union = __webpack_require__(420); var Vector2 = __webpack_require__(3); /** @@ -41281,6 +42290,10 @@ var Vector2 = __webpack_require__(3); * * The position of the Game Object automatically becomes relative to the position of the Container. * + * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the + * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of + * the Container, and position children positively and negative around it as required. + * * When the Container is rendered, all of its children are rendered as well, in the order in which they exist * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`. * @@ -41602,7 +42615,7 @@ var Container = new Class({ * * @param {boolean} [value=true] - The exclusive state of this Container. * - * @return {Phaser.GameObjects.Container} This Container. + * @return {this} This Container. */ setExclusive: function (value) { @@ -41639,12 +42652,21 @@ var Container = new Class({ output.setTo(this.x, this.y, 0, 0); + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + var transformedPosition = parentMatrix.transformPoint(this.x, this.y); + output.setTo(transformedPosition.x, transformedPosition.y, 0, 0); + } + if (this.list.length > 0) { var children = this.list; var tempRect = new Rectangle(); - for (var i = 0; i < children.length; i++) + var firstChildBounds = children[0].getBounds(); + output.setTo(firstChildBounds.x, firstChildBounds.y, firstChildBounds.width, firstChildBounds.height); + for (var i = 1; i < children.length; i++) { var entry = children[i]; @@ -41723,7 +42745,11 @@ var Container = new Class({ if (this.parentContainer) { - return this.parentContainer.pointToContainer(source, output); + this.parentContainer.pointToContainer(source, output); + } + else + { + output = new Vector2(source.x, source.y); } var tempMatrix = this.tempTransformMatrix; @@ -41763,7 +42789,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ add: function (child) { @@ -41785,7 +42811,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * @param {integer} [index=0] - The position to insert the Game Object/s at. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ addAt: function (child, index) { @@ -41834,7 +42860,7 @@ var Container = new Class({ * @param {string} property - The property to lexically sort by. * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ sort: function (property, handler) { @@ -41976,7 +43002,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ swap: function (child1, child2) { @@ -41999,7 +43025,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. * @param {integer} index - The new position of the Game Object in this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveTo: function (child, index) { @@ -42021,7 +43047,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ remove: function (child, destroyChild) { @@ -42054,7 +43080,7 @@ var Container = new Class({ * @param {integer} index - The index of the Game Object to be removed. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeAt: function (index, destroyChild) { @@ -42080,7 +43106,7 @@ var Container = new Class({ * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeBetween: function (startIndex, endIndex, destroyChild) { @@ -42107,7 +43133,7 @@ var Container = new Class({ * * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeAll: function (destroyChild) { @@ -42133,7 +43159,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ bringToTop: function (child) { @@ -42151,7 +43177,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ sendToBack: function (child) { @@ -42168,7 +43194,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveUp: function (child) { @@ -42185,7 +43211,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveDown: function (child) { @@ -42200,7 +43226,7 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#reverse * @since 3.4.0 * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ reverse: function () { @@ -42215,7 +43241,7 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#shuffle * @since 3.4.0 * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ shuffle: function () { @@ -42235,7 +43261,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ replace: function (oldChild, newChild, destroyChild) { @@ -42287,7 +43313,7 @@ var Container = new Class({ * @param {integer} [startIndex=0] - An optional start index to search from. * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ setAll: function (property, value, startIndex, endIndex) { @@ -42320,7 +43346,7 @@ var Container = new Class({ * @param {object} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ each: function (callback, context) { @@ -42357,7 +43383,7 @@ var Container = new Class({ * @param {object} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ iterate: function (callback, context) { @@ -42584,9 +43610,9 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); +var BitmapText = __webpack_require__(139); var Class = __webpack_require__(0); -var Render = __webpack_require__(989); +var Render = __webpack_require__(985); /** * @classdesc @@ -42735,7 +43761,7 @@ var DynamicBitmapText = new Class({ * @param {number} width - The width of the crop. * @param {number} height - The height of the crop. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setSize: function (width, height) { @@ -42759,7 +43785,7 @@ var DynamicBitmapText = new Class({ * * @param {Phaser.Types.GameObjects.BitmapText.DisplayCallback} callback - The display callback to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setDisplayCallback: function (callback) { @@ -42776,7 +43802,7 @@ var DynamicBitmapText = new Class({ * * @param {number} value - The horizontal scroll position to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setScrollX: function (value) { @@ -42793,7 +43819,7 @@ var DynamicBitmapText = new Class({ * * @param {number} value - The vertical scroll position to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setScrollY: function (value) { @@ -42817,26 +43843,26 @@ module.exports = DynamicBitmapText; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(103); +var BaseCamera = __webpack_require__(101); var Class = __webpack_require__(0); 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 ComponentsAlpha = __webpack_require__(286); +var ComponentsBlendMode = __webpack_require__(290); +var ComponentsDepth = __webpack_require__(291); +var ComponentsMask = __webpack_require__(295); +var ComponentsPipeline = __webpack_require__(120); +var ComponentsTransform = __webpack_require__(300); +var ComponentsVisible = __webpack_require__(301); +var ComponentsScrollFactor = __webpack_require__(298); -var TransformMatrix = __webpack_require__(35); +var TransformMatrix = __webpack_require__(32); -var Ellipse = __webpack_require__(107); -var GameObject = __webpack_require__(14); -var GetFastValue = __webpack_require__(1); +var Ellipse = __webpack_require__(106); +var GameObject = __webpack_require__(13); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(5); -var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(995); +var MATH_CONST = __webpack_require__(14); +var Render = __webpack_require__(991); /** * @classdesc @@ -43056,7 +44082,7 @@ var Graphics = new Class({ * * @param {Phaser.Types.GameObjects.Graphics.Styles} options - The styles to set as defaults. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ setDefaultStyles: function (options) { @@ -43090,7 +44116,7 @@ var Graphics = new Class({ * @param {number} color - The stroke color. * @param {number} [alpha=1] - The stroke alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineStyle: function (lineWidth, color, alpha) { @@ -43115,7 +44141,7 @@ var Graphics = new Class({ * @param {number} color - The fill color. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillStyle: function (color, alpha) { @@ -43154,7 +44180,7 @@ var Graphics = new Class({ * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillGradientStyle: function (topLeft, topRight, bottomLeft, bottomRight, alpha) { @@ -43192,7 +44218,7 @@ var Graphics = new Class({ * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineGradientStyle: function (lineWidth, topLeft, topRight, bottomLeft, bottomRight, alpha) { @@ -43268,7 +44294,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#beginPath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ beginPath: function () { @@ -43285,7 +44311,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#closePath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ closePath: function () { @@ -43302,7 +44328,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#fillPath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPath: function () { @@ -43322,7 +44348,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#fill * @since 3.16.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fill: function () { @@ -43339,7 +44365,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#strokePath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokePath: function () { @@ -43359,7 +44385,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#stroke * @since 3.16.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ stroke: function () { @@ -43378,7 +44404,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Circle} circle - The circle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillCircleShape: function (circle) { @@ -43393,7 +44419,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Circle} circle - The circle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeCircleShape: function (circle) { @@ -43410,7 +44436,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the center of the circle. * @param {number} radius - The radius of the circle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillCircle: function (x, y, radius) { @@ -43431,7 +44457,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the center of the circle. * @param {number} radius - The radius of the circle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeCircle: function (x, y, radius) { @@ -43450,7 +44476,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Rectangle} rect - The rectangle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRectShape: function (rect) { @@ -43465,7 +44491,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Rectangle} rect - The rectangle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRectShape: function (rect) { @@ -43483,7 +44509,7 @@ var Graphics = new Class({ * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRect: function (x, y, width, height) { @@ -43506,7 +44532,7 @@ var Graphics = new Class({ * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRect: function (x, y, width, height) { @@ -43549,7 +44575,7 @@ var Graphics = new Class({ * @param {number} height - The height of the rectangle. * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRoundedRect: function (x, y, width, height, radius) { @@ -43595,7 +44621,7 @@ var Graphics = new Class({ * @param {number} height - The height of the rectangle. * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRoundedRect: function (x, y, width, height, radius) { @@ -43640,7 +44666,7 @@ var Graphics = new Class({ * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The point to fill. * @param {number} [size=1] - The size of the square to draw. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPointShape: function (point, size) { @@ -43659,7 +44685,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the point. * @param {number} [size=1] - The size of the square to draw. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPoint: function (x, y, size) { @@ -43689,7 +44715,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Triangle} triangle - The triangle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillTriangleShape: function (triangle) { @@ -43704,7 +44730,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Triangle} triangle - The triangle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeTriangleShape: function (triangle) { @@ -43724,7 +44750,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the third point. * @param {number} y2 - The y coordinate of the third point. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillTriangle: function (x0, y0, x1, y1, x2, y2) { @@ -43749,7 +44775,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the third point. * @param {number} y2 - The y coordinate of the third point. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeTriangle: function (x0, y0, x1, y1, x2, y2) { @@ -43769,7 +44795,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Line} line - The line to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeLineShape: function (line) { @@ -43787,7 +44813,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the end point of the line. * @param {number} y2 - The y coordinate of the end point of the line. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineBetween: function (x1, y1, x2, y2) { @@ -43810,7 +44836,7 @@ var Graphics = new Class({ * @param {number} x - The x coordinate to draw the line to. * @param {number} y - The y coordinate to draw the line to. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineTo: function (x, y) { @@ -43831,7 +44857,7 @@ var Graphics = new Class({ * @param {number} x - The x coordinate to move to. * @param {number} y - The y coordinate to move to. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ moveTo: function (x, y) { @@ -43858,7 +44884,7 @@ var Graphics = new Class({ * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked. * @param {integer} [endIndex] - The index of `points` to stop drawing at. Defaults to `points.length`. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokePoints: function (points, closeShape, closePath, endIndex) { @@ -43905,7 +44931,7 @@ var Graphics = new Class({ * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked. * @param {integer} [endIndex] - The index of `points` to stop at. Defaults to `points.length`. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPoints: function (points, closeShape, closePath, endIndex) { @@ -43946,7 +44972,7 @@ var Graphics = new Class({ * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to stroke. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeEllipseShape: function (ellipse, smoothness) { @@ -43969,7 +44995,7 @@ var Graphics = new Class({ * @param {number} height - The height of the ellipse. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeEllipse: function (x, y, width, height, smoothness) { @@ -43991,7 +45017,7 @@ var Graphics = new Class({ * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to fill. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillEllipseShape: function (ellipse, smoothness) { @@ -44014,7 +45040,7 @@ var Graphics = new Class({ * @param {number} height - The height of the ellipse. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillEllipse: function (x, y, width, height, smoothness) { @@ -44053,7 +45079,7 @@ var Graphics = new Class({ * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise. * @param {number} [overshoot=0] - This value allows you to increase the segment iterations in WebGL rendering. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Use small numbers such as 0.01 to start with and increase as needed. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ arc: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot) { @@ -44089,7 +45115,7 @@ var Graphics = new Class({ * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise. * @param {number} [overshoot=0] - This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ slice: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot) { @@ -44115,7 +45141,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#save * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ save: function () { @@ -44136,7 +45162,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#restore * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ restore: function () { @@ -44162,7 +45188,7 @@ var Graphics = new Class({ * @param {number} x - The horizontal translation to apply. * @param {number} y - The vertical translation to apply. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ translateCanvas: function (x, y) { @@ -44189,7 +45215,7 @@ var Graphics = new Class({ * @param {number} x - The horizontal scale to apply. * @param {number} y - The vertical scale to apply. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ scaleCanvas: function (x, y) { @@ -44215,7 +45241,7 @@ var Graphics = new Class({ * * @param {number} radians - The rotation angle, in radians. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ rotateCanvas: function (radians) { @@ -44233,7 +45259,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#clear * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ clear: function () { @@ -44268,7 +45294,7 @@ var Graphics = new Class({ * @param {integer} [width] - The width of the graphics to generate. * @param {integer} [height] - The height of the graphics to generate. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ generateTexture: function (key, width, height) { @@ -44448,11 +45474,11 @@ module.exports = CircumferencePoint; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var GravityWell = __webpack_require__(425); -var List = __webpack_require__(135); -var ParticleEmitter = __webpack_require__(427); -var Render = __webpack_require__(1005); +var GameObject = __webpack_require__(13); +var GravityWell = __webpack_require__(428); +var List = __webpack_require__(136); +var ParticleEmitter = __webpack_require__(430); +var Render = __webpack_require__(1001); /** * @classdesc @@ -44602,7 +45628,7 @@ var ParticleEmitterManager = new Class({ * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setTexture: function (key, frame) { @@ -44623,7 +45649,7 @@ var ParticleEmitterManager = new Class({ * * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setFrame: function (frame) { @@ -44654,7 +45680,7 @@ var ParticleEmitterManager = new Class({ * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames. * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setEmitterFrames: function (frames, emitter) { @@ -44774,7 +45800,7 @@ var ParticleEmitterManager = new Class({ * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ emitParticle: function (count, x, y) { @@ -44803,7 +45829,7 @@ var ParticleEmitterManager = new Class({ * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ emitParticleAt: function (x, y, count) { @@ -44820,7 +45846,7 @@ var ParticleEmitterManager = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ pause: function () { @@ -44835,7 +45861,7 @@ var ParticleEmitterManager = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ resume: function () { @@ -44935,15 +45961,15 @@ module.exports = ParticleEmitterManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(43); -var Camera = __webpack_require__(103); +var BlendModes = __webpack_require__(44); +var Camera = __webpack_require__(101); var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var CONST = __webpack_require__(32); -var Frame = __webpack_require__(106); -var GameObject = __webpack_require__(14); -var Render = __webpack_require__(1009); +var CONST = __webpack_require__(38); +var Frame = __webpack_require__(105); +var GameObject = __webpack_require__(13); +var Render = __webpack_require__(1005); var Utils = __webpack_require__(10); var UUID = __webpack_require__(209); @@ -46209,17 +47235,1130 @@ module.exports = UUID; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(129); +var Class = __webpack_require__(0); +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var RopeRender = __webpack_require__(1011); +var Vector2 = __webpack_require__(3); + +/** + * @classdesc + * A Rope Game Object. + * + * The Rope object is WebGL only and does not have a Canvas counterpart. + * + * A Rope is a special kind of Game Object that has a texture that repeats along its entire length. + * Unlike a Sprite, it isn't restricted to using just a quad and can have as many vertices as you define + * when creating it. The vertices can be arranged in a horizontal or vertical strip and have their own + * color and alpha values as well. + * + * A Ropes origin is always 0.5 x 0.5 and cannot be changed. + * + * @class Rope + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @webglOnly + * @since 3.23.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @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=0] - The horizontal position of this Game Object in the world. + * @param {number} [y=0] - 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. If not given, `__DEFAULT` is used. + * @param {(string|integer|null)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. See `setPoints` to set this post-creation. + * @param {boolean} [horizontal=true] - Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)? + * @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.AlphaSingle, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.Mask, + Components.Pipeline, + Components.Size, + Components.Texture, + Components.Transform, + Components.Visible, + Components.ScrollFactor, + RopeRender + ], + + initialize: + + function Rope (scene, x, y, texture, frame, points, horizontal, colors, alphas) + { + if (texture === undefined) { texture = '__DEFAULT'; } + if (points === undefined) { points = 2; } + if (horizontal === undefined) { horizontal = true; } + + GameObject.call(this, scene, 'Rope'); + + /** + * The Animation Controller of this Rope. + * + * @name Phaser.GameObjects.Rope#anims + * @type {Phaser.GameObjects.Components.Animation} + * @since 3.23.0 + */ + this.anims = new Components.Animation(this); + + /** + * 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.Types.Math.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; + + /** + * The tint fill mode. + * + * 0 = An additive tint (the default), where vertices colors are blended with the texture. + * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. + * + * @name Phaser.GameObjects.Rope#tintFill + * @type {integer} + * @since 3.23.0 + */ + this.tintFill = (texture === '__DEFAULT') ? 2 : 0; + + /** + * 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; + + /** + * Are the Rope vertices aligned horizontally, in a strip, or vertically, in a column? + * + * This property is set during instantiation and cannot be changed directly. + * See the `setVertical` and `setHorizontal` methods. + * + * @name Phaser.GameObjects.Rope#horizontal + * @type {boolean} + * @readonly + * @since 3.23.0 + */ + this.horizontal = horizontal; + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#_flipX + * @type {boolean} + * @default false + * @private + * @since 3.23.0 + */ + this._flipX = false; + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipY + * @type {boolean} + * @default false + * @private + * @since 3.23.0 + */ + this._flipY = 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(); + + /** + * You can optionally choose to render the vertices of this Rope to a Graphics instance. + * + * Achieve this by setting the `debugCallback` and the `debugGraphic` properties. + * + * You can do this in a single call via the `Rope.setDebug` method, which will use the + * built-in debug function. You can also set it to your own callback. The callback + * will be invoked _once per render_ and sent the following parameters: + * + * `debugCallback(src, meshLength, verts)` + * + * `src` is the Rope instance being debugged. + * `meshLength` is the number of mesh vertices in total. + * `verts` is an array of the translated vertex coordinates. + * + * To disable rendering, set this property back to `null`. + * + * @name Phaser.GameObjects.Rope#debugCallback + * @type {function} + * @since 3.23.0 + */ + this.debugCallback = null; + + /** + * The Graphics instance that the debug vertices will be drawn to, if `setDebug` has + * been called. + * + * @name Phaser.GameObjects.Rope#debugGraphic + * @type {Phaser.GameObjects.Graphics} + * @since 3.23.0 + */ + this.debugGraphic = null; + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.initPipeline('TextureTintStripPipeline'); + + if (Array.isArray(points)) + { + this.resizeArrays(points.length); + } + + this.setPoints(points, colors, alphas); + + this.updateVertices(); + }, + + /** + * The Rope update loop. + * + * @method Phaser.GameObjects.Rope#preUpdate + * @protected + * @since 3.23.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + preUpdate: function (time, delta) + { + var prevFrame = this.anims.currentFrame; + + this.anims.update(time, delta); + + if (this.anims.currentFrame !== prevFrame) + { + this.updateUVs(); + this.updateVertices(); + } + }, + + /** + * Start playing the given animation. + * + * @method Phaser.GameObjects.Rope#play + * @since 3.23.0 + * + * @param {string} key - The string-based key of the animation to play. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {this} This Game Object. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + this.anims.play(key, ignoreIfPlaying, startFrame); + + return this; + }, + + /** + * 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; + }, + + /** + * Sets the alignment of the points in this Rope to be horizontal, in a strip format. + * + * Calling this method will reset this Rope. The current points, vertices, colors and alpha + * values will be reset to thoes values given as parameters. + * + * @method Phaser.GameObjects.Rope#setHorizontal + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. + * @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. + */ + setHorizontal: function (points, colors, alphas) + { + if (points === undefined) { points = this.points.length; } + + if (this.horizontal) + { + return this; + } + + this.horizontal = true; + + return this.setPoints(points, colors, alphas); + }, + + /** + * Sets the alignment of the points in this Rope to be vertical, in a column format. + * + * Calling this method will reset this Rope. The current points, vertices, colors and alpha + * values will be reset to thoes values given as parameters. + * + * @method Phaser.GameObjects.Rope#setVertical + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. + * @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. + */ + setVertical: function (points, colors, alphas) + { + if (points === undefined) { points = this.points.length; } + + if (!this.horizontal) + { + return this; + } + + this.horizontal = false; + + return this.setPoints(points, colors, alphas); + }, + + /** + * Sets the tint fill mode. + * + * Mode 0 is an additive tint, the default, which blends the vertices colors with the texture. + * This mode respects the texture alpha. + * + * Mode 1 is a fill 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. This mode respects the texture alpha. + * + * Mode 2 is a complete tint. The texture colors and alpha are replaced entirely by the vertices colors. + * + * See the `setColors` method for details of how to color each of the vertices. + * + * @method Phaser.GameObjects.Rope#setTintFill + * @webglOnly + * @since 3.23.0 + * + * @param {integer} [value=0] - Set to 0 for an Additive tint, 1 for a fill tint with alpha, or 2 for a fill tint without alpha. + * + * @return {this} This Game Object instance. + */ + setTintFill: function (value) + { + if (value === undefined) { value = 0; } + + this.tintFill = value; + + 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`. + * + * @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: + * + * * One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope. + * * 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 } + * ]); + * ``` + * + * Or, you can provide an integer to do the same thing: + * + * ```javascript + * rope.setPoints(4); + * ``` + * + * Which will divide the Rope into 4 equally sized segments based on the frame width. + * + * 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. + * + * @method Phaser.GameObjects.Rope#setPoints + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. + * @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) + { + if (points === undefined) { points = 2; } + + if (typeof points === 'number') + { + // Generate an array based on the points + var segments = points; + + if (segments < 2) + { + segments = 2; + } + + points = []; + + var s; + var frameSegment; + var offset; + + if (this.horizontal) + { + offset = -(this.frame.halfWidth); + frameSegment = this.frame.width / (segments - 1); + + for (s = 0; s < segments; s++) + { + points.push({ x: offset + s * frameSegment, y: 0 }); + } + } + else + { + offset = -(this.frame.halfHeight); + frameSegment = this.frame.height / (segments - 1); + + for (s = 0; s < segments; s++) + { + points.push({ x: 0, y: offset + s * frameSegment }); + } + } + } + + var total = points.length; + var currentTotal = this.points.length; + + if (total < 1) + { + console.warn('Rope: Not enough points given'); + + return this; + } + else if (total === 1) + { + points.unshift({ x: 0, y: 0 }); + total++; + } + + if (currentTotal !== total) + { + this.resizeArrays(total); + } + + this.points = points; + + this.updateUVs(); + + if (colors !== undefined && colors !== null) + { + this.setColors(colors); + } + + if (alphas !== undefined && alphas !== null) + { + this.setAlphas(alphas); + } + + return this; + }, + + /** + * Updates all of the UVs based on the Rope.points and `flipX` and `flipY` settings. + * + * @method Phaser.GameObjects.Rope#updateUVs + * @since 3.23.0 + * + * @return {this} This Game Object instance. + */ + updateUVs: function () + { + var currentUVs = this.uv; + var total = this.points.length; + + var u0 = this.frame.u0; + var v0 = this.frame.v0; + var u1 = this.frame.u1; + var v1 = this.frame.v1; + + var partH = (u1 - u0) / (total - 1); + var partV = (v1 - v0) / (total - 1); + + for (var i = 0; i < total; i++) + { + var index = i * 4; + + var uv0; + var uv1; + var uv2; + var uv3; + + if (this.horizontal) + { + if (this._flipX) + { + uv0 = u1 - (i * partH); + uv2 = u1 - (i * partH); + } + else + { + uv0 = u0 + (i * partH); + uv2 = u0 + (i * partH); + } + + if (this._flipY) + { + uv1 = v1; + uv3 = v0; + } + else + { + uv1 = v0; + uv3 = v1; + } + } + else + { + if (this._flipX) + { + uv0 = u0; + uv2 = u1; + } + else + { + uv0 = u1; + uv2 = u0; + } + + if (this._flipY) + { + uv1 = v1 - (i * partV); + uv3 = v1 - (i * partV); + } + else + { + uv1 = v0 + (i * partV); + uv3 = v0 + (i * partV); + } + } + + currentUVs[index + 0] = uv0; + currentUVs[index + 1] = uv1; + currentUVs[index + 2] = uv2; + currentUVs[index + 3] = uv3; + } + + 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 nextPoint; + var lastPoint = points[0]; + + var frameSize = (this.horizontal) ? this.frame.halfHeight : this.frame.halfWidth; + + 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 perpLength = perp.length(); + + perp.x /= perpLength; + perp.y /= perpLength; + + perp.x *= frameSize; + perp.y *= frameSize; + + 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; + }, + + /** + * This method enables rendering of the Rope vertices to the given Graphics instance. + * + * If you enable this feature, you must call `Graphics.clear()` in your Scene `update`, + * otherwise the Graphics instance will fill-in with draw calls. This is not done automatically + * to allow for you to debug render multiple Rope objects to a single Graphics instance. + * + * The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however + * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. + * + * The callback is invoked _once per render_ and sent the following parameters: + * + * `callback(src, meshLength, verts)` + * + * `src` is the Rope instance being debugged. + * `meshLength` is the number of mesh vertices in total. + * `verts` is an array of the translated vertex coordinates. + * + * If using your own callback you do not have to provide a Graphics instance to this method. + * + * To disable debug rendering, to either your own callback or the built-in one, call this method + * with no arguments. + * + * @method Phaser.GameObjects.Rope#setDebug + * @since 3.23.0 + * + * @param {Phaser.GameObjects.Graphics} [graphic] - The Graphic instance to render to if using the built-in callback. + * @param {function} [callback] - The callback to invoke during debug render. Leave as undefined to use the built-in callback. + * + * @return {this} This Game Object instance. + */ + setDebug: function (graphic, callback) + { + this.debugGraphic = graphic; + + if (!graphic && !callback) + { + this.debugCallback = null; + } + else if (!callback) + { + this.debugCallback = this.renderDebugVerts; + } + else + { + this.debugCallback = callback; + } + + return this; + }, + + /** + * The built-in Rope vertices debug rendering method. + * + * See `Rope.setDebug` for more details. + * + * @method Phaser.GameObjects.Rope#renderDebugVerts + * @since 3.23.0 + * + * @param {Phaser.GameObjects.Rope} src - The Rope object being rendered. + * @param {integer} meshLength - The number of vertices in the mesh. + * @param {number[]} verts - An array of translated vertex coordinates. + */ + renderDebugVerts: function (src, meshLength, verts) + { + var graphic = src.debugGraphic; + + var px0 = verts[0]; + var py0 = verts[1]; + var px1 = verts[2]; + var py1 = verts[3]; + + graphic.lineBetween(px0, py0, px1, py1); + + for (var i = 4; i < meshLength; i += 4) + { + var x0 = verts[i + 0]; + var y0 = verts[i + 1]; + var x1 = verts[i + 2]; + var y1 = verts[i + 3]; + + graphic.lineBetween(px0, py0, x0, y0); + graphic.lineBetween(px1, py1, x1, y1); + graphic.lineBetween(px1, py1, x0, y0); + graphic.lineBetween(x0, y0, x1, y1); + + px0 = x0; + py0 = y0; + px1 = x1; + py1 = y1; + } + }, + + /** + * Handles the pre-destroy step for the Rope, which removes the Animation component and typed arrays. + * + * @method Phaser.GameObjects.Rope#preDestroy + * @private + * @since 3.23.0 + */ + preDestroy: function () + { + this.anims.destroy(); + + this.anims = undefined; + + this.points = null; + this.vertices = null; + this.uv = null; + this.colors = null; + this.alphas = null; + + this.debugCallback = null; + this.debugGraphic = null; + }, + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipX + * @type {boolean} + * @default false + * @since 3.23.0 + */ + flipX: { + + get: function () + { + return this._flipX; + }, + + set: function (value) + { + this._flipX = value; + + return this.updateUVs(); + } + + }, + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipY + * @type {boolean} + * @default false + * @since 3.23.0 + */ + flipY: { + + get: function () + { + return this._flipY; + }, + + set: function (value) + { + this._flipY = value; + + return this.updateUVs(); + } + + } + +}); + +module.exports = Rope; + + +/***/ }), +/* 211 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var AddToDOM = __webpack_require__(130); var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(21); -var GameObject = __webpack_require__(14); -var GetTextSize = __webpack_require__(1015); +var GameObject = __webpack_require__(13); +var GetTextSize = __webpack_require__(1014); var GetValue = __webpack_require__(5); var RemoveFromDOM = __webpack_require__(191); -var TextRender = __webpack_require__(1016); -var TextStyle = __webpack_require__(1019); +var TextRender = __webpack_require__(1015); +var TextStyle = __webpack_require__(1018); /** * @classdesc @@ -46232,20 +48371,17 @@ var TextStyle = __webpack_require__(1019); * 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. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes, either - * when creating the Text object, or when setting the font via `setFont` or `setFontFamily`. I.e.: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters, either when creating the Text object, or when setting the font via `setFont` + * or `setFontFamily`, e.g.: + * * ```javascript - * this.add.text(0, 0, 'Hello World', { fontFamily: '"Roboto Condensed"' }); + * this.add.text(0, 0, 'Hello World', { fontFamily: 'Georgia, "Goudy Bookletter 1911", Times, serif' }); * ``` - * - * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all - * quoted properly, too: - * + * * ```javascript - * this.add.text(0, 0, 'Hello World', { fontFamily: 'Verdana, "Times New Roman", Tahoma, serif' }); + * this.add.text(0, 0, 'Hello World', { font: '"Press Start 2P"' }); * ``` * * You can only display fonts that are currently loaded and available to the browser: therefore fonts must @@ -46287,6 +48423,8 @@ var TextStyle = __webpack_require__(1019); * @param {number} y - The vertical position of this Game Object in the world. * @param {(string|string[])} text - The text this Text object will display. * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The text style configuration object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ var Text = new Class({ @@ -46793,7 +48931,7 @@ var Text = new Class({ * * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this Text object. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setText: function (value) { @@ -46834,7 +48972,7 @@ var Text = new Class({ * * @param {object} style - The style settings to set. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setStyle: function (style) { @@ -46848,19 +48986,19 @@ var Text = new Class({ * * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` * properties of that object are set. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters: + * * ```javascript - * Text.setFont('"Roboto Condensed"'); + * Text.setFont('"Press Start 2P"'); * ``` - * + * * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all * quoted properly, too: - * + * * ```javascript - * Text.setFont('Verdana, "Times New Roman", Tahoma, serif'); + * Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif'); * ``` * * @method Phaser.GameObjects.Text#setFont @@ -46868,7 +49006,9 @@ var Text = new Class({ * * @param {string} font - The font family or font settings to set. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ setFont: function (font) { @@ -46877,19 +49017,19 @@ var Text = new Class({ /** * Set the font family. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters: + * * ```javascript - * Text.setFont('"Roboto Condensed"'); + * Text.setFont('"Press Start 2P"'); * ``` * * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all * quoted properly, too: * * ```javascript - * Text.setFont('Verdana, "Times New Roman", Tahoma, serif'); + * Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif'); * ``` * * @method Phaser.GameObjects.Text#setFontFamily @@ -46897,7 +49037,9 @@ var Text = new Class({ * * @param {string} family - The font family. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ setFontFamily: function (family) { @@ -46912,7 +49054,7 @@ var Text = new Class({ * * @param {number} size - The font size. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFontSize: function (size) { @@ -46927,7 +49069,7 @@ var Text = new Class({ * * @param {string} style - The font style. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFontStyle: function (style) { @@ -46945,7 +49087,7 @@ var Text = new Class({ * @param {number} width - The fixed width to set. `0` disables fixed width. * @param {number} height - The fixed height to set. `0` disables fixed height. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFixedSize: function (width, height) { @@ -46960,7 +49102,7 @@ var Text = new Class({ * * @param {string} color - The background color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setBackgroundColor: function (color) { @@ -46980,7 +49122,7 @@ var Text = new Class({ * * @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFill: function (fillStyle) { @@ -46995,7 +49137,7 @@ var Text = new Class({ * * @param {string} color - The text fill color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setColor: function (color) { @@ -47011,7 +49153,7 @@ var Text = new Class({ * @param {string} color - The stroke color. * @param {number} thickness - The stroke thickness. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setStroke: function (color, thickness) { @@ -47031,7 +49173,7 @@ var Text = new Class({ * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow. * @param {boolean} [shadowFill=true] - Whether to fill the shadow. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadow: function (x, y, color, blur, shadowStroke, shadowFill) { @@ -47047,7 +49189,7 @@ var Text = new Class({ * @param {number} x - The horizontal shadow offset. * @param {number} y - The vertical shadow offset. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowOffset: function (x, y) { @@ -47062,7 +49204,7 @@ var Text = new Class({ * * @param {string} color - The shadow color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowColor: function (color) { @@ -47077,7 +49219,7 @@ var Text = new Class({ * * @param {number} blur - The shadow blur radius. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowBlur: function (blur) { @@ -47092,7 +49234,7 @@ var Text = new Class({ * * @param {boolean} enabled - Whether shadow stroke is enabled or not. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowStroke: function (enabled) { @@ -47107,7 +49249,7 @@ var Text = new Class({ * * @param {boolean} enabled - Whether shadow fill is enabled or not. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowFill: function (enabled) { @@ -47125,7 +49267,7 @@ var Text = new Class({ * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, * spaces and whitespace are left as is. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setWordWrapWidth: function (width, useAdvancedWrap) { @@ -47144,7 +49286,7 @@ var Text = new Class({ * newline characters in place to indicate where breaks should happen. * @param {object} [scope=null] - The scope that will be applied when the callback is invoked. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setWordWrapCallback: function (callback, scope) { @@ -47163,7 +49305,7 @@ var Text = new Class({ * * @param {string} [align='left'] - The text alignment for multi-line text. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setAlign: function (align) { @@ -47186,7 +49328,7 @@ var Text = new Class({ * * @param {number} value - The resolution for this Text object to use. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setResolution: function (value) { @@ -47204,7 +49346,7 @@ var Text = new Class({ * * @param {number} value - The amount to add to the font height to achieve the overall line height. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setLineSpacing: function (value) { @@ -47228,7 +49370,7 @@ var Text = new Class({ * @param {number} right - The right padding value. * @param {number} bottom - The bottom padding value. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setPadding: function (left, top, right, bottom) { @@ -47287,7 +49429,7 @@ var Text = new Class({ * * @param {integer} [max=0] - The maximum number of lines to draw. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setMaxLines: function (max) { @@ -47300,7 +49442,7 @@ var Text = new Class({ * @method Phaser.GameObjects.Text#updateText * @since 3.0.0 * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ updateText: function () { @@ -47475,7 +49617,7 @@ var Text = new Class({ context.restore(); - if (this.renderer.gl) + if (this.renderer && this.renderer.gl) { this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true); @@ -47609,7 +49751,7 @@ module.exports = Text; /***/ }), -/* 211 */ +/* 212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47622,10 +49764,10 @@ var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(21); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var GetPowerOfTwo = __webpack_require__(346); -var Smoothing = __webpack_require__(177); -var TileSpriteRender = __webpack_require__(1021); +var Smoothing = __webpack_require__(178); +var TileSpriteRender = __webpack_require__(1020); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -48261,7 +50403,7 @@ module.exports = TileSprite; /***/ }), -/* 212 */ +/* 213 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48271,15 +50413,15 @@ module.exports = TileSprite; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Components = __webpack_require__(12); -var Events = __webpack_require__(102); +var Events = __webpack_require__(100); var GameEvents = __webpack_require__(21); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var SoundEvents = __webpack_require__(64); var UUID = __webpack_require__(209); -var VideoRender = __webpack_require__(1024); -var MATH_CONST = __webpack_require__(13); +var VideoRender = __webpack_require__(1023); +var MATH_CONST = __webpack_require__(14); /** * @classdesc @@ -50030,7 +52172,7 @@ module.exports = Video; /***/ }), -/* 213 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50040,9 +52182,9 @@ module.exports = Video; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(214); -var GetPoints = __webpack_require__(442); -var GEOM_CONST = __webpack_require__(52); +var Contains = __webpack_require__(215); +var GetPoints = __webpack_require__(445); +var GEOM_CONST = __webpack_require__(53); /** * @classdesc @@ -50142,7 +52284,7 @@ var Polygon = new Class({ * * @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats. * - * @return {Phaser.Geom.Polygon} This Polygon object. + * @return {this} This Polygon object. */ setTo: function (points) { @@ -50264,7 +52406,7 @@ module.exports = Polygon; /***/ }), -/* 214 */ +/* 215 */ /***/ (function(module, exports) { /** @@ -50313,7 +52455,7 @@ module.exports = Contains; /***/ }), -/* 215 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50323,7 +52465,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(139); +var Mesh = __webpack_require__(141); /** * @classdesc @@ -50817,7 +52959,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setTopLeft: function (x, y) { @@ -50836,7 +52978,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setTopRight: function (x, y) { @@ -50855,7 +52997,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setBottomLeft: function (x, y) { @@ -50874,7 +53016,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setBottomRight: function (x, y) { @@ -50890,7 +53032,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetPosition * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetPosition: function () { @@ -50913,7 +53055,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetAlpha * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetAlpha: function () { @@ -50935,7 +53077,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetColors * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetColors: function () { @@ -50957,7 +53099,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#reset * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ reset: function () { @@ -50974,7 +53116,7 @@ module.exports = Quad; /***/ }), -/* 216 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50985,12 +53127,12 @@ module.exports = Quad; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var GetFastValue = __webpack_require__(1); -var Extend = __webpack_require__(17); -var SetValue = __webpack_require__(450); -var ShaderRender = __webpack_require__(1105); -var TransformMatrix = __webpack_require__(35); +var GameObject = __webpack_require__(13); +var GetFastValue = __webpack_require__(2); +var Extend = __webpack_require__(18); +var SetValue = __webpack_require__(453); +var ShaderRender = __webpack_require__(1106); +var TransformMatrix = __webpack_require__(32); /** * @classdesc @@ -52197,7 +54339,7 @@ module.exports = Shader; /***/ }), -/* 217 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52206,7 +54348,7 @@ module.exports = Shader; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DistanceBetween = __webpack_require__(54); +var DistanceBetween = __webpack_require__(55); /** * Checks if two Circles intersect. @@ -52228,7 +54370,7 @@ module.exports = CircleToCircle; /***/ }), -/* 218 */ +/* 219 */ /***/ (function(module, exports) { /** @@ -52282,7 +54424,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 219 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52293,7 +54435,7 @@ module.exports = CircleToRectangle; */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(220); +var LineToCircle = __webpack_require__(221); /** * Checks for intersection between the line segment and circle, @@ -52374,7 +54516,7 @@ module.exports = GetLineToCircle; /***/ }), -/* 220 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52458,7 +54600,7 @@ module.exports = LineToCircle; /***/ }), -/* 221 */ +/* 222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52469,8 +54611,8 @@ module.exports = LineToCircle; */ var Point = __webpack_require__(4); -var LineToLine = __webpack_require__(93); -var LineToRectangle = __webpack_require__(455); +var LineToLine = __webpack_require__(90); +var LineToRectangle = __webpack_require__(458); /** * Checks for intersection between the Line and a Rectangle shape, @@ -52518,7 +54660,7 @@ module.exports = GetLineToRectangle; /***/ }), -/* 222 */ +/* 223 */ /***/ (function(module, exports) { /** @@ -52605,7 +54747,7 @@ module.exports = ContainsArray; /***/ }), -/* 223 */ +/* 224 */ /***/ (function(module, exports) { /** @@ -52653,7 +54795,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 224 */ +/* 225 */ /***/ (function(module, exports) { /** @@ -52681,7 +54823,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 225 */ +/* 226 */ /***/ (function(module, exports) { /** @@ -52735,7 +54877,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 226 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52750,18 +54892,18 @@ module.exports = RotateAroundXY; module.exports = { - 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) + BUTTON_DOWN: __webpack_require__(1229), + BUTTON_UP: __webpack_require__(1230), + CONNECTED: __webpack_require__(1231), + DISCONNECTED: __webpack_require__(1232), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1233), + GAMEPAD_BUTTON_UP: __webpack_require__(1234) }; /***/ }), -/* 227 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52770,8 +54912,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); -var XHRSettings = __webpack_require__(144); +var Extend = __webpack_require__(18); +var XHRSettings = __webpack_require__(146); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -52809,7 +54951,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 228 */ +/* 229 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52819,12 +54961,12 @@ module.exports = MergeXHRSettings; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(388); +var ParseXML = __webpack_require__(389); /** * @classdesc @@ -52963,14 +55105,14 @@ var XMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#xml - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig|Phaser.Types.Loader.FileTypes.XMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('xml', function (key, url, xhrSettings) { @@ -52994,7 +55136,7 @@ module.exports = XMLFile; /***/ }), -/* 229 */ +/* 230 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53009,46 +55151,18 @@ module.exports = XMLFile; module.exports = { - 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) - -}; - - -/***/ }), -/* 230 */ -/***/ (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.Arcade.Events - */ - -module.exports = { - - 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) + Acceleration: __webpack_require__(1290), + Angular: __webpack_require__(1291), + Bounce: __webpack_require__(1292), + Debug: __webpack_require__(1293), + Drag: __webpack_require__(1294), + Enable: __webpack_require__(1295), + Friction: __webpack_require__(1296), + Gravity: __webpack_require__(1297), + Immovable: __webpack_require__(1298), + Mass: __webpack_require__(1299), + Size: __webpack_require__(1300), + Velocity: __webpack_require__(1301) }; @@ -53064,14 +55178,19 @@ module.exports = { */ /** - * @namespace Phaser.Physics.Impact.Events + * @namespace Phaser.Physics.Arcade.Events */ module.exports = { - COLLIDE: __webpack_require__(1319), - PAUSE: __webpack_require__(1320), - RESUME: __webpack_require__(1321) + COLLIDE: __webpack_require__(1303), + OVERLAP: __webpack_require__(1304), + PAUSE: __webpack_require__(1305), + RESUME: __webpack_require__(1306), + TILE_COLLIDE: __webpack_require__(1307), + TILE_OVERLAP: __webpack_require__(1308), + WORLD_BOUNDS: __webpack_require__(1309), + WORLD_STEP: __webpack_require__(1310) }; @@ -53080,38 +55199,6 @@ module.exports = { /* 232 */ /***/ (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.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). @@ -53125,11 +55212,11 @@ var Composites = {}; module.exports = Composites; -var Composite = __webpack_require__(68); -var Constraint = __webpack_require__(78); -var Common = __webpack_require__(19); +var Composite = __webpack_require__(67); +var Constraint = __webpack_require__(79); +var Common = __webpack_require__(20); var Body = __webpack_require__(25); -var Bodies = __webpack_require__(42); +var Bodies = __webpack_require__(43); (function() { @@ -53442,7 +55529,7 @@ var Bodies = __webpack_require__(42); /***/ }), -/* 234 */ +/* 233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53459,8 +55546,8 @@ var Svg = {}; module.exports = Svg; -var Bounds = __webpack_require__(38); -var Common = __webpack_require__(19); +var Bounds = __webpack_require__(37); +var Common = __webpack_require__(20); (function() { @@ -53673,7 +55760,7 @@ var Common = __webpack_require__(19); })(); /***/ }), -/* 235 */ +/* 234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53684,10 +55771,10 @@ var Common = __webpack_require__(19); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(42); +var Bodies = __webpack_require__(43); var Body = __webpack_require__(25); -var Common = __webpack_require__(19); -var GetFastValue = __webpack_require__(1); +var Common = __webpack_require__(20); +var GetFastValue = __webpack_require__(2); var Vertices = __webpack_require__(31); /** @@ -53815,7 +55902,7 @@ module.exports = PhysicsEditorParser; /***/ }), -/* 236 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53824,7 +55911,7 @@ module.exports = PhysicsEditorParser; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(42); +var Bodies = __webpack_require__(43); var Body = __webpack_require__(25); /** @@ -53932,7 +56019,7 @@ module.exports = PhysicsJSONParser; /***/ }), -/* 237 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53947,28 +56034,28 @@ module.exports = PhysicsJSONParser; 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) + AFTER_ADD: __webpack_require__(1331), + AFTER_REMOVE: __webpack_require__(1332), + AFTER_UPDATE: __webpack_require__(1333), + BEFORE_ADD: __webpack_require__(1334), + BEFORE_REMOVE: __webpack_require__(1335), + BEFORE_UPDATE: __webpack_require__(1336), + COLLISION_ACTIVE: __webpack_require__(1337), + COLLISION_END: __webpack_require__(1338), + COLLISION_START: __webpack_require__(1339), + DRAG_END: __webpack_require__(1340), + DRAG: __webpack_require__(1341), + DRAG_START: __webpack_require__(1342), + PAUSE: __webpack_require__(1343), + RESUME: __webpack_require__(1344), + SLEEP_END: __webpack_require__(1345), + SLEEP_START: __webpack_require__(1346) }; /***/ }), -/* 238 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53977,12 +56064,13 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(42); +var Bodies = __webpack_require__(43); var Body = __webpack_require__(25); var Class = __webpack_require__(0); -var Components = __webpack_require__(147); -var GetFastValue = __webpack_require__(1); -var HasValue = __webpack_require__(91); +var Components = __webpack_require__(149); +var EventEmitter = __webpack_require__(9); +var GetFastValue = __webpack_require__(2); +var HasValue = __webpack_require__(110); var Vertices = __webpack_require__(31); /** @@ -54000,6 +56088,7 @@ var Vertices = __webpack_require__(31); * * @class TileBody * @memberof Phaser.Physics.Matter + * @extends Phaser.Events.EventEmitter * @constructor * @since 3.0.0 * @@ -54018,6 +56107,8 @@ var Vertices = __webpack_require__(31); */ var MatterTileBody = new Class({ + Extends: EventEmitter, + Mixins: [ Components.Bounce, Components.Collision, @@ -54033,6 +56124,8 @@ var MatterTileBody = new Class({ function MatterTileBody (world, tile, options) { + EventEmitter.call(this); + /** * The tile object the body is associated with. * @@ -54273,6 +56366,7 @@ var MatterTileBody = new Class({ { this.removeBody(); this.tile.physics.matterBody = undefined; + this.removeAllListeners(); } }); @@ -54281,7 +56375,7 @@ module.exports = MatterTileBody; /***/ }), -/* 239 */ +/* 238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54294,35 +56388,35 @@ module.exports = MatterTileBody; * @namespace Phaser.Physics.Matter.Matter */ -var Matter = __webpack_require__(508); +var Matter = __webpack_require__(504); Matter.Body = __webpack_require__(25); -Matter.Composite = __webpack_require__(68); -Matter.World = __webpack_require__(241); +Matter.Composite = __webpack_require__(67); +Matter.World = __webpack_require__(240); -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.Detector = __webpack_require__(150); +Matter.Grid = __webpack_require__(241); +Matter.Pairs = __webpack_require__(242); +Matter.Pair = __webpack_require__(112); +Matter.Query = __webpack_require__(505); +Matter.Resolver = __webpack_require__(243); +Matter.SAT = __webpack_require__(151); -Matter.Constraint = __webpack_require__(78); +Matter.Constraint = __webpack_require__(79); -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.Common = __webpack_require__(20); +Matter.Engine = __webpack_require__(506); +Matter.Events = __webpack_require__(93); +Matter.Sleeping = __webpack_require__(92); +Matter.Plugin = __webpack_require__(239); -Matter.Bodies = __webpack_require__(42); -Matter.Composites = __webpack_require__(233); +Matter.Bodies = __webpack_require__(43); +Matter.Composites = __webpack_require__(232); -Matter.Axes = __webpack_require__(146); -Matter.Bounds = __webpack_require__(38); -Matter.Svg = __webpack_require__(234); -Matter.Vector = __webpack_require__(37); +Matter.Axes = __webpack_require__(148); +Matter.Bounds = __webpack_require__(37); +Matter.Svg = __webpack_require__(233); +Matter.Vector = __webpack_require__(36); Matter.Vertices = __webpack_require__(31); // aliases @@ -54338,7 +56432,7 @@ module.exports = Matter; /***/ }), -/* 240 */ +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54351,7 +56445,7 @@ var Plugin = {}; module.exports = Plugin; -var Common = __webpack_require__(19); +var Common = __webpack_require__(20); (function() { @@ -54688,7 +56782,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 241 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54708,9 +56802,9 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(68); -var Constraint = __webpack_require__(78); -var Common = __webpack_require__(19); +var Composite = __webpack_require__(67); +var Constraint = __webpack_require__(79); +var Common = __webpack_require__(20); (function() { @@ -54841,7 +56935,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 242 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54854,9 +56948,9 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(114); -var Detector = __webpack_require__(148); -var Common = __webpack_require__(19); +var Pair = __webpack_require__(112); +var Detector = __webpack_require__(150); +var Common = __webpack_require__(20); (function() { @@ -55168,7 +57262,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 243 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55181,8 +57275,8 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(114); -var Common = __webpack_require__(19); +var Pair = __webpack_require__(112); +var Common = __webpack_require__(20); (function() { @@ -55333,7 +57427,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 244 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55347,9 +57441,9 @@ 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); +var Vector = __webpack_require__(36); +var Common = __webpack_require__(20); +var Bounds = __webpack_require__(37); (function() { @@ -55689,7 +57783,7 @@ var Bounds = __webpack_require__(38); /***/ }), -/* 245 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55698,7 +57792,7 @@ var Bounds = __webpack_require__(38); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(151); +var GetTileAt = __webpack_require__(153); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -55765,7 +57859,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 246 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55774,10 +57868,10 @@ module.exports = CalculateFacesAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tile = __webpack_require__(80); -var IsInLayerBounds = __webpack_require__(115); -var CalculateFacesAt = __webpack_require__(245); -var SetTileCollision = __webpack_require__(79); +var Tile = __webpack_require__(81); +var IsInLayerBounds = __webpack_require__(113); +var CalculateFacesAt = __webpack_require__(244); +var SetTileCollision = __webpack_require__(80); /** * Puts a tile at the given tile coordinates in the specified layer. You can pass in either an index @@ -55845,7 +57939,7 @@ module.exports = PutTileAt; /***/ }), -/* 247 */ +/* 246 */ /***/ (function(module, exports) { /** @@ -55884,7 +57978,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 248 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55893,10 +57987,10 @@ module.exports = SetLayerCollisionIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(34); -var LayerData = __webpack_require__(116); -var MapData = __webpack_require__(117); -var Tile = __webpack_require__(80); +var Formats = __webpack_require__(35); +var LayerData = __webpack_require__(114); +var MapData = __webpack_require__(115); +var Tile = __webpack_require__(81); /** * Parses a 2D array of tile indexes into a new MapData object with a single layer. @@ -55915,7 +58009,7 @@ var Tile = __webpack_require__(80); * consumption. However if your map is small or you need to update the tiles dynamically, then leave * the default value set. * - * @return {Phaser.Tilemaps.MapData} [description] + * @return {Phaser.Tilemaps.MapData} The MapData object. */ var Parse2DArray = function (name, data, tileWidth, tileHeight, insertNull) { @@ -55976,7 +58070,7 @@ module.exports = Parse2DArray; /***/ }), -/* 249 */ +/* 248 */ /***/ (function(module, exports) { /** @@ -55996,9 +58090,9 @@ var FLIPPED_ANTI_DIAGONAL = 0x20000000; // Top-right is swapped with bottom-left * @function Phaser.Tilemaps.Parsers.Tiled.ParseGID * @since 3.0.0 * - * @param {number} gid - [description] + * @param {number} gid - A Tiled GID. * - * @return {object} [description] + * @return {Phaser.Types.Tilemaps.GIDData} The GID Data. */ var ParseGID = function (gid) { @@ -56066,7 +58160,7 @@ module.exports = ParseGID; /***/ }), -/* 250 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56075,7 +58169,7 @@ module.exports = ParseGID; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Parse a Tiled group layer and create a state object for inheriting. @@ -56127,7 +58221,7 @@ module.exports = CreateGroupLayer; /***/ }), -/* 251 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56136,8 +58230,8 @@ module.exports = CreateGroupLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(524); -var ParseGID = __webpack_require__(249); +var Pick = __webpack_require__(520); +var ParseGID = __webpack_require__(248); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -56185,21 +58279,19 @@ var ParseObject = function (tiledObject, offsetX, offsetY) else if (tiledObject.ellipse) { parsedObject.ellipse = tiledObject.ellipse; - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; } else if (tiledObject.text) { - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; parsedObject.text = tiledObject.text; } + else if (tiledObject.point) + { + parsedObject.point = true; + } else { // Otherwise, assume it is a rectangle parsedObject.rectangle = true; - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; } return parsedObject; @@ -56209,7 +58301,7 @@ module.exports = ParseObject; /***/ }), -/* 252 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56218,10 +58310,10 @@ module.exports = ParseObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(34); -var MapData = __webpack_require__(117); -var Parse = __webpack_require__(516); -var Tilemap = __webpack_require__(532); +var Formats = __webpack_require__(35); +var MapData = __webpack_require__(115); +var Parse = __webpack_require__(512); +var Tilemap = __webpack_require__(528); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -56295,7 +58387,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 253 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56344,7 +58436,7 @@ module.exports = GetTargets; /***/ }), -/* 254 */ +/* 253 */ /***/ (function(module, exports) { /** @@ -56612,7 +58704,7 @@ module.exports = GetValueOp; /***/ }), -/* 255 */ +/* 254 */ /***/ (function(module, exports) { /** @@ -56656,7 +58748,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 256 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56667,11 +58759,11 @@ module.exports = TWEEN_DEFAULTS; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(257); +var Events = __webpack_require__(256); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(6); -var TWEEN_CONST = __webpack_require__(100); -var MATH_CONST = __webpack_require__(13); +var TWEEN_CONST = __webpack_require__(98); +var MATH_CONST = __webpack_require__(14); /** * @classdesc @@ -58300,7 +60392,7 @@ module.exports = Tween; /***/ }), -/* 257 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58315,25 +60407,25 @@ module.exports = Tween; module.exports = { - 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) + TIMELINE_COMPLETE: __webpack_require__(1414), + TIMELINE_LOOP: __webpack_require__(1415), + TIMELINE_PAUSE: __webpack_require__(1416), + TIMELINE_RESUME: __webpack_require__(1417), + TIMELINE_START: __webpack_require__(1418), + TIMELINE_UPDATE: __webpack_require__(1419), + TWEEN_ACTIVE: __webpack_require__(1420), + TWEEN_COMPLETE: __webpack_require__(1421), + TWEEN_LOOP: __webpack_require__(1422), + TWEEN_REPEAT: __webpack_require__(1423), + TWEEN_START: __webpack_require__(1424), + TWEEN_UPDATE: __webpack_require__(1425), + TWEEN_YOYO: __webpack_require__(1426) }; /***/ }), -/* 258 */ +/* 257 */ /***/ (function(module, exports) { /** @@ -58460,7 +60552,7 @@ module.exports = TweenData; /***/ }), -/* 259 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58475,65 +60567,65 @@ module.exports = TweenData; module.exports = { - 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), + AlignTo: __webpack_require__(549), + Angle: __webpack_require__(550), + Call: __webpack_require__(551), + GetFirst: __webpack_require__(552), + GetLast: __webpack_require__(553), + GridAlign: __webpack_require__(554), + IncAlpha: __webpack_require__(615), + IncX: __webpack_require__(616), + IncXY: __webpack_require__(617), + IncY: __webpack_require__(618), + PlaceOnCircle: __webpack_require__(619), + PlaceOnEllipse: __webpack_require__(620), + PlaceOnLine: __webpack_require__(621), + PlaceOnRectangle: __webpack_require__(622), + PlaceOnTriangle: __webpack_require__(623), + PlayAnimation: __webpack_require__(624), PropertyValueInc: __webpack_require__(39), PropertyValueSet: __webpack_require__(27), - 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) + RandomCircle: __webpack_require__(625), + RandomEllipse: __webpack_require__(626), + RandomLine: __webpack_require__(627), + RandomRectangle: __webpack_require__(628), + RandomTriangle: __webpack_require__(629), + Rotate: __webpack_require__(630), + RotateAround: __webpack_require__(631), + RotateAroundDistance: __webpack_require__(632), + ScaleX: __webpack_require__(633), + ScaleXY: __webpack_require__(634), + ScaleY: __webpack_require__(635), + SetAlpha: __webpack_require__(636), + SetBlendMode: __webpack_require__(637), + SetDepth: __webpack_require__(638), + SetHitArea: __webpack_require__(639), + SetOrigin: __webpack_require__(640), + SetRotation: __webpack_require__(641), + SetScale: __webpack_require__(642), + SetScaleX: __webpack_require__(643), + SetScaleY: __webpack_require__(644), + SetScrollFactor: __webpack_require__(645), + SetScrollFactorX: __webpack_require__(646), + SetScrollFactorY: __webpack_require__(647), + SetTint: __webpack_require__(648), + SetVisible: __webpack_require__(649), + SetX: __webpack_require__(650), + SetXY: __webpack_require__(651), + SetY: __webpack_require__(652), + ShiftPosition: __webpack_require__(653), + Shuffle: __webpack_require__(654), + SmootherStep: __webpack_require__(655), + SmoothStep: __webpack_require__(656), + Spread: __webpack_require__(657), + ToggleVisible: __webpack_require__(658), + WrapInRectangle: __webpack_require__(659) }; /***/ }), -/* 260 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58542,22 +60634,22 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(97); +var ALIGN_CONST = __webpack_require__(94); 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); +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(260); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(261); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(262); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(263); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(264); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(265); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(266); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(267); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(268); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(269); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(270); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(271); /** * Takes a Game Object and aligns it next to another, at the given position. @@ -58585,7 +60677,7 @@ module.exports = QuickSet; /***/ }), -/* 261 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58594,10 +60686,10 @@ module.exports = QuickSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(44); -var GetCenterX = __webpack_require__(81); -var SetCenterX = __webpack_require__(82); -var SetTop = __webpack_require__(45); +var GetBottom = __webpack_require__(45); +var GetCenterX = __webpack_require__(82); +var SetCenterX = __webpack_require__(83); +var SetTop = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. @@ -58629,7 +60721,7 @@ module.exports = BottomCenter; /***/ }), -/* 262 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58638,10 +60730,10 @@ module.exports = BottomCenter; * @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); +var GetBottom = __webpack_require__(45); +var GetLeft = __webpack_require__(47); +var SetLeft = __webpack_require__(48); +var SetTop = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. @@ -58673,7 +60765,7 @@ module.exports = BottomLeft; /***/ }), -/* 263 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58682,10 +60774,10 @@ module.exports = BottomLeft; * @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); +var GetBottom = __webpack_require__(45); +var GetRight = __webpack_require__(49); +var SetRight = __webpack_require__(50); +var SetTop = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. @@ -58717,7 +60809,7 @@ module.exports = BottomRight; /***/ }), -/* 264 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58726,10 +60818,10 @@ module.exports = BottomRight; * @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); +var GetBottom = __webpack_require__(45); +var GetLeft = __webpack_require__(47); +var SetBottom = __webpack_require__(51); +var SetRight = __webpack_require__(50); /** * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. @@ -58761,7 +60853,7 @@ module.exports = LeftBottom; /***/ }), -/* 265 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58770,10 +60862,10 @@ module.exports = LeftBottom; * @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); +var GetCenterY = __webpack_require__(84); +var GetLeft = __webpack_require__(47); +var SetCenterY = __webpack_require__(85); +var SetRight = __webpack_require__(50); /** * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. @@ -58805,7 +60897,7 @@ module.exports = LeftCenter; /***/ }), -/* 266 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58814,10 +60906,10 @@ module.exports = LeftCenter; * @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); +var GetLeft = __webpack_require__(47); +var GetTop = __webpack_require__(52); +var SetRight = __webpack_require__(50); +var SetTop = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. @@ -58849,7 +60941,7 @@ module.exports = LeftTop; /***/ }), -/* 267 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58858,10 +60950,10 @@ module.exports = LeftTop; * @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); +var GetBottom = __webpack_require__(45); +var GetRight = __webpack_require__(49); +var SetBottom = __webpack_require__(51); +var SetLeft = __webpack_require__(48); /** * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. @@ -58893,7 +60985,7 @@ module.exports = RightBottom; /***/ }), -/* 268 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58902,10 +60994,10 @@ module.exports = RightBottom; * @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); +var GetCenterY = __webpack_require__(84); +var GetRight = __webpack_require__(49); +var SetCenterY = __webpack_require__(85); +var SetLeft = __webpack_require__(48); /** * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. @@ -58937,7 +61029,7 @@ module.exports = RightCenter; /***/ }), -/* 269 */ +/* 268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58946,10 +61038,10 @@ module.exports = RightCenter; * @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); +var GetRight = __webpack_require__(49); +var GetTop = __webpack_require__(52); +var SetLeft = __webpack_require__(48); +var SetTop = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. @@ -58981,7 +61073,7 @@ module.exports = RightTop; /***/ }), -/* 270 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58990,10 +61082,10 @@ module.exports = RightTop; * @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); +var GetCenterX = __webpack_require__(82); +var GetTop = __webpack_require__(52); +var SetBottom = __webpack_require__(51); +var SetCenterX = __webpack_require__(83); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -59025,7 +61117,7 @@ module.exports = TopCenter; /***/ }), -/* 271 */ +/* 270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59034,10 +61126,10 @@ module.exports = TopCenter; * @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); +var GetLeft = __webpack_require__(47); +var GetTop = __webpack_require__(52); +var SetBottom = __webpack_require__(51); +var SetLeft = __webpack_require__(48); /** * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. @@ -59069,7 +61161,7 @@ module.exports = TopLeft; /***/ }), -/* 272 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59078,10 +61170,10 @@ module.exports = TopLeft; * @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); +var GetRight = __webpack_require__(49); +var GetTop = __webpack_require__(52); +var SetBottom = __webpack_require__(51); +var SetRight = __webpack_require__(50); /** * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. @@ -59113,7 +61205,7 @@ module.exports = TopRight; /***/ }), -/* 273 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59122,19 +61214,19 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(97); +var ALIGN_CONST = __webpack_require__(94); var AlignInMap = []; -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.BOTTOM_CENTER] = __webpack_require__(273); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(274); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(275); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(276); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(278); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(279); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(280); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(281); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(282); 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]; @@ -59166,7 +61258,7 @@ module.exports = QuickSet; /***/ }), -/* 274 */ +/* 273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59175,10 +61267,10 @@ module.exports = QuickSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(44); -var GetCenterX = __webpack_require__(81); -var SetBottom = __webpack_require__(50); -var SetCenterX = __webpack_require__(82); +var GetBottom = __webpack_require__(45); +var GetCenterX = __webpack_require__(82); +var SetBottom = __webpack_require__(51); +var SetCenterX = __webpack_require__(83); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -59210,7 +61302,7 @@ module.exports = BottomCenter; /***/ }), -/* 275 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59219,10 +61311,10 @@ module.exports = BottomCenter; * @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 SetLeft = __webpack_require__(47); +var GetBottom = __webpack_require__(45); +var GetLeft = __webpack_require__(47); +var SetBottom = __webpack_require__(51); +var SetLeft = __webpack_require__(48); /** * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. @@ -59254,7 +61346,7 @@ module.exports = BottomLeft; /***/ }), -/* 276 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59263,10 +61355,10 @@ module.exports = BottomLeft; * @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 SetRight = __webpack_require__(49); +var GetBottom = __webpack_require__(45); +var GetRight = __webpack_require__(49); +var SetBottom = __webpack_require__(51); +var SetRight = __webpack_require__(50); /** * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. @@ -59298,7 +61390,7 @@ module.exports = BottomRight; /***/ }), -/* 277 */ +/* 276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59307,9 +61399,9 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(278); -var GetCenterX = __webpack_require__(81); -var GetCenterY = __webpack_require__(83); +var CenterOn = __webpack_require__(277); +var GetCenterX = __webpack_require__(82); +var GetCenterY = __webpack_require__(84); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -59340,7 +61432,7 @@ module.exports = Center; /***/ }), -/* 278 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59349,8 +61441,8 @@ module.exports = Center; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetCenterX = __webpack_require__(82); -var SetCenterY = __webpack_require__(84); +var SetCenterX = __webpack_require__(83); +var SetCenterY = __webpack_require__(85); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -59377,7 +61469,7 @@ module.exports = CenterOn; /***/ }), -/* 279 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59386,10 +61478,10 @@ module.exports = CenterOn; * @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 SetLeft = __webpack_require__(47); +var GetCenterY = __webpack_require__(84); +var GetLeft = __webpack_require__(47); +var SetCenterY = __webpack_require__(85); +var SetLeft = __webpack_require__(48); /** * Takes given Game Object and aligns it so that it is positioned in the left center of the other. @@ -59421,7 +61513,7 @@ module.exports = LeftCenter; /***/ }), -/* 280 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59430,10 +61522,10 @@ module.exports = LeftCenter; * @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 SetRight = __webpack_require__(49); +var GetCenterY = __webpack_require__(84); +var GetRight = __webpack_require__(49); +var SetCenterY = __webpack_require__(85); +var SetRight = __webpack_require__(50); /** * Takes given Game Object and aligns it so that it is positioned in the right center of the other. @@ -59465,7 +61557,7 @@ module.exports = RightCenter; /***/ }), -/* 281 */ +/* 280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59474,10 +61566,10 @@ module.exports = RightCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterX = __webpack_require__(81); -var GetTop = __webpack_require__(51); -var SetCenterX = __webpack_require__(82); -var SetTop = __webpack_require__(45); +var GetCenterX = __webpack_require__(82); +var GetTop = __webpack_require__(52); +var SetCenterX = __webpack_require__(83); +var SetTop = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -59509,7 +61601,7 @@ module.exports = TopCenter; /***/ }), -/* 282 */ +/* 281 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59518,10 +61610,10 @@ module.exports = TopCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(46); -var GetTop = __webpack_require__(51); -var SetLeft = __webpack_require__(47); -var SetTop = __webpack_require__(45); +var GetLeft = __webpack_require__(47); +var GetTop = __webpack_require__(52); +var SetLeft = __webpack_require__(48); +var SetTop = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -59553,7 +61645,7 @@ module.exports = TopLeft; /***/ }), -/* 283 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59562,10 +61654,10 @@ module.exports = TopLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(48); -var GetTop = __webpack_require__(51); -var SetRight = __webpack_require__(49); -var SetTop = __webpack_require__(45); +var GetRight = __webpack_require__(49); +var GetTop = __webpack_require__(52); +var SetRight = __webpack_require__(50); +var SetTop = __webpack_require__(46); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -59597,7 +61689,7 @@ module.exports = TopRight; /***/ }), -/* 284 */ +/* 283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59606,9 +61698,9 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(158); -var FromPercent = __webpack_require__(98); -var MATH_CONST = __webpack_require__(13); +var CircumferencePoint = __webpack_require__(159); +var FromPercent = __webpack_require__(95); +var MATH_CONST = __webpack_require__(14); var Point = __webpack_require__(4); /** @@ -59640,7 +61732,7 @@ module.exports = GetPoint; /***/ }), -/* 285 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59649,10 +61741,10 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(286); -var CircumferencePoint = __webpack_require__(158); -var FromPercent = __webpack_require__(98); -var MATH_CONST = __webpack_require__(13); +var Circumference = __webpack_require__(285); +var CircumferencePoint = __webpack_require__(159); +var FromPercent = __webpack_require__(95); +var MATH_CONST = __webpack_require__(14); /** * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle, @@ -59673,7 +61765,7 @@ var GetPoints = function (circle, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Circumference(circle) / stepRate; } @@ -59692,7 +61784,7 @@ module.exports = GetPoints; /***/ }), -/* 286 */ +/* 285 */ /***/ (function(module, exports) { /** @@ -59720,7 +61812,7 @@ module.exports = Circumference; /***/ }), -/* 287 */ +/* 286 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59729,7 +61821,7 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 @@ -59830,7 +61922,7 @@ module.exports = AlphaSingle; /***/ }), -/* 288 */ +/* 287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59839,9 +61931,9 @@ module.exports = AlphaSingle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = __webpack_require__(160); +var BaseAnimation = __webpack_require__(161); var Class = __webpack_require__(0); -var Events = __webpack_require__(119); +var Events = __webpack_require__(118); /** * @classdesc @@ -60132,14 +62224,14 @@ var Animation = new Class({ /** * Sets an animation to be played immediately after the current one completes. - * + * * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. - * + * * An animation set to repeat forever will never enter a completed state. - * + * * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. - * + * * Call this method with no arguments to reset the chained animation. * * @method Phaser.GameObjects.Components.Animation#chain @@ -60331,7 +62423,7 @@ var Animation = new Class({ /** * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. - * + * * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. * * @method Phaser.GameObjects.Components.Animation#play @@ -60405,9 +62497,9 @@ var Animation = new Class({ * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. * * @method Phaser.GameObjects.Components.Animation#_startAnimation - * @fires Phaser.Animations.Events#START_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_START_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_START_KEY_ANIMATION_EVENT + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.12.0 * * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. @@ -60612,9 +62704,9 @@ var Animation = new Class({ * Restarts the current animation from its beginning, optionally including its delay value. * * @method Phaser.GameObjects.Components.Animation#restart - * @fires Phaser.Animations.Events#RESTART_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_RESTART_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_RESTART_KEY_ANIMATION_EVENT + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART * @since 3.0.0 * * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. @@ -60651,9 +62743,9 @@ var Animation = new Class({ /** * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. - * + * * If no animation is set, no event will be dispatched. - * + * * If there is another animation queued (via the `chain` method) then it will start playing immediately. * * @method Phaser.GameObjects.Components.Animation#stop @@ -60677,7 +62769,7 @@ var Animation = new Class({ anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); - + gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); } @@ -60855,13 +62947,16 @@ var Animation = new Class({ gameObject.setSizeToFrame(); - if (animationFrame.frame.customPivot) + if (gameObject._originComponent) { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } } return gameObject; @@ -60871,8 +62966,8 @@ var Animation = new Class({ * Internal frame change handler. * * @method Phaser.GameObjects.Components.Animation#updateFrame - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE_EVENT - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE_EVENT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE * @private * @since 3.0.0 * @@ -60905,7 +63000,7 @@ var Animation = new Class({ /** * Advances the animation to the next frame, regardless of the time or animation state. * If the animation is set to repeat, or yoyo, this will still take effect. - * + * * Calling this does not change the direction of the animation. I.e. if it was currently * playing in reverse, calling this method doesn't then change the direction to forwards. * @@ -60927,7 +63022,7 @@ var Animation = new Class({ /** * Advances the animation to the previous frame, regardless of the time or animation state. * If the animation is set to repeat, or yoyo, this will still take effect. - * + * * Calling this does not change the direction of the animation. I.e. if it was currently * playing in forwards, calling this method doesn't then change the direction to backwards. * @@ -61005,7 +63100,7 @@ module.exports = Animation; /***/ }), -/* 289 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -61089,7 +63184,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 290 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61263,7 +63358,7 @@ module.exports = AnimationFrame; /***/ }), -/* 291 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61272,7 +63367,7 @@ module.exports = AnimationFrame; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(43); +var BlendModes = __webpack_require__(44); /** * Provides methods used for setting the blend mode of a Game Object. @@ -61385,7 +63480,7 @@ module.exports = BlendMode; /***/ }), -/* 292 */ +/* 291 */ /***/ (function(module, exports) { /** @@ -61478,7 +63573,7 @@ module.exports = Depth; /***/ }), -/* 293 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61487,8 +63582,8 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(161); -var Perimeter = __webpack_require__(120); +var GetPoint = __webpack_require__(162); +var Perimeter = __webpack_require__(119); // Return an array of points from the perimeter of the rectangle // each spaced out based on the quantity or step required @@ -61513,7 +63608,7 @@ var GetPoints = function (rectangle, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Perimeter(rectangle) / stepRate; } @@ -61532,7 +63627,7 @@ module.exports = GetPoints; /***/ }), -/* 294 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61571,7 +63666,7 @@ module.exports = GetPoint; /***/ }), -/* 295 */ +/* 294 */ /***/ (function(module, exports) { /** @@ -61581,17 +63676,21 @@ module.exports = GetPoint; */ /** - * Rotate a `point` around `x` and `y` by the given `angle`. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. + * + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). * * @function Phaser.Math.RotateAround * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * - * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAround = function (point, x, y, angle) { @@ -61611,7 +63710,7 @@ module.exports = RotateAround; /***/ }), -/* 296 */ +/* 295 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61620,8 +63719,8 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(297); -var GeometryMask = __webpack_require__(298); +var BitmapMask = __webpack_require__(296); +var GeometryMask = __webpack_require__(297); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -61758,7 +63857,7 @@ module.exports = Mask; /***/ }), -/* 297 */ +/* 296 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62051,7 +64150,7 @@ module.exports = BitmapMask; /***/ }), -/* 298 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62366,7 +64465,7 @@ module.exports = GeometryMask; /***/ }), -/* 299 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -62473,7 +64572,7 @@ module.exports = ScrollFactor; /***/ }), -/* 300 */ +/* 299 */ /***/ (function(module, exports) { /** @@ -62534,7 +64633,7 @@ module.exports = ToJSON; /***/ }), -/* 301 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62543,10 +64642,10 @@ module.exports = ToJSON; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); -var TransformMatrix = __webpack_require__(35); -var WrapAngle = __webpack_require__(165); -var WrapAngleDegrees = __webpack_require__(166); +var MATH_CONST = __webpack_require__(14); +var TransformMatrix = __webpack_require__(32); +var WrapAngle = __webpack_require__(166); +var WrapAngleDegrees = __webpack_require__(167); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -62764,8 +64863,8 @@ 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. + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. * * If you prefer to work in degrees, see the `angle` property instead. * @@ -63073,7 +65172,7 @@ module.exports = Transform; /***/ }), -/* 302 */ +/* 301 */ /***/ (function(module, exports) { /** @@ -63162,7 +65261,7 @@ module.exports = Visible; /***/ }), -/* 303 */ +/* 302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63177,16 +65276,16 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(604), - CHANGE_DATA_KEY: __webpack_require__(605), - REMOVE_DATA: __webpack_require__(606), - SET_DATA: __webpack_require__(607) + CHANGE_DATA: __webpack_require__(600), + CHANGE_DATA_KEY: __webpack_require__(601), + REMOVE_DATA: __webpack_require__(602), + SET_DATA: __webpack_require__(603) }; /***/ }), -/* 304 */ +/* 303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63195,25 +65294,25 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Perimeter = __webpack_require__(120); +var Perimeter = __webpack_require__(119); var Point = __webpack_require__(4); /** - * Return an array of points from the perimeter of the rectangle - * each spaced out based on the quantity or step required + * Returns an array of points from the perimeter of the Rectangle, where each point is spaced out based + * on either the `step` value, or the `quantity`. * * @function Phaser.Geom.Rectangle.MarchingAnts * @since 3.0.0 * * @generic {Phaser.Geom.Point[]} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {number} step - [description] - * @param {integer} quantity - [description] - * @param {(array|Phaser.Geom.Point[])} [out] - [description] + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the perimeter points from. + * @param {number} [step] - The distance between each point of the perimeter. Set to `null` if you wish to use the `quantity` parameter instead. + * @param {integer} [quantity] - The total number of points to return. The step is then calculated based on the length of the Rectangle, divided by this value. + * @param {(array|Phaser.Geom.Point[])} [out] - An array in which the perimeter points will be stored. If not given, a new array instance is created. * - * @return {(array|Phaser.Geom.Point[])} [description] + * @return {(array|Phaser.Geom.Point[])} An array containing the perimeter points from the Rectangle. */ var MarchingAnts = function (rect, step, quantity, out) { @@ -63305,7 +65404,7 @@ module.exports = MarchingAnts; /***/ }), -/* 305 */ +/* 304 */ /***/ (function(module, exports) { /** @@ -63345,7 +65444,7 @@ module.exports = RotateLeft; /***/ }), -/* 306 */ +/* 305 */ /***/ (function(module, exports) { /** @@ -63385,7 +65484,7 @@ module.exports = RotateRight; /***/ }), -/* 307 */ +/* 306 */ /***/ (function(module, exports) { /** @@ -63459,7 +65558,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 308 */ +/* 307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63468,14 +65567,14 @@ module.exports = BresenhamPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(160); +var Animation = __webpack_require__(161); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(172); +var CustomMap = __webpack_require__(173); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(119); +var Events = __webpack_require__(118); var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(5); -var Pad = __webpack_require__(173); +var Pad = __webpack_require__(174); /** * @classdesc @@ -63595,7 +65694,7 @@ var AnimationManager = new Class({ * @param {string} key - The key under which the Animation should be added. The Animation will be updated with it. Must be unique. * @param {Phaser.Animations.Animation} animation - The Animation which should be added to the Animation Manager. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ add: function (key, animation) { @@ -63603,7 +65702,7 @@ var AnimationManager = new Class({ { console.warn('Animation key exists: ' + key); - return; + return this; } animation.key = key; @@ -63726,7 +65825,34 @@ var AnimationManager = new Class({ }, /** - * [description] + * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. + * + * Generates objects with string based frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNames}. + * + * It's a helper method, designed to make it easier for you to extract all of the frame names from texture atlases. + * If you're working with a sprite sheet, see the `generateFrameNumbers` method instead. + * + * Example: + * + * If you have a texture atlases loaded called `gems` and it contains 6 frames called `ruby_0001`, `ruby_0002`, and so on, + * then you can call this method using: `this.anims.generateFrameNames('gems', { prefix: 'ruby_', end: 6, zeroPad: 4 })`. + * + * The `end` value tells it to look for 6 frames, incrementally numbered, all starting with the prefix `ruby_`. The `zeroPad` + * value tells it how many zeroes pad out the numbers. To create an animation using this method, you can do: + * + * ```javascript + * this.anims.create({ + * key: 'ruby', + * repeat: -1, + * frames: this.anims.generateFrameNames('gems', { + * prefix: 'ruby_', + * end: 6, + * zeroPad: 4 + * }) + * }); + * ``` + * + * Please see the animation examples for further details. * * @method Phaser.Animations.AnimationManager#generateFrameNames * @since 3.0.0 @@ -63804,6 +65930,8 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}. + * + * If you're working with a texture atlas, see the `generateFrameNames` method instead. * * @method Phaser.Animations.AnimationManager#generateFrameNumbers * @since 3.0.0 @@ -63921,7 +66049,7 @@ var AnimationManager = new Class({ * @fires Phaser.Animations.Events#PAUSE_ALL * @since 3.0.0 * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ pauseAll: function () { @@ -63944,7 +66072,7 @@ var AnimationManager = new Class({ * @param {string} key - The key of the animation to play on the Game Object. * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ play: function (key, child) { @@ -63957,7 +66085,7 @@ var AnimationManager = new Class({ if (!anim) { - return; + return this; } for (var i = 0; i < child.length; i++) @@ -63969,7 +66097,10 @@ var AnimationManager = new Class({ }, /** - * Remove an animation. + * Removes an Animation from this Animation Manager, based on the given key. + * + * This is a global action. Once an Animation has been removed, no Game Objects + * can carry on using it. * * @method Phaser.Animations.AnimationManager#remove * @fires Phaser.Animations.Events#REMOVE_ANIMATION @@ -63977,7 +66108,7 @@ var AnimationManager = new Class({ * * @param {string} key - The key of the animation to remove. * - * @return {Phaser.Animations.Animation} [description] + * @return {Phaser.Animations.Animation} The Animation instance that was removed from the Animation Manager. */ remove: function (key) { @@ -64000,7 +66131,7 @@ var AnimationManager = new Class({ * @fires Phaser.Animations.Events#RESUME_ALL * @since 3.0.0 * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ resumeAll: function () { @@ -64028,7 +66159,7 @@ var AnimationManager = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ staggerPlay: function (key, children, stagger) { @@ -64043,7 +66174,7 @@ var AnimationManager = new Class({ if (!anim) { - return; + return this; } for (var i = 0; i < children.length; i++) @@ -64055,35 +66186,36 @@ var AnimationManager = new Class({ }, /** - * Get the animation data as javascript object by giving key, or get the data of all animations as array of objects, if key wasn't provided. + * Returns the Animation data as JavaScript object based on the given key. + * Or, if not key is defined, it will return the data of all animations as array of objects. * * @method Phaser.Animations.AnimationManager#toJSON * @since 3.0.0 * - * @param {string} key - [description] + * @param {string} [key] - The animation to get the JSONAnimation data from. If not provided, all animations are returned as an array. * - * @return {Phaser.Types.Animations.JSONAnimations} [description] + * @return {Phaser.Types.Animations.JSONAnimations} The resulting JSONAnimations formatted object. */ toJSON: function (key) { + var output = { + anims: [], + globalTimeScale: this.globalTimeScale + }; + if (key !== undefined && key !== '') { - return this.anims.get(key).toJSON(); + output.anims.push(this.anims.get(key).toJSON()); } else { - var output = { - anims: [], - globalTimeScale: this.globalTimeScale - }; - this.anims.each(function (animationKey, animation) { output.anims.push(animation.toJSON()); }); - - return output; } + + return output; }, /** @@ -64108,7 +66240,7 @@ module.exports = AnimationManager; /***/ }), -/* 309 */ +/* 308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64118,9 +66250,9 @@ module.exports = AnimationManager; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(172); +var CustomMap = __webpack_require__(173); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(310); +var Events = __webpack_require__(309); /** * @classdesc @@ -64173,7 +66305,7 @@ var BaseCache = new Class({ * @param {string} key - The unique key by which the data added to the cache will be referenced. * @param {*} data - The data to be stored in the cache. * - * @return {Phaser.Cache.BaseCache} This BaseCache object. + * @return {this} This BaseCache object. */ add: function (key, data) { @@ -64244,7 +66376,7 @@ var BaseCache = new Class({ * * @param {string} key - The unique key of the item to remove from the cache. * - * @return {Phaser.Cache.BaseCache} This BaseCache object. + * @return {this} This BaseCache object. */ remove: function (key) { @@ -64294,7 +66426,7 @@ module.exports = BaseCache; /***/ }), -/* 310 */ +/* 309 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64309,14 +66441,14 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(666), - REMOVE: __webpack_require__(667) + ADD: __webpack_require__(662), + REMOVE: __webpack_require__(663) }; /***/ }), -/* 311 */ +/* 310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64325,7 +66457,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(309); +var BaseCache = __webpack_require__(308); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(21); @@ -64550,7 +66682,7 @@ module.exports = CacheManager; /***/ }), -/* 312 */ +/* 311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64559,13 +66691,13 @@ module.exports = CacheManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(103); +var BaseCamera = __webpack_require__(101); var CanvasPool = __webpack_require__(28); -var CenterOn = __webpack_require__(178); -var Clamp = __webpack_require__(20); +var CenterOn = __webpack_require__(179); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Effects = __webpack_require__(320); +var Effects = __webpack_require__(319); var Linear = __webpack_require__(123); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -64672,6 +66804,16 @@ var Camera = new Class({ */ this.panEffect = new Effects.Pan(this); + /** + * The Camera Rotate To effect handler. + * To rotate this camera see the `Camera.rotateTo` method. + * + * @name Phaser.Cameras.Scene2D.Camera#rotateToEffect + * @type {Phaser.Cameras.Scene2D.Effects.RotateTo} + * @since 3.23.0 + */ + this.rotateToEffect = new Effects.RotateTo(this); + /** * The Camera Zoom effect handler. * To zoom this camera see the `Camera.zoom` method. @@ -64763,6 +66905,24 @@ var Camera = new Class({ */ this.renderToTexture = false; + /** + * If this Camera is rendering to a texture (via `setRenderToTexture`) then you + * have the option to control if it should also render to the Game canvas as well. + * + * By default, a Camera will render both to its texture and to the Game canvas. + * + * However, if you set ths property to `false` it will only render to the texture + * and skip rendering to the Game canvas. + * + * Setting this property if the Camera isn't rendering to a texture has no effect. + * + * @name Phaser.Cameras.Scene2D.Camera#renderToGame + * @type {boolean} + * @default true + * @since 3.23.0 + */ + this.renderToGame = true; + /** * If this Camera has been set to render to a texture then this holds a reference * to the HTML Canvas Element that the Camera is drawing to. @@ -64859,6 +67019,9 @@ var Camera = new Class({ * * You should not enable this unless you plan on actually using the texture it creates * somehow, otherwise you're just doubling the work required to render your game. + * + * If you only require the Camera to render to a texture, and not also to the Game, + * them set the `renderToGame` parameter to `false`. * * To temporarily disable rendering to a texture, toggle the `renderToTexture` boolean. * @@ -64869,11 +67032,14 @@ var Camera = new Class({ * @since 3.13.0 * * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - An optional WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. + * @param {boolean} [renderToGame=true] - If you do not need the Camera to still render to the Game, set this parameter to `false`. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ - setRenderToTexture: function (pipeline) + setRenderToTexture: function (pipeline, renderToGame) { + if (renderToGame === undefined) { renderToGame = true; } + var renderer = this.scene.sys.game.renderer; if (renderer.gl) @@ -64888,6 +67054,7 @@ var Camera = new Class({ } this.renderToTexture = true; + this.renderToGame = renderToGame; if (pipeline) { @@ -64909,7 +67076,7 @@ var Camera = new Class({ * * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - The WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. Or if left empty it will clear the pipeline. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ setPipeline: function (pipeline) { @@ -64940,7 +67107,7 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#clearRenderToTexture * @since 3.13.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ clearRenderToTexture: function () { @@ -65007,7 +67174,7 @@ var Camera = new Class({ * @param {number} [width] - The width of the deadzone rectangle in pixels. If not specified the deadzone is removed. * @param {number} [height] - The height of the deadzone rectangle in pixels. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ setDeadzone: function (width, height) { @@ -65063,7 +67230,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeIn: function (duration, red, green, blue, callback, context) { @@ -65087,7 +67254,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeOut: function (duration, red, green, blue, callback, context) { @@ -65111,7 +67278,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeFrom: function (duration, red, green, blue, force, callback, context) { @@ -65135,7 +67302,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fade: function (duration, red, green, blue, force, callback, context) { @@ -65159,7 +67326,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ flash: function (duration, red, green, blue, force, callback, context) { @@ -65181,7 +67348,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ shake: function (duration, intensity, force, callback, context) { @@ -65207,13 +67374,37 @@ var Camera = new Class({ * the current camera scroll x coordinate and the current camera scroll y coordinate. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ pan: function (x, y, duration, ease, force, callback, context) { return this.panEffect.start(x, y, duration, ease, force, callback, context); }, + /** + * This effect will rotate the Camera so that the viewport finishes at the given angle in radians, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#rotateTo + * @since 3.23.0 + * + * @param {number} radians - The destination angle in radians to rotate the Camera viewport to. If the angle is positive then the rotation is clockwise else anticlockwise + * @param {boolean} [shortestPath=false] - If shortest path is set to true the camera will rotate in the quickest direction clockwise or anti-clockwise. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the rotation. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the rotation effect to start immediately, even if already running. + * @param {CameraRotateCallback} [callback] - This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera rotation angle in radians. + * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + rotateTo: function (radians, shortestPath, duration, ease, force, callback, context) + { + return this.rotateToEffect.start(radians, shortestPath, duration, ease, force, callback, context); + }, + /** * This effect will zoom the Camera to the given scale, over the duration and with the ease specified. * @@ -65231,7 +67422,7 @@ var Camera = new Class({ * the current camera scroll x coordinate and the current camera scroll y coordinate. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ zoomTo: function (zoom, duration, ease, force, callback, context) { @@ -65464,7 +67655,7 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#stopFollow * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ stopFollow: function () { @@ -65480,10 +67671,11 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#resetFX * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ resetFX: function () { + this.rotateToEffect.reset(); this.panEffect.reset(); this.shakeEffect.reset(); this.flashEffect.reset(); @@ -65506,6 +67698,7 @@ var Camera = new Class({ { if (this.visible) { + this.rotateToEffect.update(time, delta); this.panEffect.update(time, delta); this.zoomEffect.update(time, delta); this.shakeEffect.update(time, delta); @@ -65543,7 +67736,7 @@ module.exports = Camera; /***/ }), -/* 313 */ +/* 312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65552,7 +67745,7 @@ module.exports = Camera; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(34); /** * Converts a hex string into a Phaser Color object. @@ -65596,7 +67789,7 @@ module.exports = HexStringToColor; /***/ }), -/* 314 */ +/* 313 */ /***/ (function(module, exports) { /** @@ -65627,7 +67820,7 @@ module.exports = GetColor32; /***/ }), -/* 315 */ +/* 314 */ /***/ (function(module, exports) { /** @@ -65707,7 +67900,7 @@ module.exports = RGBToHSV; /***/ }), -/* 316 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65716,8 +67909,8 @@ module.exports = RGBToHSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(36); -var IntegerToRGB = __webpack_require__(317); +var Color = __webpack_require__(34); +var IntegerToRGB = __webpack_require__(316); /** * Converts the given color value into an instance of a Color object. @@ -65740,7 +67933,7 @@ module.exports = IntegerToColor; /***/ }), -/* 317 */ +/* 316 */ /***/ (function(module, exports) { /** @@ -65788,7 +67981,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 318 */ +/* 317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65797,7 +67990,7 @@ module.exports = IntegerToRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(34); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -65818,7 +68011,7 @@ module.exports = ObjectToColor; /***/ }), -/* 319 */ +/* 318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65827,7 +68020,7 @@ module.exports = ObjectToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(34); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -65864,7 +68057,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 320 */ +/* 319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65879,11 +68072,35 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(688), - Flash: __webpack_require__(689), - Pan: __webpack_require__(690), - Shake: __webpack_require__(723), - Zoom: __webpack_require__(724) + Fade: __webpack_require__(686), + Flash: __webpack_require__(687), + Pan: __webpack_require__(688), + Shake: __webpack_require__(721), + RotateTo: __webpack_require__(722), + Zoom: __webpack_require__(723) + +}; + + +/***/ }), +/* 320 */ +/***/ (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.Back + */ + +module.exports = { + + In: __webpack_require__(689), + Out: __webpack_require__(690), + InOut: __webpack_require__(691) }; @@ -65899,14 +68116,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Back + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(691), - Out: __webpack_require__(692), - InOut: __webpack_require__(693) + In: __webpack_require__(692), + Out: __webpack_require__(693), + InOut: __webpack_require__(694) }; @@ -65922,14 +68139,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Bounce + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(694), - Out: __webpack_require__(695), - InOut: __webpack_require__(696) + In: __webpack_require__(695), + Out: __webpack_require__(696), + InOut: __webpack_require__(697) }; @@ -65945,14 +68162,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Circular + * @namespace Phaser.Math.Easing.Cubic */ module.exports = { - In: __webpack_require__(697), - Out: __webpack_require__(698), - InOut: __webpack_require__(699) + In: __webpack_require__(698), + Out: __webpack_require__(699), + InOut: __webpack_require__(700) }; @@ -65968,14 +68185,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Cubic + * @namespace Phaser.Math.Easing.Elastic */ module.exports = { - In: __webpack_require__(700), - Out: __webpack_require__(701), - InOut: __webpack_require__(702) + In: __webpack_require__(701), + Out: __webpack_require__(702), + InOut: __webpack_require__(703) }; @@ -65991,14 +68208,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Elastic + * @namespace Phaser.Math.Easing.Expo */ module.exports = { - In: __webpack_require__(703), - Out: __webpack_require__(704), - InOut: __webpack_require__(705) + In: __webpack_require__(704), + Out: __webpack_require__(705), + InOut: __webpack_require__(706) }; @@ -66013,40 +68230,13 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -/** - * @namespace Phaser.Math.Easing.Expo - */ - -module.exports = { - - In: __webpack_require__(706), - Out: __webpack_require__(707), - InOut: __webpack_require__(708) - -}; +module.exports = __webpack_require__(707); /***/ }), /* 327 */ /***/ (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__(709); - - -/***/ }), -/* 328 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -66059,9 +68249,32 @@ module.exports = __webpack_require__(709); module.exports = { - In: __webpack_require__(710), - Out: __webpack_require__(711), - InOut: __webpack_require__(712) + In: __webpack_require__(708), + Out: __webpack_require__(709), + InOut: __webpack_require__(710) + +}; + + +/***/ }), +/* 328 */ +/***/ (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__(711), + Out: __webpack_require__(712), + InOut: __webpack_require__(713) }; @@ -66077,14 +68290,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Quintic */ module.exports = { - In: __webpack_require__(713), - Out: __webpack_require__(714), - InOut: __webpack_require__(715) + In: __webpack_require__(714), + Out: __webpack_require__(715), + InOut: __webpack_require__(716) }; @@ -66100,14 +68313,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quintic + * @namespace Phaser.Math.Easing.Sine */ module.exports = { - In: __webpack_require__(716), - Out: __webpack_require__(717), - InOut: __webpack_require__(718) + In: __webpack_require__(717), + Out: __webpack_require__(718), + InOut: __webpack_require__(719) }; @@ -66123,39 +68336,16 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Stepped */ -module.exports = { - - In: __webpack_require__(719), - Out: __webpack_require__(720), - InOut: __webpack_require__(721) - -}; +module.exports = __webpack_require__(720); /***/ }), /* 332 */ /***/ (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.Stepped - */ - -module.exports = __webpack_require__(722); - - -/***/ }), -/* 333 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -66163,15 +68353,15 @@ module.exports = __webpack_require__(722); */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(32); -var Device = __webpack_require__(334); -var GetFastValue = __webpack_require__(1); +var CONST = __webpack_require__(38); +var Device = __webpack_require__(333); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(5); var IsPlainObject = __webpack_require__(7); var PhaserMath = __webpack_require__(181); -var NOOP = __webpack_require__(2); +var NOOP = __webpack_require__(1); var DefaultPlugins = __webpack_require__(186); -var ValueToColor = __webpack_require__(174); +var ValueToColor = __webpack_require__(175); /** * @classdesc @@ -66638,6 +68828,11 @@ var Config = new Class({ */ this.loaderTimeout = GetValue(config, 'loader.timeout', 0); + /** + * @const {boolean} Phaser.Core.Config#loaderWithCredentials - Optional XHR withCredentials value. + */ + this.loaderWithCredentials = GetValue(config, 'loader.withCredentials', false); + /* * Allows `plugins` property to either be an array, in which case it just replaces * the default plugins like previously, or a config object. @@ -66729,7 +68924,7 @@ module.exports = Config; /***/ }), -/* 334 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66766,17 +68961,17 @@ module.exports = { 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) + input: __webpack_require__(752), + audio: __webpack_require__(753), + video: __webpack_require__(754), + fullscreen: __webpack_require__(755), + canvasFeatures: __webpack_require__(334) }; /***/ }), -/* 335 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66890,7 +69085,7 @@ module.exports = init(); /***/ }), -/* 336 */ +/* 335 */ /***/ (function(module, exports) { /** @@ -66921,7 +69116,7 @@ module.exports = Between; /***/ }), -/* 337 */ +/* 336 */ /***/ (function(module, exports) { /** @@ -66957,6 +69152,38 @@ var Normalize = function (angle) module.exports = Normalize; +/***/ }), +/* 337 */ +/***/ (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; + + /***/ }), /* 338 */ /***/ (function(module, exports) { @@ -67072,15 +69299,15 @@ module.exports = LessThan; var Factorial = __webpack_require__(342); /** - * [description] + * Calculates the Bernstein basis from the three factorial coefficients. * * @function Phaser.Math.Bernstein * @since 3.0.0 * - * @param {number} n - [description] - * @param {number} i - [description] + * @param {number} n - The first value. + * @param {number} i - The second value. * - * @return {number} [description] + * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i) */ var Bernstein = function (n, i) { @@ -67269,7 +69496,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(171); +var SmoothStep = __webpack_require__(172); /** * A Smooth Step interpolation method. @@ -67370,35 +69597,6 @@ module.exports = SnapCeil; /* 348 */ /***/ (function(module, exports) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. - * - * @function Phaser.Math.FloatBetween - * @since 3.0.0 - * - * @param {number} min - The lower bound for the float, inclusive. - * @param {number} max - The upper bound for the float exclusive. - * - * @return {number} A random float within the given range. - */ -var FloatBetween = function (min, max) -{ - return Math.random() * (max - min) + min; -}; - -module.exports = FloatBetween; - - -/***/ }), -/* 349 */ -/***/ (function(module, exports) { - /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -67431,7 +69629,7 @@ module.exports = Rotate; /***/ }), -/* 350 */ +/* 349 */ /***/ (function(module, exports) { /** @@ -67460,7 +69658,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 351 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67515,7 +69713,7 @@ module.exports = TransformXY; /***/ }), -/* 352 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68060,7 +70258,7 @@ module.exports = Vector4; /***/ }), -/* 353 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68573,12 +70771,12 @@ var Matrix3 = new Class({ }, /** - * [description] + * Set the values of this Matrix3 to be normalized from the given Matrix4. * * @method Phaser.Math.Matrix3#normalFromMat4 * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} m - [description] + * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ @@ -68653,7 +70851,7 @@ module.exports = Matrix3; /***/ }), -/* 354 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69217,12 +71415,12 @@ var Matrix4 = new Class({ }, /** - * [description] + * Multiply the values of this Matrix4 by those given in the `src` argument. * * @method Phaser.Math.Matrix4#multiplyLocal * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} src - [description] + * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -70014,9 +72212,9 @@ var Matrix4 = new Class({ * @method Phaser.Math.Matrix4#yawPitchRoll * @since 3.0.0 * - * @param {number} yaw - [description] - * @param {number} pitch - [description] - * @param {number} roll - [description] + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -70115,7 +72313,7 @@ module.exports = Matrix4; /***/ }), -/* 355 */ +/* 354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70129,7 +72327,7 @@ module.exports = Matrix4; var Class = __webpack_require__(0); var Vector3 = __webpack_require__(185); -var Matrix3 = __webpack_require__(353); +var Matrix3 = __webpack_require__(352); var EPSILON = 0.000001; @@ -70437,13 +72635,13 @@ var Quaternion = new Class({ }, /** - * [description] + * Rotates this Quaternion based on the two given vectors. * * @method Phaser.Math.Quaternion#rotationTo * @since 3.0.0 * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] + * @param {Phaser.Math.Vector3} a - The transform rotation vector. + * @param {Phaser.Math.Vector3} b - The target rotation vector. * * @return {Phaser.Math.Quaternion} This Quaternion. */ @@ -70887,7 +73085,7 @@ module.exports = Quaternion; /***/ }), -/* 356 */ +/* 355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70896,9 +73094,9 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(357); +var CanvasInterpolation = __webpack_require__(356); var CanvasPool = __webpack_require__(28); -var CONST = __webpack_require__(32); +var CONST = __webpack_require__(38); var Features = __webpack_require__(180); /** @@ -70989,8 +73187,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(358); - WebGLRenderer = __webpack_require__(361); + CanvasRenderer = __webpack_require__(357); + WebGLRenderer = __webpack_require__(360); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -71015,7 +73213,7 @@ module.exports = CreateRenderer; /***/ }), -/* 357 */ +/* 356 */ /***/ (function(module, exports) { /** @@ -71078,7 +73276,7 @@ module.exports = CanvasInterpolation; /***/ }), -/* 358 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71088,13 +73286,13 @@ module.exports = CanvasInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(359); -var CameraEvents = __webpack_require__(55); +var CanvasSnapshot = __webpack_require__(358); +var CameraEvents = __webpack_require__(41); var Class = __webpack_require__(0); -var CONST = __webpack_require__(32); -var GetBlendModes = __webpack_require__(360); -var ScaleEvents = __webpack_require__(104); -var TransformMatrix = __webpack_require__(35); +var CONST = __webpack_require__(38); +var GetBlendModes = __webpack_require__(359); +var ScaleEvents = __webpack_require__(102); +var TransformMatrix = __webpack_require__(32); /** * @classdesc @@ -71539,7 +73737,10 @@ var CanvasRenderer = new Class({ { camera.emit(CameraEvents.POST_RENDER, camera); - scene.sys.context.drawImage(camera.canvas, cx, cy); + if (camera.renderToGame) + { + scene.sys.context.drawImage(camera.canvas, cx, cy); + } } }, @@ -71872,7 +74073,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 359 */ +/* 358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71882,8 +74083,8 @@ module.exports = CanvasRenderer; */ var CanvasPool = __webpack_require__(28); -var Color = __webpack_require__(36); -var GetFastValue = __webpack_require__(1); +var Color = __webpack_require__(34); +var GetFastValue = __webpack_require__(2); /** * Takes a snapshot of an area from the current frame displayed by a canvas. @@ -71965,7 +74166,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 360 */ +/* 359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71974,8 +74175,8 @@ module.exports = CanvasSnapshot; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var modes = __webpack_require__(43); -var CanvasFeatures = __webpack_require__(335); +var modes = __webpack_require__(44); +var CanvasFeatures = __webpack_require__(334); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -72029,7 +74230,7 @@ module.exports = GetBlendModes; /***/ }), -/* 361 */ +/* 360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72039,24 +74240,25 @@ module.exports = GetBlendModes; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCamera = __webpack_require__(103); -var CameraEvents = __webpack_require__(55); +var BaseCamera = __webpack_require__(101); +var CameraEvents = __webpack_require__(41); var Class = __webpack_require__(0); -var CONST = __webpack_require__(32); +var CONST = __webpack_require__(38); var GameEvents = __webpack_require__(21); var IsSizePowerOfTwo = __webpack_require__(127); -var NOOP = __webpack_require__(2); -var ScaleEvents = __webpack_require__(104); -var SpliceOne = __webpack_require__(85); +var NOOP = __webpack_require__(1); +var ScaleEvents = __webpack_require__(102); +var SpliceOne = __webpack_require__(86); var TextureEvents = __webpack_require__(128); -var TransformMatrix = __webpack_require__(35); +var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(362); +var WebGLSnapshot = __webpack_require__(361); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(363); -var ForwardDiffuseLightPipeline = __webpack_require__(364); -var TextureTintPipeline = __webpack_require__(188); +var BitmapMaskPipeline = __webpack_require__(362); +var ForwardDiffuseLightPipeline = __webpack_require__(363); +var TextureTintPipeline = __webpack_require__(187); +var TextureTintStripPipeline = __webpack_require__(366); /** * @callback WebGLContextCallback @@ -72745,6 +74947,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 })); @@ -73955,6 +76158,8 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { + this.setPipeline(this.pipelines.TextureTintPipeline); + var TextureTintPipeline = this.pipelines.TextureTintPipeline; camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); @@ -73972,33 +76177,36 @@ var WebGLRenderer = new Class({ camera.emit(CameraEvents.POST_RENDER, camera); - TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + if (camera.renderToGame) + { + TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); - var getTint = Utils.getTintAppendFloatAlpha; - - var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; - - pipeline.batchTexture( - camera, - camera.glTexture, - camera.width, camera.height, - camera.x, camera.y, - camera.width, camera.height, - camera.zoom, camera.zoom, - camera.rotation, - camera.flipX, !camera.flipY, - 1, 1, - 0, 0, - 0, 0, camera.width, camera.height, - getTint(camera._tintTL, camera._alphaTL), - getTint(camera._tintTR, camera._alphaTR), - getTint(camera._tintBL, camera._alphaBL), - getTint(camera._tintBR, camera._alphaBR), - (camera._isTinted && camera.tintFill), - 0, 0, - this.defaultCamera, - null - ); + var getTint = Utils.getTintAppendFloatAlpha; + + var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + + pipeline.batchTexture( + camera, + camera.glTexture, + camera.width, camera.height, + camera.x, camera.y, + camera.width, camera.height, + camera.zoom, camera.zoom, + camera.rotation, + camera.flipX, !camera.flipY, + 1, 1, + 0, 0, + 0, 0, camera.width, camera.height, + getTint(camera._tintTL, camera._alphaTL), + getTint(camera._tintTR, camera._alphaTR), + getTint(camera._tintBL, camera._alphaBL), + getTint(camera._tintBR, camera._alphaBR), + (camera._isTinted && camera.tintFill), + 0, 0, + this.defaultCamera, + null + ); + } // Force clear the current texture so that items next in the batch (like Graphics) don't try and use it this.setBlankTexture(true); @@ -74576,14 +76784,16 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets a 1f uniform value on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] + * @param {number} x - The 1f value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -74597,15 +76807,17 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the 2f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The 2f x value to set on the named uniform. + * @param {number} y - The 2f y value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -74619,16 +76831,18 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the 3f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} z - [description] + * @param {number} x - The 3f x value to set on the named uniform. + * @param {number} y - The 3f y value to set on the named uniform. + * @param {number} z - The 3f z value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -74642,17 +76856,19 @@ var WebGLRenderer = new Class({ }, /** - * Sets uniform of a WebGLProgram + * Sets the 4f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - X component - * @param {number} y - Y component - * @param {number} z - Z component - * @param {number} w - W component + * @param {number} x - The 4f x value to set on the named uniform. + * @param {number} y - The 4f y value to set on the named uniform. + * @param {number} z - The 4f z value to set on the named uniform. + * @param {number} w - The 4f w value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -74666,7 +76882,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 1fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v * @since 3.13.0 @@ -74687,7 +76905,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 2fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v * @since 3.13.0 @@ -74708,7 +76928,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 3fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v * @since 3.13.0 @@ -74729,7 +76951,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 4fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v * @since 3.13.0 @@ -74751,14 +76975,16 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets a 1i uniform value on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - [description] + * @param {integer} x - The 1i value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -74772,15 +76998,17 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 2i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component - * @param {integer} y - The new Y component + * @param {integer} x - The 2i x value to set on the named uniform. + * @param {integer} y - The 2i y value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -74794,16 +77022,18 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 3i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component - * @param {integer} y - The new Y component - * @param {integer} z - The new Z component + * @param {integer} x - The 3i x value to set on the named uniform. + * @param {integer} y - The 3i y value to set on the named uniform. + * @param {integer} z - The 3i z value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -74817,17 +77047,19 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 4i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - X component - * @param {integer} y - Y component - * @param {integer} z - Z component - * @param {integer} w - W component + * @param {integer} x - The 4i x value to set on the named uniform. + * @param {integer} y - The 4i y value to set on the named uniform. + * @param {integer} z - The 4i z value to set on the named uniform. + * @param {integer} w - The 4i w value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -74841,7 +77073,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a 2x2 matrix uniform variable in the given WebGLProgram. + * Sets the value of a matrix 2fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2 * @since 3.0.0 @@ -74849,7 +77083,7 @@ var WebGLRenderer = new Class({ * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. - * @param {Float32Array} matrix - The new matrix value. + * @param {Float32Array} matrix - A Float32Array or sequence of 4 float values. * * @return {this} This WebGL Renderer instance. */ @@ -74863,15 +77097,17 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the value of a matrix 3fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - [description] - * @param {Float32Array} matrix - [description] + * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. + * @param {Float32Array} matrix - A Float32Array or sequence of 9 float values. * * @return {this} This WebGL Renderer instance. */ @@ -74885,15 +77121,17 @@ var WebGLRenderer = new Class({ }, /** - * Sets uniform of a WebGLProgram + * Sets the value of a matrix 4fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Is the matrix transposed - * @param {Float32Array} matrix - Matrix data + * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. + * @param {Float32Array} matrix - A Float32Array or sequence of 16 float values. * * @return {this} This WebGL Renderer instance. */ @@ -74983,7 +77221,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 362 */ +/* 361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74993,8 +77231,8 @@ module.exports = WebGLRenderer; */ var CanvasPool = __webpack_require__(28); -var Color = __webpack_require__(36); -var GetFastValue = __webpack_require__(1); +var Color = __webpack_require__(34); +var GetFastValue = __webpack_require__(2); /** * Takes a snapshot of an area from the current frame displayed by a WebGL canvas. @@ -75093,7 +77331,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 363 */ +/* 362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75106,7 +77344,7 @@ module.exports = WebGLSnapshot; var Class = __webpack_require__(0); var ShaderSourceFS = __webpack_require__(808); var ShaderSourceVS = __webpack_require__(809); -var WebGLPipeline = __webpack_require__(187); +var WebGLPipeline = __webpack_require__(129); /** * @classdesc @@ -75224,21 +77462,23 @@ var BitmapMaskPipeline = new Class({ }, /** - * [description] + * Resizes this pipeline and updates the projection. * * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize * @since 3.0.0 * - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} resolution - [description] + * @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.resolutionDirty = true; + return this; }, @@ -75251,7 +77491,7 @@ var BitmapMaskPipeline = new Class({ * * @param {Phaser.GameObjects.GameObject} mask - GameObject used as mask. * @param {Phaser.GameObjects.GameObject} maskedObject - GameObject masked by the mask GameObject. - * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera rendering the current mask. */ beginMask: function (mask, maskedObject, camera) { @@ -75356,7 +77596,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 364 */ +/* 363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -75368,7 +77608,7 @@ module.exports = BitmapMaskPipeline; var Class = __webpack_require__(0); var ShaderSourceFS = __webpack_require__(810); -var TextureTintPipeline = __webpack_require__(188); +var TextureTintPipeline = __webpack_require__(187); var LIGHT_COUNT = 10; @@ -75876,754 +78116,83 @@ ForwardDiffuseLightPipeline.LIGHT_COUNT = LIGHT_COUNT; module.exports = ForwardDiffuseLightPipeline; +/***/ }), +/* 364 */ +/***/ (function(module, exports) { + +module.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'); + + /***/ }), /* 365 */ /***/ (function(module, exports) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Implements a model view projection matrices. - * Pipelines can implement this for doing 2D and 3D rendering. - * - * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection - * @since 3.0.0 - */ -var ModelViewProjection = { - - /** - * Dirty flag for checking if model matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - modelMatrixDirty: false, - - /** - * Dirty flag for checking if view matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - viewMatrixDirty: false, - - /** - * Dirty flag for checking if projection matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - projectionMatrixDirty: false, - - /** - * Model matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - modelMatrix: null, - - /** - * View matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - viewMatrix: null, - - /** - * Projection matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - projectionMatrix: null, - - /** - * Initializes MVP matrices with an identity matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit - * @since 3.0.0 - */ - mvpInit: function () - { - this.modelMatrixDirty = true; - this.viewMatrixDirty = true; - this.projectionMatrixDirty = true; - - 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 - ]); - - return this; - }, - - /** - * If dirty flags are set then the matrices are uploaded to the GPU. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate - * @since 3.0.0 - */ - mvpUpdate: function () - { - var program = this.program; - - if (this.modelMatrixDirty) - { - this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); - this.modelMatrixDirty = false; - } - - if (this.viewMatrixDirty) - { - this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); - this.viewMatrixDirty = false; - } - - if (this.projectionMatrixDirty) - { - this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); - this.projectionMatrixDirty = false; - } - - return this; - }, - - /** - * Loads an identity matrix to the model matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity - * @since 3.0.0 - */ - modelIdentity: function () - { - var modelMatrix = this.modelMatrix; - - modelMatrix[0] = 1; - modelMatrix[1] = 0; - modelMatrix[2] = 0; - modelMatrix[3] = 0; - modelMatrix[4] = 0; - modelMatrix[5] = 1; - modelMatrix[6] = 0; - modelMatrix[7] = 0; - modelMatrix[8] = 0; - modelMatrix[9] = 0; - modelMatrix[10] = 1; - modelMatrix[11] = 0; - modelMatrix[12] = 0; - modelMatrix[13] = 0; - modelMatrix[14] = 0; - modelMatrix[15] = 1; - - this.modelMatrixDirty = true; - - return this; - }, - - /** - * Scale model matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. - */ - modelScale: function (x, y, z) - { - var modelMatrix = this.modelMatrix; - - modelMatrix[0] = modelMatrix[0] * x; - modelMatrix[1] = modelMatrix[1] * x; - modelMatrix[2] = modelMatrix[2] * x; - modelMatrix[3] = modelMatrix[3] * x; - modelMatrix[4] = modelMatrix[4] * y; - modelMatrix[5] = modelMatrix[5] * y; - modelMatrix[6] = modelMatrix[6] * y; - modelMatrix[7] = modelMatrix[7] * y; - modelMatrix[8] = modelMatrix[8] * z; - modelMatrix[9] = modelMatrix[9] * z; - modelMatrix[10] = modelMatrix[10] * z; - modelMatrix[11] = modelMatrix[11] * z; - - this.modelMatrixDirty = true; - - return this; - }, - - /** - * Translate model matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. - */ - modelTranslate: function (x, y, z) - { - var modelMatrix = this.modelMatrix; - - modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12]; - modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13]; - modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14]; - modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15]; - - this.modelMatrixDirty = true; - - return this; - }, - - /** - * Rotates the model matrix in the X axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateX: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a10 = modelMatrix[4]; - var a11 = modelMatrix[5]; - var a12 = modelMatrix[6]; - var a13 = modelMatrix[7]; - var a20 = modelMatrix[8]; - var a21 = modelMatrix[9]; - var a22 = modelMatrix[10]; - var a23 = modelMatrix[11]; - - modelMatrix[4] = a10 * c + a20 * s; - modelMatrix[5] = a11 * c + a21 * s; - modelMatrix[6] = a12 * c + a22 * s; - modelMatrix[7] = a13 * c + a23 * s; - modelMatrix[8] = a20 * c - a10 * s; - modelMatrix[9] = a21 * c - a11 * s; - modelMatrix[10] = a22 * c - a12 * s; - modelMatrix[11] = a23 * c - a13 * s; - - this.modelMatrixDirty = true; - - return this; - }, - - /** - * Rotates the model matrix in the Y axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateY: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = modelMatrix[0]; - var a01 = modelMatrix[1]; - var a02 = modelMatrix[2]; - var a03 = modelMatrix[3]; - var a20 = modelMatrix[8]; - var a21 = modelMatrix[9]; - var a22 = modelMatrix[10]; - var a23 = modelMatrix[11]; - - modelMatrix[0] = a00 * c - a20 * s; - modelMatrix[1] = a01 * c - a21 * s; - modelMatrix[2] = a02 * c - a22 * s; - modelMatrix[3] = a03 * c - a23 * s; - modelMatrix[8] = a00 * s + a20 * c; - modelMatrix[9] = a01 * s + a21 * c; - modelMatrix[10] = a02 * s + a22 * c; - modelMatrix[11] = a03 * s + a23 * c; - - this.modelMatrixDirty = true; - - return this; - }, - - /** - * Rotates the model matrix in the Z axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateZ: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = modelMatrix[0]; - var a01 = modelMatrix[1]; - var a02 = modelMatrix[2]; - var a03 = modelMatrix[3]; - var a10 = modelMatrix[4]; - var a11 = modelMatrix[5]; - var a12 = modelMatrix[6]; - var a13 = modelMatrix[7]; - - modelMatrix[0] = a00 * c + a10 * s; - modelMatrix[1] = a01 * c + a11 * s; - modelMatrix[2] = a02 * c + a12 * s; - modelMatrix[3] = a03 * c + a13 * s; - modelMatrix[4] = a10 * c - a00 * s; - modelMatrix[5] = a11 * c - a01 * s; - modelMatrix[6] = a12 * c - a02 * s; - modelMatrix[7] = a13 * c - a03 * s; - - this.modelMatrixDirty = true; - - return this; - }, - - /** - * Loads identity matrix into the view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity - * @since 3.0.0 - * - * @return {this} This Model View Projection. - */ - viewIdentity: function () - { - var viewMatrix = this.viewMatrix; - - viewMatrix[0] = 1; - viewMatrix[1] = 0; - viewMatrix[2] = 0; - viewMatrix[3] = 0; - viewMatrix[4] = 0; - viewMatrix[5] = 1; - viewMatrix[6] = 0; - viewMatrix[7] = 0; - viewMatrix[8] = 0; - viewMatrix[9] = 0; - viewMatrix[10] = 1; - viewMatrix[11] = 0; - viewMatrix[12] = 0; - viewMatrix[13] = 0; - viewMatrix[14] = 0; - viewMatrix[15] = 1; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Scales view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. - */ - viewScale: function (x, y, z) - { - var viewMatrix = this.viewMatrix; - - viewMatrix[0] = viewMatrix[0] * x; - viewMatrix[1] = viewMatrix[1] * x; - viewMatrix[2] = viewMatrix[2] * x; - viewMatrix[3] = viewMatrix[3] * x; - viewMatrix[4] = viewMatrix[4] * y; - viewMatrix[5] = viewMatrix[5] * y; - viewMatrix[6] = viewMatrix[6] * y; - viewMatrix[7] = viewMatrix[7] * y; - viewMatrix[8] = viewMatrix[8] * z; - viewMatrix[9] = viewMatrix[9] * z; - viewMatrix[10] = viewMatrix[10] * z; - viewMatrix[11] = viewMatrix[11] * z; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Translates view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. - */ - viewTranslate: function (x, y, z) - { - var viewMatrix = this.viewMatrix; - - viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12]; - viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13]; - viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14]; - viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15]; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Rotates view matrix in the X axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateX: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a10 = viewMatrix[4]; - var a11 = viewMatrix[5]; - var a12 = viewMatrix[6]; - var a13 = viewMatrix[7]; - var a20 = viewMatrix[8]; - var a21 = viewMatrix[9]; - var a22 = viewMatrix[10]; - var a23 = viewMatrix[11]; - - viewMatrix[4] = a10 * c + a20 * s; - viewMatrix[5] = a11 * c + a21 * s; - viewMatrix[6] = a12 * c + a22 * s; - viewMatrix[7] = a13 * c + a23 * s; - viewMatrix[8] = a20 * c - a10 * s; - viewMatrix[9] = a21 * c - a11 * s; - viewMatrix[10] = a22 * c - a12 * s; - viewMatrix[11] = a23 * c - a13 * s; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Rotates view matrix in the Y axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateY: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = viewMatrix[0]; - var a01 = viewMatrix[1]; - var a02 = viewMatrix[2]; - var a03 = viewMatrix[3]; - var a20 = viewMatrix[8]; - var a21 = viewMatrix[9]; - var a22 = viewMatrix[10]; - var a23 = viewMatrix[11]; - - viewMatrix[0] = a00 * c - a20 * s; - viewMatrix[1] = a01 * c - a21 * s; - viewMatrix[2] = a02 * c - a22 * s; - viewMatrix[3] = a03 * c - a23 * s; - viewMatrix[8] = a00 * s + a20 * c; - viewMatrix[9] = a01 * s + a21 * c; - viewMatrix[10] = a02 * s + a22 * c; - viewMatrix[11] = a03 * s + a23 * c; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Rotates view matrix in the Z axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateZ: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = viewMatrix[0]; - var a01 = viewMatrix[1]; - var a02 = viewMatrix[2]; - var a03 = viewMatrix[3]; - var a10 = viewMatrix[4]; - var a11 = viewMatrix[5]; - var a12 = viewMatrix[6]; - var a13 = viewMatrix[7]; - - viewMatrix[0] = a00 * c + a10 * s; - viewMatrix[1] = a01 * c + a11 * s; - viewMatrix[2] = a02 * c + a12 * s; - viewMatrix[3] = a03 * c + a13 * s; - viewMatrix[4] = a10 * c - a00 * s; - viewMatrix[5] = a11 * c - a01 * s; - viewMatrix[6] = a12 * c - a02 * s; - viewMatrix[7] = a13 * c - a03 * s; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D - * @since 3.0.0 - * - * @param {Float32Array} matrix2D - The Matrix2D. - * - * @return {this} This Model View Projection. - */ - viewLoad2D: function (matrix2D) - { - var vm = this.viewMatrix; - - vm[0] = matrix2D[0]; - vm[1] = matrix2D[1]; - vm[2] = 0.0; - vm[3] = 0.0; - vm[4] = matrix2D[2]; - vm[5] = matrix2D[3]; - vm[6] = 0.0; - vm[7] = 0.0; - vm[8] = matrix2D[4]; - vm[9] = matrix2D[5]; - vm[10] = 1.0; - vm[11] = 0.0; - vm[12] = 0.0; - vm[13] = 0.0; - vm[14] = 0.0; - vm[15] = 1.0; - - this.viewMatrixDirty = true; - - return this; - }, - - - /** - * Copies a 4x4 matrix into the view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad - * @since 3.0.0 - * - * @param {Float32Array} matrix - The Matrix2D. - * - * @return {this} This Model View Projection. - */ - viewLoad: function (matrix) - { - var vm = this.viewMatrix; - - vm[0] = matrix[0]; - vm[1] = matrix[1]; - vm[2] = matrix[2]; - vm[3] = matrix[3]; - vm[4] = matrix[4]; - vm[5] = matrix[5]; - vm[6] = matrix[6]; - vm[7] = matrix[7]; - vm[8] = matrix[8]; - vm[9] = matrix[9]; - vm[10] = matrix[10]; - vm[11] = matrix[11]; - vm[12] = matrix[12]; - vm[13] = matrix[13]; - vm[14] = matrix[14]; - vm[15] = matrix[15]; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Loads identity matrix into the projection matrix. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity - * @since 3.0.0 - * - * @return {this} This Model View Projection. - */ - projIdentity: function () - { - var projectionMatrix = this.projectionMatrix; - - projectionMatrix[0] = 1; - projectionMatrix[1] = 0; - projectionMatrix[2] = 0; - projectionMatrix[3] = 0; - projectionMatrix[4] = 0; - projectionMatrix[5] = 1; - projectionMatrix[6] = 0; - projectionMatrix[7] = 0; - projectionMatrix[8] = 0; - projectionMatrix[9] = 0; - projectionMatrix[10] = 1; - projectionMatrix[11] = 0; - projectionMatrix[12] = 0; - projectionMatrix[13] = 0; - projectionMatrix[14] = 0; - projectionMatrix[15] = 1; - - this.projectionMatrixDirty = true; - - return this; - }, - - /** - * Sets up an orthographic projection matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho - * @since 3.0.0 - * - * @param {number} left - The left value. - * @param {number} right - The right value. - * @param {number} bottom - The bottom value. - * @param {number} top - The top value. - * @param {number} near - The near value. - * @param {number} far - The far value. - * - * @return {this} This Model View Projection. - */ - projOrtho: function (left, right, bottom, top, near, far) - { - var projectionMatrix = this.projectionMatrix; - var leftRight = 1.0 / (left - right); - var bottomTop = 1.0 / (bottom - top); - var nearFar = 1.0 / (near - far); - - projectionMatrix[0] = -2.0 * leftRight; - projectionMatrix[1] = 0.0; - projectionMatrix[2] = 0.0; - projectionMatrix[3] = 0.0; - projectionMatrix[4] = 0.0; - projectionMatrix[5] = -2.0 * bottomTop; - projectionMatrix[6] = 0.0; - projectionMatrix[7] = 0.0; - projectionMatrix[8] = 0.0; - projectionMatrix[9] = 0.0; - projectionMatrix[10] = 2.0 * nearFar; - projectionMatrix[11] = 0.0; - projectionMatrix[12] = (left + right) * leftRight; - projectionMatrix[13] = (top + bottom) * bottomTop; - projectionMatrix[14] = (far + near) * nearFar; - projectionMatrix[15] = 1.0; - - this.projectionMatrixDirty = true; - - return this; - }, - - /** - * Sets up a perspective projection matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp - * @since 3.0.0 - * - * @param {number} fovY - The fov value. - * @param {number} aspectRatio - The aspectRatio value. - * @param {number} near - The near value. - * @param {number} far - The far value. - * - * @return {this} This Model View Projection. - */ - projPersp: function (fovY, aspectRatio, near, far) - { - var projectionMatrix = this.projectionMatrix; - var fov = 1.0 / Math.tan(fovY / 2.0); - var nearFar = 1.0 / (near - far); - - projectionMatrix[0] = fov / aspectRatio; - projectionMatrix[1] = 0.0; - projectionMatrix[2] = 0.0; - projectionMatrix[3] = 0.0; - projectionMatrix[4] = 0.0; - projectionMatrix[5] = fov; - projectionMatrix[6] = 0.0; - projectionMatrix[7] = 0.0; - projectionMatrix[8] = 0.0; - projectionMatrix[9] = 0.0; - projectionMatrix[10] = (far + near) * nearFar; - projectionMatrix[11] = -1.0; - projectionMatrix[12] = 0.0; - projectionMatrix[13] = 0.0; - projectionMatrix[14] = (2.0 * far * near) * nearFar; - projectionMatrix[15] = 0.0; - - this.projectionMatrixDirty = true; - - return this; - } -}; - -module.exports = ModelViewProjection; +module.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'); /***/ }), @@ -76632,11 +78201,421 @@ module.exports = ModelViewProjection; /** * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(32); +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(2); +var ModelViewProjection = __webpack_require__(188); +var ShaderSourceFS = __webpack_require__(364); +var ShaderSourceVS = __webpack_require__(365); +var TransformMatrix = __webpack_require__(32); +var WebGLPipeline = __webpack_require__(129); + +/** + * @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; + + +/***/ }), +/* 367 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var CONST = __webpack_require__(38); /** * Called automatically by Phaser.Game and responsible for creating the console.log debug header. @@ -76757,7 +78736,7 @@ module.exports = DebugHeader; /***/ }), -/* 367 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76768,8 +78747,8 @@ module.exports = DebugHeader; var Class = __webpack_require__(0); var GetValue = __webpack_require__(5); -var NOOP = __webpack_require__(2); -var RequestAnimationFrame = __webpack_require__(368); +var NOOP = __webpack_require__(1); +var RequestAnimationFrame = __webpack_require__(369); // http://www.testufo.com/#test=animation-time-graph @@ -77487,7 +79466,7 @@ module.exports = TimeStep; /***/ }), -/* 368 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77497,7 +79476,7 @@ module.exports = TimeStep; */ var Class = __webpack_require__(0); -var NOOP = __webpack_require__(2); +var NOOP = __webpack_require__(1); /** * @classdesc @@ -77701,7 +79680,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 369 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77792,7 +79771,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 370 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77801,19 +79780,47 @@ module.exports = VisibilityHandler; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(371); +var Arne16 = __webpack_require__(372); var CanvasPool = __webpack_require__(28); var GetValue = __webpack_require__(5); /** - * [description] + * Generates a texture based on the given Create configuration object. + * + * The texture is drawn using a fixed-size indexed palette of 16 colors, where the hex value in the + * data cells map to a single color. For example, if the texture config looked like this: + * + * ```javascript + * var star = [ + * '.....828.....', + * '....72227....', + * '....82228....', + * '...7222227...', + * '2222222222222', + * '8222222222228', + * '.72222222227.', + * '..787777787..', + * '..877777778..', + * '.78778887787.', + * '.27887.78872.', + * '.787.....787.' + * ]; + * + * this.textures.generate('star', { data: star, pixelWidth: 4 }); + * ``` + * + * Then it would generate a texture that is 52 x 48 pixels in size, because each cell of the data array + * represents 1 pixel multiplied by the `pixelWidth` value. The cell values, such as `8`, maps to color + * number 8 in the palette. If a cell contains a period character `.` then it is transparent. + * + * The default palette is Arne16, but you can specify your own using the `palette` property. * * @function Phaser.Create.GenerateTexture * @since 3.0.0 * - * @param {Phaser.Types.Create.GenerateTextureConfig} config - [description] + * @param {Phaser.Types.Create.GenerateTextureConfig} config - The Generate Texture Configuration object. * - * @return {HTMLCanvasElement} [description] + * @return {HTMLCanvasElement} An HTMLCanvasElement which contains the generated texture drawn to it. */ var GenerateTexture = function (config) { @@ -77886,7 +79893,7 @@ module.exports = GenerateTexture; /***/ }), -/* 371 */ +/* 372 */ /***/ (function(module, exports) { /** @@ -77924,7 +79931,7 @@ module.exports = { /***/ }), -/* 372 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77937,7 +79944,7 @@ module.exports = { var Class = __webpack_require__(0); var CubicBezier = __webpack_require__(343); -var Curve = __webpack_require__(86); +var Curve = __webpack_require__(87); var Vector2 = __webpack_require__(3); /** @@ -78151,7 +80158,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 373 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78163,7 +80170,7 @@ module.exports = CubicBezierCurve; // 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__(86); +var Curve = __webpack_require__(87); var DegToRad = __webpack_require__(40); var GetValue = __webpack_require__(5); var RadToDeg = __webpack_require__(184); @@ -78316,14 +80323,14 @@ var EllipseCurve = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.Ellipse#getResolution * @since 3.0.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -78414,7 +80421,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The horizontal radius of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setXRadius: function (value) { @@ -78431,7 +80438,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The vertical radius of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setYRadius: function (value) { @@ -78448,7 +80455,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The width of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setWidth: function (value) { @@ -78465,7 +80472,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The height of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setHeight: function (value) { @@ -78482,7 +80489,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The start angle of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setStartAngle: function (value) { @@ -78499,7 +80506,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The end angle of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setEndAngle: function (value) { @@ -78516,7 +80523,7 @@ var EllipseCurve = new Class({ * * @param {boolean} value - The clockwise state of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setClockwise: function (value) { @@ -78533,7 +80540,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The rotation of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setRotation: function (value) { @@ -78775,7 +80782,7 @@ module.exports = EllipseCurve; /***/ }), -/* 374 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78787,7 +80794,7 @@ module.exports = EllipseCurve; // 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__(86); +var Curve = __webpack_require__(87); var FromPoints = __webpack_require__(189); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -78974,19 +80981,17 @@ var LineCurve = new Class({ return tangent.normalize(); }, - // Override default Curve.getUtoTmapping - /** - * [description] + * Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant. * * @method Phaser.Curves.Line#getUtoTmapping * @since 3.0.0 * - * @param {number} u - [description] - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {number} u - A float between 0 and 1. + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The equidistant value. */ getUtoTmapping: function (u, distance, divisions) { @@ -79080,7 +81085,7 @@ module.exports = LineCurve; /***/ }), -/* 375 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79090,13 +81095,13 @@ module.exports = LineCurve; */ var Class = __webpack_require__(0); -var Curve = __webpack_require__(86); +var Curve = __webpack_require__(87); var QuadraticBezierInterpolation = __webpack_require__(344); var Vector2 = __webpack_require__(3); /** * @classdesc - * [description] + * A quadratic Bézier curve constructed from two control points. * * @class QuadraticBezier * @extends Phaser.Curves.Curve @@ -79126,7 +81131,7 @@ var QuadraticBezier = new Class({ } /** - * [description] + * The start point. * * @name Phaser.Curves.QuadraticBezier#p0 * @type {Phaser.Math.Vector2} @@ -79135,7 +81140,7 @@ var QuadraticBezier = new Class({ this.p0 = p0; /** - * [description] + * The first control point. * * @name Phaser.Curves.QuadraticBezier#p1 * @type {Phaser.Math.Vector2} @@ -79144,7 +81149,7 @@ var QuadraticBezier = new Class({ this.p1 = p1; /** - * [description] + * The second control point. * * @name Phaser.Curves.QuadraticBezier#p2 * @type {Phaser.Math.Vector2} @@ -79173,14 +81178,14 @@ var QuadraticBezier = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.QuadraticBezier#getResolution * @since 3.2.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -79215,7 +81220,10 @@ var QuadraticBezier = new Class({ }, /** - * [description] + * Draws this curve on the given Graphics object. + * + * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is. + * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it. * * @method Phaser.Curves.QuadraticBezier#draw * @since 3.2.0 @@ -79294,7 +81302,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 376 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79307,7 +81315,7 @@ module.exports = QuadraticBezier; var CatmullRom = __webpack_require__(182); var Class = __webpack_require__(0); -var Curve = __webpack_require__(86); +var Curve = __webpack_require__(87); var Vector2 = __webpack_require__(3); /** @@ -79355,7 +81363,7 @@ var SplineCurve = new Class({ * * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - The points that configure the curve. * - * @return {Phaser.Curves.Spline} This curve object. + * @return {this} This curve object. */ addPoints: function (points) { @@ -79427,14 +81435,14 @@ var SplineCurve = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.Spline#getResolution * @since 3.0.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -79519,7 +81527,7 @@ module.exports = SplineCurve; /***/ }), -/* 377 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79643,7 +81651,7 @@ module.exports = BaseShader; /***/ }), -/* 378 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79652,32 +81660,32 @@ module.exports = BaseShader; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(36); +var Color = __webpack_require__(34); -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); +Color.ColorToRGBA = __webpack_require__(832); +Color.ComponentToHex = __webpack_require__(380); +Color.GetColor = __webpack_require__(176); +Color.GetColor32 = __webpack_require__(313); +Color.HexStringToColor = __webpack_require__(312); +Color.HSLToColor = __webpack_require__(833); +Color.HSVColorWheel = __webpack_require__(834); +Color.HSVToRGB = __webpack_require__(177); +Color.HueToComponent = __webpack_require__(381); +Color.IntegerToColor = __webpack_require__(315); +Color.IntegerToRGB = __webpack_require__(316); +Color.Interpolate = __webpack_require__(835); +Color.ObjectToColor = __webpack_require__(317); +Color.RandomRGB = __webpack_require__(836); +Color.RGBStringToColor = __webpack_require__(318); +Color.RGBToHSV = __webpack_require__(314); +Color.RGBToString = __webpack_require__(837); +Color.ValueToColor = __webpack_require__(175); module.exports = Color; /***/ }), -/* 379 */ +/* 380 */ /***/ (function(module, exports) { /** @@ -79707,7 +81715,7 @@ module.exports = ComponentToHex; /***/ }), -/* 380 */ +/* 381 */ /***/ (function(module, exports) { /** @@ -79763,7 +81771,7 @@ module.exports = HueToComponent; /***/ }), -/* 381 */ +/* 382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79826,7 +81834,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 382 */ +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79892,7 +81900,7 @@ module.exports = GetScreenOrientation; /***/ }), -/* 383 */ +/* 384 */ /***/ (function(module, exports) { /** @@ -79978,7 +81986,7 @@ module.exports = { /***/ }), -/* 384 */ +/* 385 */ /***/ (function(module, exports) { /** @@ -80031,7 +82039,7 @@ module.exports = { /***/ }), -/* 385 */ +/* 386 */ /***/ (function(module, exports) { /** @@ -80129,7 +82137,7 @@ module.exports = { /***/ }), -/* 386 */ +/* 387 */ /***/ (function(module, exports) { /** @@ -80203,7 +82211,7 @@ module.exports = { /***/ }), -/* 387 */ +/* 388 */ /***/ (function(module, exports) { /** @@ -80254,7 +82262,7 @@ module.exports = GetTarget; /***/ }), -/* 388 */ +/* 389 */ /***/ (function(module, exports) { /** @@ -80311,7 +82319,7 @@ module.exports = ParseXML; /***/ }), -/* 389 */ +/* 390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80325,12 +82333,12 @@ var CONST = __webpack_require__(192); var EventEmitter = __webpack_require__(9); 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__(351); +var Keyboard = __webpack_require__(391); +var Mouse = __webpack_require__(392); +var Pointer = __webpack_require__(393); +var Touch = __webpack_require__(394); +var TransformMatrix = __webpack_require__(32); +var TransformXY = __webpack_require__(350); /** * @classdesc @@ -81393,7 +83401,7 @@ module.exports = InputManager; /***/ }), -/* 390 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81402,11 +83410,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(130); +var ArrayRemove = __webpack_require__(131); var Class = __webpack_require__(0); var GameEvents = __webpack_require__(21); var InputEvents = __webpack_require__(56); -var KeyCodes = __webpack_require__(131); +var KeyCodes = __webpack_require__(132); var NOOP = __webpack_require__(0); /** @@ -81843,7 +83851,7 @@ module.exports = KeyboardManager; /***/ }), -/* 391 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82079,7 +84087,7 @@ var MouseManager = new Class({ * @method Phaser.Input.Mouse.MouseManager#disableContextMenu * @since 3.0.0 * - * @return {Phaser.Input.Mouse.MouseManager} This Mouse Manager instance. + * @return {this} This Mouse Manager instance. */ disableContextMenu: function () { @@ -82329,7 +84337,7 @@ module.exports = MouseManager; /***/ }), -/* 392 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82338,10 +84346,10 @@ module.exports = MouseManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(336); +var Angle = __webpack_require__(335); var Class = __webpack_require__(0); -var Distance = __webpack_require__(54); -var FuzzyEqual = __webpack_require__(126); +var Distance = __webpack_require__(55); +var FuzzyEqual = __webpack_require__(96); var SmoothStepInterpolation = __webpack_require__(345); var Vector2 = __webpack_require__(3); @@ -83607,7 +85615,7 @@ module.exports = Pointer; /***/ }), -/* 393 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83618,7 +85626,7 @@ module.exports = Pointer; var Class = __webpack_require__(0); var InputEvents = __webpack_require__(56); -var NOOP = __webpack_require__(2); +var NOOP = __webpack_require__(1); // https://developer.mozilla.org/en-US/docs/Web/API/Touch_events // https://patrickhlauke.github.io/touch/tests/results/ @@ -83819,7 +85827,7 @@ var TouchManager = new Class({ * @method Phaser.Input.Touch.TouchManager#disableContextMenu * @since 3.20.0 * - * @return {Phaser.Input.Touch.TouchManager} This Touch Manager instance. + * @return {this} This Touch Manager instance. */ disableContextMenu: function () { @@ -84020,7 +86028,7 @@ module.exports = TouchManager; /***/ }), -/* 394 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84035,9 +86043,9 @@ 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__(22); -var Remove = __webpack_require__(130); +var GetFastValue = __webpack_require__(2); +var PluginCache = __webpack_require__(24); +var Remove = __webpack_require__(131); /** * @classdesc @@ -84645,7 +86653,7 @@ var PluginManager = new Class({ * * @param {string} key - The key of the plugin to stop. * - * @return {Phaser.Plugins.PluginManager} The Plugin Manager. + * @return {this} The Plugin Manager. */ stop: function (key) { @@ -84922,7 +86930,7 @@ module.exports = PluginManager; /***/ }), -/* 395 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84934,15 +86942,15 @@ module.exports = PluginManager; var CONST = __webpack_require__(190); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(104); +var Events = __webpack_require__(102); 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 GetInnerHeight = __webpack_require__(890); +var GetTarget = __webpack_require__(388); +var GetScreenOrientation = __webpack_require__(383); +var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(11); -var Size = __webpack_require__(396); -var SnapFloor = __webpack_require__(105); +var Size = __webpack_require__(397); +var SnapFloor = __webpack_require__(103); var Vector2 = __webpack_require__(3); /** @@ -85624,7 +87632,7 @@ var ScaleManager = new Class({ if (lock) { - return lock(orientation); + return lock.call(screen, orientation); } return false; @@ -85695,8 +87703,8 @@ var ScaleManager = new Class({ } // The size used for the canvas style, factoring in the scale mode and parent and zoom value - // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change) - this.displaySize.setSize(width, height); + // Update the aspect ratio + this.displaySize.setAspectRatio(width / height); this.canvas.width = this.baseSize.width; this.canvas.height = this.baseSize.height; @@ -86639,7 +88647,7 @@ module.exports = ScaleManager; /***/ }), -/* 396 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86648,9 +88656,9 @@ module.exports = ScaleManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var SnapFloor = __webpack_require__(105); +var SnapFloor = __webpack_require__(103); var Vector2 = __webpack_require__(3); /** @@ -87417,7 +89425,7 @@ module.exports = Size; /***/ }), -/* 397 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87427,13 +89435,13 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(132); -var Events = __webpack_require__(18); +var CONST = __webpack_require__(133); +var Events = __webpack_require__(22); var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(5); -var LoaderEvents = __webpack_require__(87); -var NOOP = __webpack_require__(2); -var Scene = __webpack_require__(398); +var LoaderEvents = __webpack_require__(88); +var NOOP = __webpack_require__(1); +var Scene = __webpack_require__(399); var Systems = __webpack_require__(193); /** @@ -87874,6 +89882,8 @@ var SceneManager = new Class({ var sys = scene.sys; var settings = sys.settings; + sys.sceneUpdate = NOOP; + if (scene.init) { scene.init.call(scene, settings.data); @@ -89057,7 +91067,7 @@ module.exports = SceneManager; /***/ }), -/* 398 */ +/* 399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89287,16 +91297,6 @@ var Scene = new Class({ */ this.physics; - /** - * 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. - * - * @name Phaser.Scene#impact - * @type {Phaser.Physics.Impact.ImpactPhysics} - * @since 3.0.0 - */ - this.impact; - /** * 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. @@ -89363,7 +91363,7 @@ module.exports = Scene; /***/ }), -/* 399 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89372,10 +91372,10 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(132); +var CONST = __webpack_require__(133); var GetValue = __webpack_require__(5); -var Merge = __webpack_require__(88); -var InjectionMap = __webpack_require__(905); +var Merge = __webpack_require__(104); +var InjectionMap = __webpack_require__(903); /** * @namespace Phaser.Scenes.Settings @@ -89459,7 +91459,7 @@ module.exports = Settings; /***/ }), -/* 400 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89469,16 +91469,16 @@ module.exports = Settings; */ var CanvasPool = __webpack_require__(28); -var CanvasTexture = __webpack_require__(401); +var CanvasTexture = __webpack_require__(402); var Class = __webpack_require__(0); -var Color = __webpack_require__(36); -var CONST = __webpack_require__(32); +var Color = __webpack_require__(34); +var CONST = __webpack_require__(38); var EventEmitter = __webpack_require__(9); var Events = __webpack_require__(128); var GameEvents = __webpack_require__(21); -var GenerateTexture = __webpack_require__(370); +var GenerateTexture = __webpack_require__(371); var GetValue = __webpack_require__(5); -var Parser = __webpack_require__(403); +var Parser = __webpack_require__(404); var Texture = __webpack_require__(195); /** @@ -89763,8 +91763,8 @@ var TextureManager = new Class({ * * @param {string} key - The unique string-based key of the Texture. * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture. - * @param {string} [type='image/png'] - [description] - * @param {number} [encoderOptions=0.92] - [description] + * @param {string} [type='image/png'] - A DOMString indicating the image format. The default format type is image/png. + * @param {number} [encoderOptions=0.92] - A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. If this argument is anything else, the default value for image quality is used. The default value is 0.92. Other arguments are ignored. * * @return {string} The base64 encoded data, or an empty string if the texture frame could not be found. */ @@ -89907,14 +91907,44 @@ var TextureManager = new Class({ /** * Creates a new Texture using the given config values. + * * Generated textures consist of a Canvas element to which the texture data is drawn. - * See the Phaser.Create function for the more direct way to create textures. + * + * Generates a texture based on the given Create configuration object. + * + * The texture is drawn using a fixed-size indexed palette of 16 colors, where the hex value in the + * data cells map to a single color. For example, if the texture config looked like this: + * + * ```javascript + * var star = [ + * '.....828.....', + * '....72227....', + * '....82228....', + * '...7222227...', + * '2222222222222', + * '8222222222228', + * '.72222222227.', + * '..787777787..', + * '..877777778..', + * '.78778887787.', + * '.27887.78872.', + * '.787.....787.' + * ]; + * + * this.textures.generate('star', { data: star, pixelWidth: 4 }); + * ``` + * + * Then it would generate a texture that is 52 x 48 pixels in size, because each cell of the data array + * represents 1 pixel multiplied by the `pixelWidth` value. The cell values, such as `8`, maps to color + * number 8 in the palette. If a cell contains a period character `.` then it is transparent. + * + * The default palette is Arne16, but you can specify your own using the `palette` property. * * @method Phaser.Textures.TextureManager#generate * @since 3.0.0 * * @param {string} key - The unique string-based key of the Texture. - * @param {object} config - The configuration object needed to generate the texture. + * @param {Phaser.Types.Create.GenerateTextureConfig} config - The configuration object needed to generate the texture. * * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use. */ @@ -90631,7 +92661,7 @@ module.exports = TextureManager; /***/ }), -/* 401 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90641,9 +92671,9 @@ module.exports = TextureManager; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(20); -var Color = __webpack_require__(36); -var CONST = __webpack_require__(32); +var Clamp = __webpack_require__(19); +var Color = __webpack_require__(34); +var CONST = __webpack_require__(38); var IsSizePowerOfTwo = __webpack_require__(127); var Texture = __webpack_require__(195); @@ -91064,7 +93094,7 @@ var CanvasTexture = new Class({ * @param {integer} [width] - The width of the region to get. Must be an integer. Defaults to the canvas width if not given. * @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`. * - * @return {Phaser.Types.Textures.PixelConfig[]} An array of Pixel objects. + * @return {Phaser.Types.Textures.PixelConfig[][]} A 2d array of Pixel objects. */ getPixels: function (x, y, width, height) { @@ -91231,6 +93261,10 @@ var CanvasTexture = new Class({ // Update the Frame this.frames['__BASE'].setSize(width, height, 0, 0); + // Update this + this.width = width; + this.height = height; + this.refresh(); } @@ -91262,7 +93296,7 @@ module.exports = CanvasTexture; /***/ }), -/* 402 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91274,7 +93308,7 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); var IsSizePowerOfTwo = __webpack_require__(127); -var ScaleModes = __webpack_require__(157); +var ScaleModes = __webpack_require__(158); /** * @classdesc @@ -91603,7 +93637,7 @@ module.exports = TextureSource; /***/ }), -/* 403 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91618,20 +93652,20 @@ module.exports = TextureSource; module.exports = { - 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) + AtlasXML: __webpack_require__(904), + Canvas: __webpack_require__(905), + Image: __webpack_require__(906), + JSONArray: __webpack_require__(907), + JSONHash: __webpack_require__(908), + SpriteSheet: __webpack_require__(909), + SpriteSheetFromAtlas: __webpack_require__(910), + UnityYAML: __webpack_require__(911) }; /***/ }), -/* 404 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91641,9 +93675,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(405); -var NoAudioSoundManager = __webpack_require__(407); -var WebAudioSoundManager = __webpack_require__(409); +var HTML5AudioSoundManager = __webpack_require__(406); +var NoAudioSoundManager = __webpack_require__(410); +var WebAudioSoundManager = __webpack_require__(412); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -91683,7 +93717,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 405 */ +/* 406 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91693,23 +93727,27 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(133); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); var Events = __webpack_require__(64); -var HTML5AudioSound = __webpack_require__(406); +var HTML5AudioSound = __webpack_require__(409); /** * HTML5 Audio implementation of the Sound Manager. - * - * Note: To play multiple instances of the same HTML5 Audio sound, you need to provide an `instances` value when + * + * To play multiple instances of the same HTML5 Audio sound, you need to provide an `instances` value when * loading the sound with the Loader: - * + * * ```javascript * this.load.audio('explosion', 'explosion.mp3', { * instances: 2 * }); * ``` * + * Not all browsers can play all audio formats. + * + * There is a good guide to what's supported: [Cross-browser audio basics: Audio codec support](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). + * * @class HTML5AudioSoundManager * @extends Phaser.Sound.BaseSoundManager * @memberof Phaser.Sound @@ -92148,7 +94186,128 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 406 */ +/* 407 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(73); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), +/* 408 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(73); + +/** + * Returns the first element in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. + * + * @function Phaser.Utils.Array.GetFirst + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) + * + * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. + */ +var GetFirst = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + return child; + } + } + } + + return null; +}; + +module.exports = GetFirst; + + +/***/ }), +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92158,9 +94317,10 @@ module.exports = HTML5AudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); var Events = __webpack_require__(64); +var Clamp = __webpack_require__(19); /** * @classdesc @@ -92705,7 +94865,7 @@ var HTML5AudioSound = new Class({ { if (this.audio) { - this.audio.volume = this.currentConfig.volume * this.manager.volume; + this.audio.volume = Clamp(this.currentConfig.volume * this.manager.volume, 0, 1); } }, @@ -93073,7 +95233,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 407 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93083,18 +95243,18 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(133); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var NoAudioSound = __webpack_require__(408); -var NOOP = __webpack_require__(2); +var NoAudioSound = __webpack_require__(411); +var NOOP = __webpack_require__(1); /** * @classdesc - * No audio implementation of the sound manager. It is used if audio has been + * No-audio implementation of the Sound Manager. It is used if audio has been * disabled in the game config or the device doesn't support any audio. * - * It represents a graceful degradation of sound manager logic that provides + * It represents a graceful degradation of Sound Manager logic that provides * minimal functionality and prevents Phaser projects that use audio from * breaking on devices that don't support any audio playback technologies. * @@ -93191,7 +95351,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 408 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93201,10 +95361,25 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); + +var returnFalse = function () +{ + return false; +}; + +var returnNull = function () +{ + return null; +}; + +var returnThis = function () +{ + return this; +}; /** * @classdesc @@ -93216,7 +95391,6 @@ var Extend = __webpack_require__(17); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSound - * @extends Phaser.Sound.BaseSound * @memberof Phaser.Sound * @constructor * @since 3.0.0 @@ -93267,58 +95441,108 @@ var NoAudioSound = new Class({ this.pendingRemove = false; }, + /** + * @method Phaser.Sound.NoAudioSound#addMarker + * @since 3.0.0 + * + * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object. + * + * @return {boolean} false + */ // eslint-disable-next-line no-unused-vars - addMarker: function (marker) - { - return false; - }, + addMarker: returnFalse, + /** + * @method Phaser.Sound.NoAudioSound#updateMarker + * @since 3.0.0 + * + * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object with updated values. + * + * @return {boolean} false + */ // eslint-disable-next-line no-unused-vars - updateMarker: function (marker) - { - return false; - }, + updateMarker: returnFalse, - // eslint-disable-next-line no-unused-vars - removeMarker: function (markerName) - { - return null; - }, + /** + * @method Phaser.Sound.NoAudioSound#removeMarker + * @since 3.0.0 + * + * @param {string} markerName - The name of the marker to remove. + * + * @return {null} null + */ + removeMarker: returnNull, - // eslint-disable-next-line no-unused-vars - play: function (markerName, config) - { - return false; - }, + /** + * @method Phaser.Sound.NoAudioSound#play + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Sound.SoundConfig)} [markerName=''] - If you want to play a marker then provide the marker name here. Alternatively, this parameter can be a SoundConfig object. + * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * + * @return {boolean} false + */ + play: returnFalse, - pause: function () - { - return false; - }, + /** + * @method Phaser.Sound.NoAudioSound#pause + * @since 3.0.0 + * + * @return {boolean} false + */ + pause: returnFalse, - resume: function () - { - return false; - }, + /** + * Resumes the sound. + * + * @method Phaser.Sound.NoAudioSound#resume + * @since 3.0.0 + * + * @return {boolean} false + */ + resume: returnFalse, - stop: function () - { - return false; - }, + /** + * Stop playing this sound. + * + * @method Phaser.Sound.NoAudioSound#stop + * @since 3.0.0 + * + * @return {boolean} false + */ + stop: returnFalse, + /** + * Destroys this sound and all associated events and marks it for removal from the sound manager. + * + * @method Phaser.Sound.NoAudioSound#destroy + * @fires Phaser.Sound.Events#DESTROY + * @since 3.0.0 + */ destroy: function () { - this.manager.remove(this); - BaseSound.prototype.destroy.call(this); - } + }, + + setMute: returnThis, + + setVolume: returnThis, + + setRate: returnThis, + + setDetune: returnThis, + + setSeek: returnThis, + + setLoop: returnThis + }); module.exports = NoAudioSound; /***/ }), -/* 409 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93328,15 +95552,19 @@ module.exports = NoAudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(410); -var BaseSoundManager = __webpack_require__(133); +var Base64ToArrayBuffer = __webpack_require__(413); +var BaseSoundManager = __webpack_require__(134); var Class = __webpack_require__(0); var Events = __webpack_require__(64); -var WebAudioSound = __webpack_require__(411); +var WebAudioSound = __webpack_require__(414); /** * @classdesc - * Web Audio API implementation of the sound manager. + * Web Audio API implementation of the Sound Manager. + * + * Not all browsers can play all audio formats. + * + * There is a good guide to what's supported: [Cross-browser audio basics: Audio codec support](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). * * @class WebAudioSoundManager * @extends Phaser.Sound.BaseSoundManager @@ -93440,7 +95668,7 @@ var WebAudioSoundManager = new Class({ /** * This method takes a new AudioContext reference and then sets * this Sound Manager to use that context for all playback. - * + * * As part of this call it also disconnects the master mute and volume * nodes and then re-creates them on the new given context. * @@ -93503,16 +95731,16 @@ var WebAudioSoundManager = new Class({ /** * Decode audio data into a format ready for playback via Web Audio. - * + * * The audio data can be a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance. - * + * * The `audioKey` is the key that will be used to save the decoded audio to the audio cache. - * + * * Instead of passing a single entry you can instead pass an array of `Phaser.Types.Sound.DecodeAudioConfig` * objects as the first and only argument. - * + * * Decoding is an async process, so be sure to listen for the events to know when decoding has completed. - * + * * Once the audio has decoded it can be added to the Sound Manager or played via its key. * * @method Phaser.Sound.WebAudioSoundManager#decodeAudio @@ -93554,7 +95782,7 @@ var WebAudioSoundManager = new Class({ var success = function (key, audioBuffer) { cache.add(key, audioBuffer); - + this.emit(Events.DECODED, key); remaining--; @@ -93564,7 +95792,7 @@ var WebAudioSoundManager = new Class({ this.emit(Events.DECODED_ALL); } }.bind(this, key); - + var failure = function (key, error) { // eslint-disable-next-line no-console @@ -93606,7 +95834,7 @@ var WebAudioSoundManager = new Class({ body.removeEventListener('touchend', unlockHandler); body.removeEventListener('click', unlockHandler); body.removeEventListener('keydown', unlockHandler); - + _this.unlocked = true; }, function () { @@ -93777,7 +96005,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 410 */ +/* 413 */ /***/ (function(module, exports) { /** @@ -93852,7 +96080,7 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 411 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93862,7 +96090,7 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(134); +var BaseSound = __webpack_require__(135); var Class = __webpack_require__(0); var Events = __webpack_require__(64); @@ -94758,7 +96986,7 @@ module.exports = WebAudioSound; /***/ }), -/* 412 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { /* eslint no-console: 0 */ @@ -94769,13 +96997,13 @@ module.exports = WebAudioSound; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var AdInstance = __webpack_require__(937); +var AdInstance = __webpack_require__(935); var Class = __webpack_require__(0); -var DataManager = __webpack_require__(101); +var DataManager = __webpack_require__(99); var EventEmitter = __webpack_require__(9); -var Leaderboard = __webpack_require__(938); -var Product = __webpack_require__(940); -var Purchase = __webpack_require__(941); +var Leaderboard = __webpack_require__(936); +var Product = __webpack_require__(938); +var Purchase = __webpack_require__(939); /** * @classdesc @@ -97078,7 +99306,7 @@ module.exports = FacebookInstantGamesPlugin; /***/ }), -/* 413 */ +/* 416 */ /***/ (function(module, exports) { /** @@ -97126,7 +99354,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 414 */ +/* 417 */ /***/ (function(module, exports) { /** @@ -97248,7 +99476,7 @@ module.exports = QuickSelect; /***/ }), -/* 415 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97258,7 +99486,7 @@ module.exports = QuickSelect; */ var GetValue = __webpack_require__(5); -var Shuffle = __webpack_require__(122); +var Shuffle = __webpack_require__(121); var BuildChunk = function (a, b, qty) { @@ -97386,7 +99614,7 @@ module.exports = Range; /***/ }), -/* 416 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97475,7 +99703,7 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 417 */ +/* 420 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97517,7 +99745,7 @@ module.exports = Union; /***/ }), -/* 418 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97528,12 +99756,12 @@ module.exports = Union; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(987); -var GameObject = __webpack_require__(14); +var DOMElementRender = __webpack_require__(983); +var GameObject = __webpack_require__(13); var IsPlainObject = __webpack_require__(7); var RemoveFromDOM = __webpack_require__(191); -var SCENE_EVENTS = __webpack_require__(18); -var Vector4 = __webpack_require__(352); +var SCENE_EVENTS = __webpack_require__(22); +var Vector4 = __webpack_require__(351); /** * @classdesc @@ -98491,7 +100719,7 @@ module.exports = DOMElement; /***/ }), -/* 419 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98500,8 +100728,8 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(988); -var GameObject = __webpack_require__(14); +var CSSBlendModes = __webpack_require__(984); +var GameObject = __webpack_require__(13); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -98613,7 +100841,7 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 420 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98624,8 +100852,8 @@ module.exports = DOMElementCSSRenderer; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(992); +var GameObject = __webpack_require__(13); +var ExternRender = __webpack_require__(988); /** * @classdesc @@ -98709,7 +100937,7 @@ module.exports = Extern; /***/ }), -/* 421 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98719,8 +100947,8 @@ module.exports = Extern; */ var CircumferencePoint = __webpack_require__(206); -var FromPercent = __webpack_require__(98); -var MATH_CONST = __webpack_require__(13); +var FromPercent = __webpack_require__(95); +var MATH_CONST = __webpack_require__(14); var Point = __webpack_require__(4); /** @@ -98752,7 +100980,7 @@ module.exports = GetPoint; /***/ }), -/* 422 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98761,10 +100989,10 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(423); +var Circumference = __webpack_require__(426); var CircumferencePoint = __webpack_require__(206); -var FromPercent = __webpack_require__(98); -var MATH_CONST = __webpack_require__(13); +var FromPercent = __webpack_require__(95); +var MATH_CONST = __webpack_require__(14); /** * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse, @@ -98787,7 +101015,7 @@ var GetPoints = function (ellipse, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Circumference(ellipse) / stepRate; } @@ -98806,7 +101034,7 @@ module.exports = GetPoints; /***/ }), -/* 423 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -98838,7 +101066,7 @@ module.exports = Circumference; /***/ }), -/* 424 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98848,7 +101076,7 @@ module.exports = Circumference; */ var Commands = __webpack_require__(205); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -99088,7 +101316,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 425 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99098,7 +101326,7 @@ module.exports = GraphicsCanvasRenderer; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -99307,7 +101535,7 @@ module.exports = GravityWell; /***/ }), -/* 426 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99318,7 +101546,7 @@ module.exports = GravityWell; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(40); -var DistanceBetween = __webpack_require__(54); +var DistanceBetween = __webpack_require__(55); /** * @classdesc @@ -99876,7 +102104,7 @@ module.exports = Particle; /***/ }), -/* 427 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -99885,20 +102113,20 @@ module.exports = Particle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlendModes = __webpack_require__(43); +var BlendModes = __webpack_require__(44); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(428); -var EdgeZone = __webpack_require__(429); -var EmitterOp = __webpack_require__(1004); -var GetFastValue = __webpack_require__(1); +var DeathZone = __webpack_require__(431); +var EdgeZone = __webpack_require__(432); +var EmitterOp = __webpack_require__(1000); +var GetFastValue = __webpack_require__(2); 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 HasAny = __webpack_require__(433); +var HasValue = __webpack_require__(110); +var Particle = __webpack_require__(429); +var RandomZone = __webpack_require__(434); var Rectangle = __webpack_require__(11); -var StableSort = __webpack_require__(137); +var StableSort = __webpack_require__(138); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(63); @@ -100651,7 +102879,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ fromJSON: function (config) { @@ -100808,7 +103036,7 @@ var ParticleEmitter = new Class({ * @param {number} [offsetY=0] - Vertical offset of the particle origin from the Game Object. * @param {boolean} [trackVisible=false] - Whether the emitter's visible state will track the target's visible state. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ startFollow: function (target, offsetX, offsetY, trackVisible) { @@ -100829,7 +103057,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#stopFollow * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ stopFollow: function () { @@ -100890,7 +103118,7 @@ var ParticleEmitter = new Class({ * @param {boolean} [pickRandom=true] - Whether frames should be assigned at random from `frames`. * @param {integer} [quantity=1] - The number of consecutive particles that will receive each frame. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setFrame: function (frames, pickRandom, quantity) { @@ -100945,7 +103173,7 @@ var ParticleEmitter = new Class({ * * @param {boolean} [value=true] - Radial mode (true) or point mode (true). * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setRadial: function (value) { @@ -100966,7 +103194,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setPosition: function (x, y) { @@ -100989,7 +103217,7 @@ var ParticleEmitter = new Class({ * @param {number} width - The width of the boundary. * @param {number} height - The height of the boundary. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setBounds: function (x, y, width, height) { @@ -101024,7 +103252,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeedX: function (value) { @@ -101045,7 +103273,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeedY: function (value) { @@ -101069,7 +103297,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeed: function (value) { @@ -101090,7 +103318,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScaleX: function (value) { @@ -101107,7 +103335,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScaleY: function (value) { @@ -101124,7 +103352,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScale: function (value) { @@ -101142,7 +103370,7 @@ var ParticleEmitter = new Class({ * * @param {number} value - Acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravityX: function (value) { @@ -101159,7 +103387,7 @@ var ParticleEmitter = new Class({ * * @param {number} value - Acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravityY: function (value) { @@ -101177,7 +103405,7 @@ var ParticleEmitter = new Class({ * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravity: function (x, y) { @@ -101195,7 +103423,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setAlpha: function (value) { @@ -101212,7 +103440,7 @@ var ParticleEmitter = new Class({ * * @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. + * @return {this} This Particle Emitter. */ setTint: function (value) { @@ -101229,7 +103457,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setEmitterAngle: function (value) { @@ -101246,7 +103474,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setAngle: function (value) { @@ -101263,7 +103491,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setLifespan: function (value) { @@ -101280,7 +103508,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setQuantity: function (quantity) { @@ -101299,7 +103527,7 @@ var ParticleEmitter = new Class({ * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setFrequency: function (frequency, quantity) { @@ -101327,7 +103555,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setEmitZone: function (zoneConfig) { @@ -101376,7 +103604,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setDeathZone: function (zoneConfig) { @@ -101412,7 +103640,7 @@ var ParticleEmitter = new Class({ * * @param {integer} particleCount - The number of particles to create. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ reserve: function (particleCount) { @@ -101487,7 +103715,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} [context] - The calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ onParticleEmit: function (callback, context) { @@ -101519,7 +103747,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleDeathCallback} callback - The function. * @param {*} [context] - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ onParticleDeath: function (callback, context) { @@ -101548,7 +103776,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ killAll: function () { @@ -101572,7 +103800,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} context - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ forEachAlive: function (callback, context) { @@ -101597,7 +103825,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} context - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ forEachDead: function (callback, context) { @@ -101624,7 +103852,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#start * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ start: function () { @@ -101641,7 +103869,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#stop * @since 3.11.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ stop: function () { @@ -101656,7 +103884,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#pause * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ pause: function () { @@ -101671,7 +103899,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#resume * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ resume: function () { @@ -101686,7 +103914,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#remove * @since 3.22.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ remove: function () { @@ -101701,7 +103929,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSort * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ depthSort: function () { @@ -101721,7 +103949,7 @@ var ParticleEmitter = new Class({ * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ flow: function (frequency, count) { @@ -101947,7 +104175,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 428 */ +/* 431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102025,7 +104253,7 @@ module.exports = DeathZone; /***/ }), -/* 429 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102161,7 +104389,7 @@ var EdgeZone = new Class({ * @method Phaser.GameObjects.Particles.Zones.EdgeZone#updateSource * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone. + * @return {this} This Edge Zone. */ updateSource: function () { @@ -102200,7 +104428,7 @@ var EdgeZone = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. * - * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone. + * @return {this} This Edge Zone. */ changeSource: function (source) { @@ -102269,7 +104497,7 @@ module.exports = EdgeZone; /***/ }), -/* 430 */ +/* 433 */ /***/ (function(module, exports) { /** @@ -102306,7 +104534,7 @@ module.exports = HasAny; /***/ }), -/* 431 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102379,7 +104607,7 @@ module.exports = RandomZone; /***/ }), -/* 432 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102390,7 +104618,7 @@ module.exports = RandomZone; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Sprite = __webpack_require__(65); +var Sprite = __webpack_require__(74); /** * @classdesc @@ -102461,7 +104689,7 @@ module.exports = PathFollower; /***/ }), -/* 433 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102470,12 +104698,12 @@ module.exports = PathFollower; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(1027); +var ArcRender = __webpack_require__(1026); var Class = __webpack_require__(0); var DegToRad = __webpack_require__(40); -var Earcut = __webpack_require__(72); -var GeomCircle = __webpack_require__(71); -var MATH_CONST = __webpack_require__(13); +var Earcut = __webpack_require__(71); +var GeomCircle = __webpack_require__(70); +var MATH_CONST = __webpack_require__(14); var Shape = __webpack_require__(33); /** @@ -102870,7 +105098,7 @@ module.exports = Arc; /***/ }), -/* 434 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -102880,8 +105108,8 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(1030); -var Earcut = __webpack_require__(72); +var CurveRender = __webpack_require__(1029); +var Earcut = __webpack_require__(71); var Rectangle = __webpack_require__(11); var Shape = __webpack_require__(33); @@ -103052,7 +105280,7 @@ module.exports = Curve; /***/ }), -/* 435 */ +/* 438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103062,9 +105290,9 @@ module.exports = Curve; */ var Class = __webpack_require__(0); -var Earcut = __webpack_require__(72); -var EllipseRender = __webpack_require__(1033); -var GeomEllipse = __webpack_require__(107); +var Earcut = __webpack_require__(71); +var EllipseRender = __webpack_require__(1032); +var GeomEllipse = __webpack_require__(106); var Shape = __webpack_require__(33); /** @@ -103239,7 +105467,7 @@ module.exports = Ellipse; /***/ }), -/* 436 */ +/* 439 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103250,7 +105478,7 @@ module.exports = Ellipse; var Class = __webpack_require__(0); var Shape = __webpack_require__(33); -var GridRender = __webpack_require__(1036); +var GridRender = __webpack_require__(1035); /** * @classdesc @@ -103521,7 +105749,7 @@ module.exports = Grid; /***/ }), -/* 437 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103530,7 +105758,7 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1039); +var IsoBoxRender = __webpack_require__(1038); var Class = __webpack_require__(0); var Shape = __webpack_require__(33); @@ -103736,7 +105964,7 @@ module.exports = IsoBox; /***/ }), -/* 438 */ +/* 441 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103746,7 +105974,7 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1042); +var IsoTriangleRender = __webpack_require__(1041); var Shape = __webpack_require__(33); /** @@ -103982,7 +106210,7 @@ module.exports = IsoTriangle; /***/ }), -/* 439 */ +/* 442 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103994,7 +106222,7 @@ module.exports = IsoTriangle; var Class = __webpack_require__(0); var Shape = __webpack_require__(33); var GeomLine = __webpack_require__(61); -var LineRender = __webpack_require__(1045); +var LineRender = __webpack_require__(1044); /** * @classdesc @@ -104149,7 +106377,7 @@ module.exports = Line; /***/ }), -/* 440 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104158,13 +106386,13 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1048); +var PolygonRender = __webpack_require__(1047); var Class = __webpack_require__(0); -var Earcut = __webpack_require__(72); -var GetAABB = __webpack_require__(441); -var GeomPolygon = __webpack_require__(213); +var Earcut = __webpack_require__(71); +var GetAABB = __webpack_require__(444); +var GeomPolygon = __webpack_require__(214); var Shape = __webpack_require__(33); -var Smooth = __webpack_require__(444); +var Smooth = __webpack_require__(447); /** * @classdesc @@ -104288,7 +106516,7 @@ module.exports = Polygon; /***/ }), -/* 441 */ +/* 444 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104344,7 +106572,7 @@ module.exports = GetAABB; /***/ }), -/* 442 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104355,7 +106583,7 @@ module.exports = GetAABB; var Length = __webpack_require__(62); var Line = __webpack_require__(61); -var Perimeter = __webpack_require__(443); +var Perimeter = __webpack_require__(446); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -104379,7 +106607,7 @@ var GetPoints = function (polygon, quantity, stepRate, out) var perimeter = Perimeter(polygon); // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = perimeter / stepRate; } @@ -104421,7 +106649,7 @@ module.exports = GetPoints; /***/ }), -/* 443 */ +/* 446 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104469,7 +106697,7 @@ module.exports = Perimeter; /***/ }), -/* 444 */ +/* 447 */ /***/ (function(module, exports) { /** @@ -104545,7 +106773,7 @@ module.exports = Smooth; /***/ }), -/* 445 */ +/* 448 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104557,7 +106785,7 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(11); var Shape = __webpack_require__(33); -var RectangleRender = __webpack_require__(1051); +var RectangleRender = __webpack_require__(1050); /** * @classdesc @@ -104657,7 +106885,7 @@ module.exports = Rectangle; /***/ }), -/* 446 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104666,9 +106894,9 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1054); +var StarRender = __webpack_require__(1053); var Class = __webpack_require__(0); -var Earcut = __webpack_require__(72); +var Earcut = __webpack_require__(71); var Shape = __webpack_require__(33); /** @@ -104945,7 +107173,7 @@ module.exports = Star; /***/ }), -/* 447 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -104956,8 +107184,8 @@ module.exports = Star; var Class = __webpack_require__(0); var Shape = __webpack_require__(33); -var GeomTriangle = __webpack_require__(76); -var TriangleRender = __webpack_require__(1057); +var GeomTriangle = __webpack_require__(77); +var TriangleRender = __webpack_require__(1056); /** * @classdesc @@ -105088,7 +107316,7 @@ module.exports = Triangle; /***/ }), -/* 448 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105175,7 +107403,7 @@ module.exports = GetPoint; /***/ }), -/* 449 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105217,7 +107445,7 @@ var GetPoints = function (triangle, quantity, stepRate, out) var perimeter = length1 + length2 + length3; // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = perimeter / stepRate; } @@ -105268,7 +107496,7 @@ module.exports = GetPoints; /***/ }), -/* 450 */ +/* 453 */ /***/ (function(module, exports) { /** @@ -105351,7 +107579,7 @@ module.exports = SetValue; /***/ }), -/* 451 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105491,7 +107719,7 @@ var Light = new Class({ * @param {number} b - The blue color. A value between 0 and 1. * @param {number} intensity - The intensity of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ set: function (x, y, radius, r, g, b, intensity) { @@ -105521,7 +107749,7 @@ var Light = new Class({ * @param {number} x - The horizontal scroll factor of the light. * @param {number} y - The vertical scroll factor of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setScrollFactor: function (x, y) { @@ -105542,7 +107770,7 @@ var Light = new Class({ * * @param {number} rgb - The integer RGB color of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setColor: function (rgb) { @@ -105563,7 +107791,7 @@ var Light = new Class({ * * @param {number} intensity - The intensity of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setIntensity: function (intensity) { @@ -105581,7 +107809,7 @@ var Light = new Class({ * @param {number} x - The horizontal position of the light. * @param {number} y - The vertical position of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setPosition: function (x, y) { @@ -105599,7 +107827,7 @@ var Light = new Class({ * * @param {number} radius - The radius of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setRadius: function (radius) { @@ -105614,7 +107842,7 @@ module.exports = Light; /***/ }), -/* 452 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105624,7 +107852,7 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(451); +var Light = __webpack_require__(454); var Utils = __webpack_require__(10); /** @@ -105977,7 +108205,7 @@ module.exports = LightsManager; /***/ }), -/* 453 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105986,8 +108214,8 @@ module.exports = LightsManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(52); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(53); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Geom @@ -105995,14 +108223,14 @@ var Extend = __webpack_require__(17); var Geom = { - 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) + Circle: __webpack_require__(1116), + Ellipse: __webpack_require__(1126), + Intersects: __webpack_require__(457), + Line: __webpack_require__(1145), + Point: __webpack_require__(1167), + Polygon: __webpack_require__(1181), + Rectangle: __webpack_require__(470), + Triangle: __webpack_require__(1212) }; @@ -106013,7 +108241,7 @@ module.exports = Geom; /***/ }), -/* 454 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106028,35 +108256,35 @@ module.exports = Geom; module.exports = { - 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) + CircleToCircle: __webpack_require__(218), + CircleToRectangle: __webpack_require__(219), + GetCircleToCircle: __webpack_require__(1136), + GetCircleToRectangle: __webpack_require__(1137), + GetLineToCircle: __webpack_require__(220), + GetLineToRectangle: __webpack_require__(222), + GetRectangleIntersection: __webpack_require__(1138), + GetRectangleToRectangle: __webpack_require__(1139), + GetRectangleToTriangle: __webpack_require__(1140), + GetTriangleToCircle: __webpack_require__(1141), + GetTriangleToLine: __webpack_require__(462), + GetTriangleToTriangle: __webpack_require__(1142), + LineToCircle: __webpack_require__(221), + LineToLine: __webpack_require__(90), + LineToRectangle: __webpack_require__(458), + PointToLine: __webpack_require__(466), + PointToLineSegment: __webpack_require__(1143), + RectangleToRectangle: __webpack_require__(142), + RectangleToTriangle: __webpack_require__(459), + RectangleToValues: __webpack_require__(1144), + TriangleToCircle: __webpack_require__(461), + TriangleToLine: __webpack_require__(463), + TriangleToTriangle: __webpack_require__(464) }; /***/ }), -/* 455 */ +/* 458 */ /***/ (function(module, exports) { /** @@ -106157,7 +108385,7 @@ module.exports = LineToRectangle; /***/ }), -/* 456 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106166,10 +108394,10 @@ module.exports = LineToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToLine = __webpack_require__(93); -var Contains = __webpack_require__(53); -var ContainsArray = __webpack_require__(222); -var Decompose = __webpack_require__(457); +var LineToLine = __webpack_require__(90); +var Contains = __webpack_require__(54); +var ContainsArray = __webpack_require__(223); +var Decompose = __webpack_require__(460); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -106250,7 +108478,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 457 */ +/* 460 */ /***/ (function(module, exports) { /** @@ -106287,7 +108515,7 @@ module.exports = Decompose; /***/ }), -/* 458 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106296,8 +108524,8 @@ module.exports = Decompose; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(220); -var Contains = __webpack_require__(92); +var LineToCircle = __webpack_require__(221); +var Contains = __webpack_require__(89); /** * Checks if a Triangle and a Circle intersect. @@ -106352,7 +108580,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 459 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106363,8 +108591,8 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(460); -var LineToLine = __webpack_require__(93); +var TriangleToLine = __webpack_require__(463); +var LineToLine = __webpack_require__(90); /** * Checks if a Triangle and a Line intersect, and returns the intersection points as a Point object array. @@ -106411,7 +108639,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 460 */ +/* 463 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106420,8 +108648,8 @@ module.exports = GetTriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(92); -var LineToLine = __webpack_require__(93); +var Contains = __webpack_require__(89); +var LineToLine = __webpack_require__(90); /** * Checks if a Triangle and a Line intersect. @@ -106467,7 +108695,7 @@ module.exports = TriangleToLine; /***/ }), -/* 461 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106476,9 +108704,9 @@ module.exports = TriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(222); -var Decompose = __webpack_require__(462); -var LineToLine = __webpack_require__(93); +var ContainsArray = __webpack_require__(223); +var Decompose = __webpack_require__(465); +var LineToLine = __webpack_require__(90); /** * Checks if two Triangles intersect. @@ -106557,7 +108785,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 462 */ +/* 465 */ /***/ (function(module, exports) { /** @@ -106592,7 +108820,7 @@ module.exports = Decompose; /***/ }), -/* 463 */ +/* 466 */ /***/ (function(module, exports) { /** @@ -106662,7 +108890,7 @@ module.exports = PointToLine; /***/ }), -/* 464 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106671,9 +108899,9 @@ module.exports = PointToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(14); var Wrap = __webpack_require__(63); -var Angle = __webpack_require__(94); +var Angle = __webpack_require__(91); /** * Get the angle of the normal of the given line in radians. @@ -106696,7 +108924,7 @@ module.exports = NormalAngle; /***/ }), -/* 465 */ +/* 468 */ /***/ (function(module, exports) { /** @@ -106724,7 +108952,7 @@ module.exports = GetMagnitude; /***/ }), -/* 466 */ +/* 469 */ /***/ (function(module, exports) { /** @@ -106752,7 +108980,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 467 */ +/* 470 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106763,49 +108991,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(11); -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.Area = __webpack_require__(1186); +Rectangle.Ceil = __webpack_require__(1187); +Rectangle.CeilAll = __webpack_require__(1188); +Rectangle.CenterOn = __webpack_require__(179); +Rectangle.Clone = __webpack_require__(1189); +Rectangle.Contains = __webpack_require__(54); +Rectangle.ContainsPoint = __webpack_require__(1190); +Rectangle.ContainsRect = __webpack_require__(471); +Rectangle.CopyFrom = __webpack_require__(1191); +Rectangle.Decompose = __webpack_require__(460); +Rectangle.Equals = __webpack_require__(1192); +Rectangle.FitInside = __webpack_require__(1193); +Rectangle.FitOutside = __webpack_require__(1194); +Rectangle.Floor = __webpack_require__(1195); +Rectangle.FloorAll = __webpack_require__(1196); 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); +Rectangle.FromXY = __webpack_require__(1197); +Rectangle.GetAspectRatio = __webpack_require__(225); +Rectangle.GetCenter = __webpack_require__(1198); +Rectangle.GetPoint = __webpack_require__(162); +Rectangle.GetPoints = __webpack_require__(292); +Rectangle.GetSize = __webpack_require__(1199); +Rectangle.Inflate = __webpack_require__(1200); +Rectangle.Intersection = __webpack_require__(1201); +Rectangle.MarchingAnts = __webpack_require__(303); +Rectangle.MergePoints = __webpack_require__(1202); +Rectangle.MergeRect = __webpack_require__(1203); +Rectangle.MergeXY = __webpack_require__(1204); +Rectangle.Offset = __webpack_require__(1205); +Rectangle.OffsetPoint = __webpack_require__(1206); +Rectangle.Overlaps = __webpack_require__(1207); +Rectangle.Perimeter = __webpack_require__(119); +Rectangle.PerimeterPoint = __webpack_require__(1208); +Rectangle.Random = __webpack_require__(165); +Rectangle.RandomOutside = __webpack_require__(1209); +Rectangle.SameDimensions = __webpack_require__(1210); +Rectangle.Scale = __webpack_require__(1211); +Rectangle.Union = __webpack_require__(420); module.exports = Rectangle; /***/ }), -/* 468 */ +/* 471 */ /***/ (function(module, exports) { /** @@ -106845,7 +109074,7 @@ module.exports = ContainsRect; /***/ }), -/* 469 */ +/* 472 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106889,7 +109118,7 @@ module.exports = Centroid; /***/ }), -/* 470 */ +/* 473 */ /***/ (function(module, exports) { /** @@ -106930,7 +109159,7 @@ module.exports = Offset; /***/ }), -/* 471 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106995,7 +109224,7 @@ module.exports = InCenter; /***/ }), -/* 472 */ +/* 475 */ /***/ (function(module, exports) { /** @@ -107066,7 +109295,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 473 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107191,7 +109420,7 @@ module.exports = Axis; /***/ }), -/* 474 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107201,7 +109430,7 @@ module.exports = Axis; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(226); +var Events = __webpack_require__(227); /** * @classdesc @@ -107337,7 +109566,7 @@ module.exports = Button; /***/ }), -/* 475 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -107346,8 +109575,8 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(473); -var Button = __webpack_require__(474); +var Axis = __webpack_require__(476); +var Button = __webpack_require__(477); var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); var Vector2 = __webpack_require__(3); @@ -108095,7 +110324,7 @@ module.exports = Gamepad; /***/ }), -/* 476 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108106,7 +110335,7 @@ module.exports = Gamepad; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(142); +var Events = __webpack_require__(144); /** * @classdesc @@ -108337,7 +110566,7 @@ var Key = new Class({ * * @param {boolean} value - Emit `down` events on repeated key down actions, or just once? * - * @return {Phaser.Input.Keyboard.Key} This Key instance. + * @return {this} This Key instance. */ setEmitOnRepeat: function (value) { @@ -108428,7 +110657,7 @@ var Key = new Class({ * @method Phaser.Input.Keyboard.Key#reset * @since 3.6.0 * - * @return {Phaser.Input.Keyboard.Key} This Key instance. + * @return {this} This Key instance. */ reset: function () { @@ -108497,7 +110726,7 @@ module.exports = Key; /***/ }), -/* 477 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108507,10 +110736,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(142); -var GetFastValue = __webpack_require__(1); -var ProcessKeyCombo = __webpack_require__(1248); -var ResetKeyCombo = __webpack_require__(1250); +var Events = __webpack_require__(144); +var GetFastValue = __webpack_require__(2); +var ProcessKeyCombo = __webpack_require__(1251); +var ResetKeyCombo = __webpack_require__(1253); /** * @classdesc @@ -108790,7 +111019,7 @@ module.exports = KeyCombo; /***/ }), -/* 478 */ +/* 481 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108799,7 +111028,7 @@ module.exports = KeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(227); +var MergeXHRSettings = __webpack_require__(228); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -108825,6 +111054,14 @@ var XHRLoader = function (file, globalXHRSettings) xhr.responseType = file.xhrSettings.responseType; xhr.timeout = config.timeout; + if (config.headers) + { + for (var key in config.headers) + { + xhr.setRequestHeader(key, config.headers[key]); + } + } + if (config.header && config.headerValue) { xhr.setRequestHeader(config.header, config.headerValue); @@ -108840,6 +111077,11 @@ var XHRLoader = function (file, globalXHRSettings) xhr.overrideMimeType(config.overrideMimeType); } + if (config.withCredentials) + { + xhr.withCredentials = true; + } + // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.) xhr.onload = file.onLoad.bind(file, xhr); @@ -108858,7 +111100,7 @@ module.exports = XHRLoader; /***/ }), -/* 479 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -108868,11 +111110,11 @@ module.exports = XHRLoader; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(32); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); -var HTML5AudioFile = __webpack_require__(480); +var GetFastValue = __webpack_require__(2); +var HTML5AudioFile = __webpack_require__(483); var IsPlainObject = __webpack_require__(7); /** @@ -108880,7 +111122,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -109008,7 +111250,10 @@ AudioFile.getAudioURL = function (game, urls) if (url.indexOf('blob:') === 0 || url.indexOf('data:') === 0) { - return url; + return { + url: url, + type: '' + }; } var audioType = url.match(/\.([a-zA-Z0-9]+)($|\?)/); @@ -109031,7 +111276,7 @@ AudioFile.getAudioURL = function (game, urls) * Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -109046,14 +111291,14 @@ AudioFile.getAudioURL = function (game, urls) * 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 Audio Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Audio Cache. * 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 Audio Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.audio({ * key: 'title', @@ -109075,7 +111320,7 @@ AudioFile.getAudioURL = function (game, urls) * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#audio - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig|Phaser.Types.Loader.FileTypes.AudioFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -109083,7 +111328,7 @@ AudioFile.getAudioURL = function (game, urls) * @param {any} [config] - An object containing an `instances` property for HTML5Audio. Defaults to 1. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('audio', function (key, urls, config, xhrSettings) { @@ -109129,7 +111374,7 @@ module.exports = AudioFile; /***/ }), -/* 480 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109139,10 +111384,10 @@ module.exports = AudioFile; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(87); -var File = __webpack_require__(24); -var GetFastValue = __webpack_require__(1); -var GetURL = __webpack_require__(143); +var Events = __webpack_require__(88); +var File = __webpack_require__(23); +var GetFastValue = __webpack_require__(2); +var GetURL = __webpack_require__(145); var IsPlainObject = __webpack_require__(7); /** @@ -109282,7 +111527,12 @@ var HTML5AudioFile = new Class({ for (var i = 0; i < instances; i++) { var audio = new Audio(); - audio.dataset = {}; + + if (!audio.dataset) + { + audio.dataset = {}; + } + audio.dataset.name = this.key + ('0' + i).slice(-2); audio.dataset.used = 'false'; @@ -109327,7 +111577,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 481 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109337,10 +111587,10 @@ module.exports = HTML5AudioFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -109348,7 +111598,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -109423,7 +111673,7 @@ var ScriptFile = new Class({ * Adds a Script file, or array of Script files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -109438,11 +111688,11 @@ var ScriptFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.script({ * key: 'aliens', @@ -109467,14 +111717,14 @@ var ScriptFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#script - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig|Phaser.Types.Loader.FileTypes.ScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('script', function (key, url, xhrSettings) { @@ -109498,7 +111748,7 @@ module.exports = ScriptFile; /***/ }), -/* 482 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109508,10 +111758,10 @@ module.exports = ScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -109642,14 +111892,14 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('text', function (key, url, xhrSettings) { @@ -109673,7 +111923,7 @@ module.exports = TextFile; /***/ }), -/* 483 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109682,12 +111932,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(484); -var ArcadeSprite = __webpack_require__(145); +var ArcadeImage = __webpack_require__(487); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var PhysicsGroup = __webpack_require__(485); -var StaticPhysicsGroup = __webpack_require__(486); +var PhysicsGroup = __webpack_require__(488); +var StaticPhysicsGroup = __webpack_require__(489); /** * @classdesc @@ -109944,7 +112194,7 @@ module.exports = Factory; /***/ }), -/* 484 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109954,8 +112204,8 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(229); -var Image = __webpack_require__(89); +var Components = __webpack_require__(230); +var Image = __webpack_require__(109); /** * @classdesc @@ -110044,7 +112294,7 @@ module.exports = ArcadeImage; /***/ }), -/* 485 */ +/* 488 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110053,18 +112303,18 @@ module.exports = ArcadeImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(145); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var GetFastValue = __webpack_require__(1); -var Group = __webpack_require__(109); +var GetFastValue = __webpack_require__(2); +var Group = __webpack_require__(108); var IsPlainObject = __webpack_require__(7); /** * @classdesc * An Arcade Physics Group object. * - * All Game Objects created by this Group will automatically be given dynamic Arcade Physics bodies. + * All Game Objects created by or added to this Group will automatically be given dynamic Arcade Physics bodies, if they have no body. * * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}. * @@ -110329,7 +112579,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 486 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110338,18 +112588,18 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(145); +var ArcadeSprite = __webpack_require__(147); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var GetFastValue = __webpack_require__(1); -var Group = __webpack_require__(109); +var GetFastValue = __webpack_require__(2); +var Group = __webpack_require__(108); var IsPlainObject = __webpack_require__(7); /** * @classdesc * An Arcade Physics Static Group object. * - * All Game Objects created by this Group will automatically be given static Arcade Physics bodies. + * All Game Objects created by or added to this Group will automatically be given static Arcade Physics bodies, if they have no body. * * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Group}. * @@ -110520,7 +112770,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 487 */ +/* 490 */ /***/ (function(module, exports) { /** @@ -110605,7 +112855,7 @@ module.exports = OverlapRect; /***/ }), -/* 488 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110614,31 +112864,31 @@ module.exports = OverlapRect; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(489); -var Clamp = __webpack_require__(20); +var Body = __webpack_require__(492); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Collider = __webpack_require__(490); +var Collider = __webpack_require__(493); var CONST = __webpack_require__(58); -var DistanceBetween = __webpack_require__(54); +var DistanceBetween = __webpack_require__(55); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(230); -var FuzzyEqual = __webpack_require__(126); +var Events = __webpack_require__(231); +var FuzzyEqual = __webpack_require__(96); var FuzzyGreaterThan = __webpack_require__(339); var FuzzyLessThan = __webpack_require__(340); -var GetOverlapX = __webpack_require__(491); -var GetOverlapY = __webpack_require__(492); +var GetOverlapX = __webpack_require__(494); +var GetOverlapY = __webpack_require__(495); var GetValue = __webpack_require__(5); var ProcessQueue = __webpack_require__(199); -var ProcessTileCallbacks = __webpack_require__(1308); +var ProcessTileCallbacks = __webpack_require__(1311); var Rectangle = __webpack_require__(11); -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 RTree = __webpack_require__(496); +var SeparateTile = __webpack_require__(1312); +var SeparateX = __webpack_require__(1317); +var SeparateY = __webpack_require__(1318); +var Set = __webpack_require__(140); +var StaticBody = __webpack_require__(498); +var TileIntersectsBody = __webpack_require__(497); +var TransformMatrix = __webpack_require__(32); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(63); @@ -110764,6 +113014,17 @@ var World = new Class({ */ this.fps = GetValue(config, 'fps', 60); + /** + * Should Physics use a fixed update time-step (true) or sync to the render fps (false)?. + * False value of this property disables fps and timeScale properties. + * + * @name Phaser.Physics.Arcade.World#fixedStep + * @type {boolean} + * @default true + * @since 3.23.0 + */ + this.fixedStep = true; + /** * The amount of elapsed ms since the last frame. * @@ -111537,6 +113798,13 @@ var World = new Class({ // Will a step happen this frame? var willStep = (this._elapsed >= msPerFrame); + if (!this.fixedStep) + { + fixedDelta = delta * 0.001; + willStep = true; + this._elapsed = 0; + } + for (i = 0; i < bodies.length; i++) { body = bodies[i]; @@ -112240,6 +114508,8 @@ var World = new Class({ /** * Tests if Game Objects overlap. * + * See details in {@link Phaser.Physics.Arcade.World#collide}. + * * @method Phaser.Physics.Arcade.World#overlap * @since 3.0.0 * @@ -112250,6 +114520,8 @@ var World = new Class({ * @param {*} [callbackContext] - The context in which to run the callbacks. * * @return {boolean} True if at least one Game Object overlaps another. + * + * @see Phaser.Physics.Arcade.World#collide */ overlap: function (object1, object2, overlapCallback, processCallback, callbackContext) { @@ -112264,7 +114536,7 @@ var World = new Class({ * Performs a collision check and separation between the two physics enabled objects given, which can be single * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups. * - * If you don't require separation then use {@link #overlap} instead. + * If you don't require separation then use {@link Phaser.Physics.Arcade.World#overlap} instead. * * If two Groups or arrays are passed, each member of one will be tested against each member of the other. * @@ -112272,8 +114544,9 @@ var World = new Class({ * * If **only** one Array is passed, the array is iterated and every element in it is tested against the others. * - * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding - * objects are passed to it. + * Two callbacks can be provided; they receive the colliding game objects as arguments. + * If an overlap is detected, the `processCallback` is called first. It can cancel the collision by returning false. + * Next the objects are separated and `collideCallback` is invoked. * * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other. @@ -112530,7 +114803,7 @@ var World = new Class({ { var bodyA = sprite.body; - if (group.length === 0 || !bodyA || !bodyA.enable) + if (group.length === 0 || !bodyA || !bodyA.enable || bodyA.checkCollision.none) { return; } @@ -112558,9 +114831,9 @@ var World = new Class({ { bodyB = results[i]; - if (bodyA === bodyB || !bodyB.enable || !group.contains(bodyB.gameObject)) + if (bodyA === bodyB || !bodyB.enable || bodyB.checkCollision.none || !group.contains(bodyB.gameObject)) { - // Skip if comparing against itself, or if bodyB isn't actually part of the Group + // Skip if comparing against itself, or if bodyB isn't collidable, or if bodyB isn't actually part of the Group continue; } @@ -112743,7 +115016,7 @@ var World = new Class({ { var body = sprite.body; - if (!body.enable) + if (!body.enable || body.checkCollision.none) { return false; } @@ -112994,7 +115267,7 @@ module.exports = World; /***/ }), -/* 489 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113006,10 +115279,10 @@ module.exports = World; var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var Events = __webpack_require__(230); +var Events = __webpack_require__(231); var RadToDeg = __webpack_require__(184); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(53); +var RectangleContains = __webpack_require__(54); var Vector2 = __webpack_require__(3); /** @@ -113032,8 +115305,8 @@ var Body = new Class({ function Body (world, gameObject) { - var width = (gameObject.width) ? gameObject.width : 64; - var height = (gameObject.height) ? gameObject.height : 64; + var width = (gameObject.displayWidth) ? gameObject.displayWidth : 64; + var height = (gameObject.displayHeight) ? gameObject.displayHeight : 64; /** * The Arcade Physics simulation this Body belongs to. @@ -113147,7 +115420,10 @@ var Body = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.position = new Vector2(gameObject.x, gameObject.y); + this.position = new Vector2( + gameObject.x - gameObject.scaleX * gameObject.displayOriginX, + gameObject.y - gameObject.scaleY * gameObject.displayOriginY + ); /** * The position of this Body during the previous step. @@ -113160,7 +115436,7 @@ var Body = new Class({ /** * The position of this Body during the previous frame. - * + * * @name Phaser.Physics.Arcade.Body#prevFrame * @type {Phaser.Math.Vector2} * @since 3.20.0 @@ -113277,7 +115553,7 @@ var Body = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight); + this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight); /** * The Body's velocity, in pixels per second. @@ -113329,10 +115605,10 @@ var Body = new Class({ this.allowDrag = true; /** - * Absolute loss of velocity due to movement, in pixels per second squared. + * When `useDamping` is false (the default), this is absolute loss of velocity due to movement, in pixels per second squared (a vector). * The x and y components are applied separately. * - * When `useDamping` is true, this is 1 minus the damping factor. + * When `useDamping` is true, this is 1 minus the damping factor (a number). * 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. @@ -113390,10 +115666,10 @@ var Body = new Class({ /** * The rectangle used for world boundary collisions. - * + * * By default it is set to the world boundary rectangle. Or, if this Body was * created by a Physics Group, then whatever rectangle that Group defined. - * + * * You can also change it by using the `Body.setBoundsRectangle` method. * * @name Phaser.Physics.Arcade.Body#customBoundsRectangle @@ -113411,7 +115687,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#worldboundsEvent + * @see Phaser.Physics.Arcade.World#WORLD_BOUNDS */ this.onWorldBounds = false; @@ -113422,7 +115698,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#collideEvent + * @see Phaser.Physics.Arcade.World#COLLIDE */ this.onCollide = false; @@ -113433,7 +115709,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#overlapEvent + * @see Phaser.Physics.Arcade.World#OVERLAP */ this.onOverlap = false; @@ -113903,23 +116179,27 @@ var Body = new Class({ resetFlags: function () { // Store and reset collision flags - this.wasTouching.none = this.touching.none; - this.wasTouching.up = this.touching.up; - this.wasTouching.down = this.touching.down; - this.wasTouching.left = this.touching.left; - this.wasTouching.right = this.touching.right; + var wasTouching = this.wasTouching; + var touching = this.touching; + var blocked = this.blocked; - this.touching.none = true; - this.touching.up = false; - this.touching.down = false; - this.touching.left = false; - this.touching.right = false; + wasTouching.none = touching.none; + wasTouching.up = touching.up; + wasTouching.down = touching.down; + wasTouching.left = touching.left; + wasTouching.right = touching.right; - this.blocked.none = true; - this.blocked.up = false; - this.blocked.down = false; - this.blocked.left = false; - this.blocked.right = false; + touching.none = true; + touching.up = false; + touching.down = false; + touching.left = false; + touching.right = false; + + blocked.none = true; + blocked.up = false; + blocked.down = false; + blocked.left = false; + blocked.right = false; this.overlapR = 0; this.overlapX = 0; @@ -114101,7 +116381,7 @@ var Body = new Class({ * @since 3.20 * * @param {?Phaser.Geom.Rectangle} [bounds] - The new boundary rectangle. Pass `null` to use the World bounds. - * + * * @return {this} This Body object. */ setBoundsRectangle: function (bounds) @@ -114232,10 +116512,10 @@ var Body = new Class({ if (center && gameObject.getCenter) { - var ox = gameObject.displayWidth / 2; - var oy = gameObject.displayHeight / 2; + var ox = (gameObject.width - width) / 2; + var oy = (gameObject.height - height) / 2; - this.offset.set(ox - this.halfWidth, oy - this.halfHeight); + this.offset.set(ox, oy); } this.isCircle = false; @@ -114464,7 +116744,7 @@ 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. * @@ -114481,7 +116761,7 @@ 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. * @@ -114497,10 +116777,10 @@ var Body = new Class({ /** * 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 @@ -114518,10 +116798,10 @@ var Body = new Class({ /** * 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 @@ -115322,7 +117602,7 @@ module.exports = Body; /***/ }), -/* 490 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115505,7 +117785,7 @@ module.exports = Collider; /***/ }), -/* 491 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115613,7 +117893,7 @@ module.exports = GetOverlapX; /***/ }), -/* 492 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115721,7 +118001,7 @@ module.exports = GetOverlapY; /***/ }), -/* 493 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115731,7 +118011,7 @@ module.exports = GetOverlapY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(414); +var quickselect = __webpack_require__(417); /** * @classdesc @@ -116332,7 +118612,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 494 */ +/* 497 */ /***/ (function(module, exports) { /** @@ -116368,7 +118648,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 495 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116380,7 +118660,7 @@ module.exports = TileIntersectsBody; var CircleContains = __webpack_require__(60); var Class = __webpack_require__(0); var CONST = __webpack_require__(58); -var RectangleContains = __webpack_require__(53); +var RectangleContains = __webpack_require__(54); var Vector2 = __webpack_require__(3); /** @@ -116388,7 +118668,7 @@ var Vector2 = __webpack_require__(3); * A Static Arcade Physics Body. * * A Static Body never moves, and isn't automatically synchronized with its parent Game Object. - * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Body manually. + * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Static Body manually. * * A Static Body can collide with other Bodies, but is never moved by collisions. * @@ -116408,8 +118688,8 @@ var StaticBody = new Class({ function StaticBody (world, gameObject) { - var width = (gameObject.width) ? gameObject.width : 64; - var height = (gameObject.height) ? gameObject.height : 64; + var width = (gameObject.displayWidth) ? gameObject.displayWidth : 64; + var height = (gameObject.displayHeight) ? gameObject.displayHeight : 64; /** * The Arcade Physics simulation this Static Body belongs to. @@ -116468,8 +118748,8 @@ var StaticBody = new Class({ this.isCircle = false; /** - * If this Static Body is circular, this is the unscaled radius of the Static Body's boundary, as set by {@link #setCircle}, in source pixels. - * The true radius is equal to `halfWidth`. + * If this Static Body is circular, this is the radius of the boundary, as set by {@link Phaser.Physics.Arcade.StaticBody#setCircle}, in pixels. + * Equal to `halfWidth`. * * @name Phaser.Physics.Arcade.StaticBody#radius * @type {number} @@ -116479,12 +118759,13 @@ var StaticBody = new Class({ this.radius = 0; /** - * The offset of this Static Body's actual position from any updated position. + * The offset set by {@link Phaser.Physics.Arcade.StaticBody#setCircle} or {@link Phaser.Physics.Arcade.StaticBody#setSize}. * - * Unlike a dynamic Body, a Static Body does not follow its Game Object. As such, this offset is only applied when resizing the Static Body. + * This doesn't affect the Static Body's position, because a Static Body does not follow its Game Object. * * @name Phaser.Physics.Arcade.StaticBody#offset * @type {Phaser.Math.Vector2} + * @readonly * @since 3.0.0 */ this.offset = new Vector2(); @@ -116546,7 +118827,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight); + this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight); /** * A constant zero velocity used by the Arcade Physics simulation for calculations. @@ -116762,7 +119043,7 @@ var StaticBody = new Class({ this.physicsType = CONST.STATIC_BODY; /** - * The calculated change in the Body's horizontal position during the current step. + * The calculated change in the Static Body's horizontal position during the current step. * For a static body this is always zero. * * @name Phaser.Physics.Arcade.StaticBody#_dx @@ -116774,7 +119055,7 @@ var StaticBody = new Class({ this._dx = 0; /** - * The calculated change in the Body's vertical position during the current step. + * The calculated change in the Static Body's vertical position during the current step. * For a static body this is always zero. * * @name Phaser.Physics.Arcade.StaticBody#_dy @@ -116823,7 +119104,7 @@ var StaticBody = new Class({ }, /** - * Syncs the Body's position and size with its parent Game Object. + * Syncs the Static Body's position and size with its parent Game Object. * * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject * @since 3.1.0 @@ -116852,13 +119133,13 @@ var StaticBody = new Class({ }, /** - * Sets the offset of the body. + * Positions the Static Body at an offset from its Game Object. * * @method Phaser.Physics.Arcade.StaticBody#setOffset * @since 3.4.0 * - * @param {number} x - The horizontal offset of the Body from the Game Object's center. - * @param {number} y - The vertical offset of the Body from the Game Object's center. + * @param {number} x - The horizontal offset of the Static Body from the Game Object's `x`. + * @param {number} y - The vertical offset of the Static Body from the Game Object's `y`. * * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. */ @@ -116884,15 +119165,16 @@ var StaticBody = new Class({ }, /** - * Sets the size of the body. + * Sets the size of the Static Body. + * When `center` is true, also repositions it. * Resets the width and height to match current frame, if no width and height provided and a frame is found. * * @method Phaser.Physics.Arcade.StaticBody#setSize * @since 3.0.0 * - * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width. - * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height. - * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method. + * @param {integer} [width] - The width of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width. + * @param {integer} [height] - The height of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height. + * @param {boolean} [center=true] - Place the Static Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method. * * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. */ @@ -116945,7 +119227,7 @@ var StaticBody = new Class({ }, /** - * Sets this Static Body to have a circular body and sets its sizes and position. + * Sets this Static Body to have a circular body and sets its size and position. * * @method Phaser.Physics.Arcade.StaticBody#setCircle * @since 3.0.0 @@ -117354,2569 +119636,10 @@ var StaticBody = new Class({ module.exports = StaticBody; -/***/ }), -/* 496 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -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 - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} body - [description] - */ - -/** - * @classdesc - * An Impact.js compatible physics body. - * This re-creates the properties you'd get on an Entity and the math needed to update them. - * - * @class Body - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} [sx=16] - [description] - * @param {number} [sy=16] - [description] - */ -var Body = new Class({ - - initialize: - - function Body (world, x, y, sx, sy) - { - if (sx === undefined) { sx = 16; } - if (sy === undefined) { sy = sx; } - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#world - * @type {Phaser.Physics.Impact.World} - * @since 3.0.0 - */ - this.world = world; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#gameObject - * @type {Phaser.GameObjects.GameObject} - * @default null - * @since 3.0.0 - */ - this.gameObject = null; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#enabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.enabled = true; - - /** - * The ImpactBody, ImpactSprite or ImpactImage object that owns this Body, if any. - * - * @name Phaser.Physics.Impact.Body#parent - * @type {?(Phaser.Physics.Impact.ImpactBody|Phaser.Physics.Impact.ImpactImage|Phaser.Physics.Impact.ImpactSprite)} - * @since 3.0.0 - */ - this.parent; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#id - * @type {integer} - * @since 3.0.0 - */ - this.id = world.getNextID(); - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#size - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.size = { x: sx, y: sy }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#offset - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.offset = { x: 0, y: 0 }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#pos - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.pos = { x: x, y: y }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#last - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.last = { x: x, y: y }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#vel - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.vel = { x: 0, y: 0 }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#accel - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.accel = { x: 0, y: 0 }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#friction - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.friction = { x: 0, y: 0 }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#maxVel - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.maxVel = { x: world.defaults.maxVelocityX, y: world.defaults.maxVelocityY }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#standing - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.standing = false; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#gravityFactor - * @type {number} - * @since 3.0.0 - */ - this.gravityFactor = world.defaults.gravityFactor; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#bounciness - * @type {number} - * @since 3.0.0 - */ - this.bounciness = world.defaults.bounciness; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#minBounceVelocity - * @type {number} - * @since 3.0.0 - */ - this.minBounceVelocity = world.defaults.minBounceVelocity; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#accelGround - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accelGround = 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#accelAir - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accelAir = 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#jumpSpeed - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.jumpSpeed = 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#type - * @type {Phaser.Physics.Impact.TYPE} - * @since 3.0.0 - */ - this.type = TYPE.NONE; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#checkAgainst - * @type {Phaser.Physics.Impact.TYPE} - * @since 3.0.0 - */ - this.checkAgainst = TYPE.NONE; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#collides - * @type {Phaser.Physics.Impact.COLLIDES} - * @since 3.0.0 - */ - this.collides = COLLIDES.NEVER; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#debugShowBody - * @type {boolean} - * @since 3.0.0 - */ - this.debugShowBody = world.defaults.debugShowBody; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#debugShowVelocity - * @type {boolean} - * @since 3.0.0 - */ - this.debugShowVelocity = world.defaults.debugShowVelocity; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#debugBodyColor - * @type {integer} - * @since 3.0.0 - */ - this.debugBodyColor = world.defaults.bodyDebugColor; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#updateCallback - * @type {?Phaser.Types.Physics.Impact.BodyUpdateCallback} - * @since 3.0.0 - */ - this.updateCallback; - - /** - * min 44 deg, max 136 deg - * - * @name Phaser.Physics.Impact.Body#slopeStanding - * @type {{ min: number, max: number }} - * @since 3.0.0 - */ - this.slopeStanding = { min: 0.767944870877505, max: 2.3736477827122884 }; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#reset - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - */ - reset: function (x, y) - { - this.pos = { x: x, y: y }; - this.last = { x: x, y: y }; - 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 = false; - - this.gravityFactor = 1; - this.bounciness = 0; - this.minBounceVelocity = 40; - - this.accelGround = 0; - this.accelAir = 0; - this.jumpSpeed = 0; - - this.type = TYPE.NONE; - this.checkAgainst = TYPE.NONE; - this.collides = COLLIDES.NEVER; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#update - * @since 3.0.0 - * - * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update: function (delta) - { - var pos = this.pos; - - this.last.x = pos.x; - this.last.y = pos.y; - - this.vel.y += this.world.gravity * delta * this.gravityFactor; - - this.vel.x = GetVelocity(delta, this.vel.x, this.accel.x, this.friction.x, this.maxVel.x); - this.vel.y = GetVelocity(delta, this.vel.y, this.accel.y, this.friction.y, this.maxVel.y); - - var mx = this.vel.x * delta; - var my = this.vel.y * delta; - - var res = this.world.collisionMap.trace(pos.x, pos.y, mx, my, this.size.x, this.size.y); - - if (this.handleMovementTrace(res)) - { - UpdateMotion(this, res); - } - - var go = this.gameObject; - - if (go) - { - go.x = (pos.x - this.offset.x) + go.displayOriginX * go.scaleX; - go.y = (pos.y - this.offset.y) + go.displayOriginY * go.scaleY; - } - - if (this.updateCallback) - { - this.updateCallback(this); - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#drawDebug - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Graphics} graphic - [description] - */ - drawDebug: function (graphic) - { - var pos = this.pos; - - if (this.debugShowBody) - { - graphic.lineStyle(1, this.debugBodyColor, 1); - graphic.strokeRect(pos.x, pos.y, this.size.x, this.size.y); - } - - if (this.debugShowVelocity) - { - var x = pos.x + this.size.x / 2; - var y = pos.y + this.size.y / 2; - - graphic.lineStyle(1, this.world.defaults.velocityDebugColor, 1); - graphic.lineBetween(x, y, x + this.vel.x, y + this.vel.y); - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#willDrawDebug - * @since 3.0.0 - * - * @return {boolean} [description] - */ - willDrawDebug: function () - { - return (this.debugShowBody || this.debugShowVelocity); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#skipHash - * @since 3.0.0 - * - * @return {boolean} [description] - */ - skipHash: function () - { - return (!this.enabled || (this.type === 0 && this.checkAgainst === 0 && this.collides === 0)); - }, - - /** - * Determines whether the body collides with the `other` one or not. - * - * @method Phaser.Physics.Impact.Body#touches - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} other - [description] - * - * @return {boolean} [description] - */ - touches: function (other) - { - return !( - this.pos.x >= other.pos.x + other.size.x || - this.pos.x + this.size.x <= other.pos.x || - this.pos.y >= other.pos.y + other.size.y || - this.pos.y + this.size.y <= other.pos.y - ); - }, - - /** - * Reset the size and position of the physics body. - * - * @method Phaser.Physics.Impact.Body#resetSize - * @since 3.0.0 - * - * @param {number} x - The x coordinate to position the body. - * @param {number} y - The y coordinate to position the body. - * @param {number} width - The width of the body. - * @param {number} height - The height of the body. - * - * @return {Phaser.Physics.Impact.Body} This Body object. - */ - resetSize: function (x, y, width, height) - { - this.pos.x = x; - this.pos.y = y; - this.size.x = width; - this.size.y = height; - - return this; - }, - - /** - * Export this body object to JSON. - * - * @method Phaser.Physics.Impact.Body#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.Physics.Impact.JSONImpactBody} JSON representation of this body object. - */ - toJSON: function () - { - var output = { - 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 - }; - - return output; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#fromJSON - * @todo Code it! - * @since 3.0.0 - * - * @param {object} config - [description] - */ - fromJSON: function () - { - }, - - /** - * Can be overridden by user code - * - * @method Phaser.Physics.Impact.Body#check - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} other - [description] - */ - check: function () - { - }, - - /** - * Can be overridden by user code - * - * @method Phaser.Physics.Impact.Body#collideWith - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} other - [description] - * @param {string} axis - [description] - */ - collideWith: function (other, axis) - { - if (this.parent && this.parent._collideCallback) - { - this.parent._collideCallback.call(this.parent._callbackScope, this, other, axis); - } - }, - - /** - * Can be overridden by user code but must return a boolean. - * - * @method Phaser.Physics.Impact.Body#handleMovementTrace - * @since 3.0.0 - * - * @param {number} res - [description] - * - * @return {boolean} [description] - */ - handleMovementTrace: function () - { - return true; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.world.remove(this); - - this.enabled = false; - - this.world = null; - - this.gameObject = null; - - this.parent = null; - } - -}); - -module.exports = Body; - - -/***/ }), -/* 497 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var DefaultDefs = __webpack_require__(1322); - -/** - * @classdesc - * [description] - * - * @class CollisionMap - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {integer} [tilesize=32] - [description] - * @param {array} [data] - [description] - */ -var CollisionMap = new Class({ - - initialize: - - function CollisionMap (tilesize, data) - { - if (tilesize === undefined) { tilesize = 32; } - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#tilesize - * @type {integer} - * @default 32 - * @since 3.0.0 - */ - this.tilesize = tilesize; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#data - * @type {array} - * @since 3.0.0 - */ - this.data = (Array.isArray(data)) ? data : []; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#width - * @type {number} - * @since 3.0.0 - */ - this.width = (Array.isArray(data)) ? data[0].length : 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#height - * @type {number} - * @since 3.0.0 - */ - this.height = (Array.isArray(data)) ? data.length : 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#lastSlope - * @type {integer} - * @default 55 - * @since 3.0.0 - */ - this.lastSlope = 55; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#tiledef - * @type {object} - * @since 3.0.0 - */ - this.tiledef = DefaultDefs; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.CollisionMap#trace - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} vx - [description] - * @param {number} vy - [description] - * @param {number} objectWidth - [description] - * @param {number} objectHeight - [description] - * - * @return {boolean} [description] - */ - trace: function (x, y, vx, vy, objectWidth, objectHeight) - { - // Set up the trace-result - var res = { - collision: { x: false, y: false, slope: false }, - pos: { x: x + vx, y: y + vy }, - tile: { x: 0, y: 0 } - }; - - if (!this.data) - { - return res; - } - - var steps = Math.ceil(Math.max(Math.abs(vx), Math.abs(vy)) / this.tilesize); - - if (steps > 1) - { - var sx = vx / steps; - var sy = vy / steps; - - for (var i = 0; i < steps && (sx || sy); i++) - { - this.step(res, x, y, sx, sy, objectWidth, objectHeight, vx, vy, i); - - x = res.pos.x; - y = res.pos.y; - - if (res.collision.x) - { - sx = 0; - vx = 0; - } - - if (res.collision.y) - { - sy = 0; - vy = 0; - } - - if (res.collision.slope) - { - break; - } - } - } - else - { - this.step(res, x, y, vx, vy, objectWidth, objectHeight, vx, vy, 0); - } - - return res; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.CollisionMap#step - * @since 3.0.0 - * - * @param {object} res - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} vx - [description] - * @param {number} vy - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} rvx - [description] - * @param {number} rvy - [description] - * @param {number} step - [description] - */ - step: function (res, x, y, vx, vy, width, height, rvx, rvy, step) - { - var t = 0; - var tileX; - var tileY; - var tilesize = this.tilesize; - var mapWidth = this.width; - var mapHeight = this.height; - - // Horizontal - if (vx) - { - var pxOffsetX = (vx > 0 ? width : 0); - var tileOffsetX = (vx < 0 ? tilesize : 0); - - var firstTileY = Math.max(Math.floor(y / tilesize), 0); - var lastTileY = Math.min(Math.ceil((y + height) / tilesize), mapHeight); - - tileX = Math.floor((res.pos.x + pxOffsetX) / tilesize); - - var prevTileX = Math.floor((x + pxOffsetX) / tilesize); - - if (step > 0 || tileX === prevTileX || prevTileX < 0 || prevTileX >= mapWidth) - { - prevTileX = -1; - } - - if (tileX >= 0 && tileX < mapWidth) - { - for (tileY = firstTileY; tileY < lastTileY; tileY++) - { - if (prevTileX !== -1) - { - t = this.data[tileY][prevTileX]; - - if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, prevTileX, tileY)) - { - break; - } - } - - t = this.data[tileY][tileX]; - - if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY))) - { - if (t > 1 && t <= this.lastSlope && res.collision.slope) - { - break; - } - - res.collision.x = true; - res.tile.x = t; - res.pos.x = (tileX * tilesize) - pxOffsetX + tileOffsetX; - x = res.pos.x; - rvx = 0; - - break; - } - } - } - } - - // Vertical - if (vy) - { - var pxOffsetY = (vy > 0 ? height : 0); - var tileOffsetY = (vy < 0 ? tilesize : 0); - - var firstTileX = Math.max(Math.floor(res.pos.x / tilesize), 0); - var lastTileX = Math.min(Math.ceil((res.pos.x + width) / tilesize), mapWidth); - - tileY = Math.floor((res.pos.y + pxOffsetY) / tilesize); - - var prevTileY = Math.floor((y + pxOffsetY) / tilesize); - - if (step > 0 || tileY === prevTileY || prevTileY < 0 || prevTileY >= mapHeight) - { - prevTileY = -1; - } - - if (tileY >= 0 && tileY < mapHeight) - { - for (tileX = firstTileX; tileX < lastTileX; tileX++) - { - if (prevTileY !== -1) - { - t = this.data[prevTileY][tileX]; - - if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, prevTileY)) - { - break; - } - } - - t = this.data[tileY][tileX]; - - if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY))) - { - if (t > 1 && t <= this.lastSlope && res.collision.slope) - { - break; - } - - res.collision.y = true; - res.tile.y = t; - res.pos.y = tileY * tilesize - pxOffsetY + tileOffsetY; - - break; - } - } - } - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.CollisionMap#checkDef - * @since 3.0.0 - * - * @param {object} res - [description] - * @param {number} t - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} vx - [description] - * @param {number} vy - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} tileX - [description] - * @param {number} tileY - [description] - * - * @return {boolean} [description] - */ - checkDef: function (res, t, x, y, vx, vy, width, height, tileX, tileY) - { - var def = this.tiledef[t]; - - if (!def) - { - return false; - } - - var tilesize = this.tilesize; - - var lx = (tileX + def[0]) * tilesize; - var ly = (tileY + def[1]) * tilesize; - var lvx = (def[2] - def[0]) * tilesize; - var lvy = (def[3] - def[1]) * tilesize; - var solid = def[4]; - - var tx = x + vx + (lvy < 0 ? width : 0) - lx; - var ty = y + vy + (lvx > 0 ? height : 0) - ly; - - if (lvx * ty - lvy * tx > 0) - { - if (vx * -lvy + vy * lvx < 0) - { - return solid; - } - - var length = Math.sqrt(lvx * lvx + lvy * lvy); - var nx = lvy / length; - var ny = -lvx / length; - - var proj = tx * nx + ty * ny; - var px = nx * proj; - var py = ny * proj; - - if (px * px + py * py >= vx * vx + vy * vy) - { - return solid || (lvx * (ty - vy) - lvy * (tx - vx) < 0.5); - } - - res.pos.x = x + vx - px; - res.pos.y = y + vy - py; - res.collision.slope = { x: lvx, y: lvy, nx: nx, ny: ny }; - - return true; - } - - return false; - } - -}); - -module.exports = CollisionMap; - - -/***/ }), -/* 498 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var ImpactBody = __webpack_require__(499); -var ImpactImage = __webpack_require__(500); -var ImpactSprite = __webpack_require__(501); - -/** - * @classdesc - * 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. - * - * @class Factory - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - A reference to the Impact Physics world. - */ -var Factory = new Class({ - - initialize: - - function Factory (world) - { - /** - * A reference to the Impact Physics world. - * - * @name Phaser.Physics.Impact.Factory#world - * @type {Phaser.Physics.Impact.World} - * @since 3.0.0 - */ - this.world = world; - - /** - * A reference to the Scene.Systems this Impact Physics instance belongs to. - * - * @name Phaser.Physics.Impact.Factory#sys - * @type {Phaser.Scenes.Systems} - * @since 3.0.0 - */ - this.sys = world.scene.sys; - }, - - /** - * Creates a new ImpactBody object and adds it to the physics simulation. - * - * @method Phaser.Physics.Impact.Factory#body - * @since 3.0.0 - * - * @param {number} x - The horizontal position of the body in the physics world. - * @param {number} y - The vertical position of the body in the physics world. - * @param {number} width - The width of the body. - * @param {number} height - The height of the body. - * - * @return {Phaser.Physics.Impact.ImpactBody} The ImpactBody object that was created. - */ - body: function (x, y, width, height) - { - return new ImpactBody(this.world, x, y, width, height); - }, - - /** - * Adds an Impact Physics Body to the given Game Object. - * - * @method Phaser.Physics.Impact.Factory#existing - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to receive the physics body. - * - * @return {Phaser.GameObjects.GameObject} The Game Object. - */ - existing: function (gameObject) - { - var x = gameObject.x - gameObject.frame.centerX; - var y = gameObject.y - gameObject.frame.centerY; - var w = gameObject.width; - var h = gameObject.height; - - gameObject.body = this.world.create(x, y, w, h); - - gameObject.body.parent = gameObject; - gameObject.body.gameObject = gameObject; - - return gameObject; - }, - - /** - * Creates a new ImpactImage object and adds it to the physics world. - * - * @method Phaser.Physics.Impact.Factory#image - * @since 3.0.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} 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. - * - * @return {Phaser.Physics.Impact.ImpactImage} The ImpactImage object that was created. - */ - image: function (x, y, key, frame) - { - var image = new ImpactImage(this.world, x, y, key, frame); - - this.sys.displayList.add(image); - - return image; - }, - - /** - * Creates a new ImpactSprite object and adds it to the physics world. - * - * @method Phaser.Physics.Impact.Factory#sprite - * @since 3.0.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} 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. - * - * @return {Phaser.Physics.Impact.ImpactSprite} The ImpactSprite object that was created. - */ - sprite: function (x, y, key, frame) - { - var sprite = new ImpactSprite(this.world, x, y, key, frame); - - this.sys.displayList.add(sprite); - this.sys.updateList.add(sprite); - - return sprite; - }, - - /** - * Destroys this Factory. - * - * @method Phaser.Physics.Impact.Factory#destroy - * @since 3.5.0 - */ - destroy: function () - { - this.world = null; - this.sys = null; - } - -}); - -module.exports = Factory; - - /***/ }), /* 499 */ /***/ (function(module, exports, __webpack_require__) { -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Components = __webpack_require__(232); - -/** - * @classdesc - * [description] - * - * @class ImpactBody - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @extends Phaser.Physics.Impact.Components.Acceleration - * @extends Phaser.Physics.Impact.Components.BodyScale - * @extends Phaser.Physics.Impact.Components.BodyType - * @extends Phaser.Physics.Impact.Components.Bounce - * @extends Phaser.Physics.Impact.Components.CheckAgainst - * @extends Phaser.Physics.Impact.Components.Collides - * @extends Phaser.Physics.Impact.Components.Debug - * @extends Phaser.Physics.Impact.Components.Friction - * @extends Phaser.Physics.Impact.Components.Gravity - * @extends Phaser.Physics.Impact.Components.Offset - * @extends Phaser.Physics.Impact.Components.SetGameObject - * @extends Phaser.Physics.Impact.Components.Velocity - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @param {number} x - x - The horizontal position of this physics body in the world. - * @param {number} y - y - The vertical position of this physics body in the world. - * @param {number} width - The width of the physics body in the world. - * @param {number} height - [description] - */ -var ImpactBody = new Class({ - - Mixins: [ - Components.Acceleration, - Components.BodyScale, - Components.BodyType, - Components.Bounce, - Components.CheckAgainst, - Components.Collides, - Components.Debug, - Components.Friction, - Components.Gravity, - Components.Offset, - Components.SetGameObject, - Components.Velocity - ], - - initialize: - - function ImpactBody (world, x, y, width, height) - { - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#body - * @type {Phaser.Physics.Impact.Body} - * @since 3.0.0 - */ - this.body = world.create(x, y, width, height); - - this.body.parent = this; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#size - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.size = this.body.size; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#offset - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.offset = this.body.offset; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#vel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.vel = this.body.vel; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#accel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.accel = this.body.accel; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#friction - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.friction = this.body.friction; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#maxVel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.maxVel = this.body.maxVel; - } - -}); - -module.exports = ImpactBody; - - -/***/ }), -/* 500 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Components = __webpack_require__(232); -var Image = __webpack_require__(89); - -/** - * @classdesc - * An Impact 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. - * - * @class ImpactImage - * @extends Phaser.GameObjects.Image - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @extends Phaser.Physics.Impact.Components.Acceleration - * @extends Phaser.Physics.Impact.Components.BodyScale - * @extends Phaser.Physics.Impact.Components.BodyType - * @extends Phaser.Physics.Impact.Components.Bounce - * @extends Phaser.Physics.Impact.Components.CheckAgainst - * @extends Phaser.Physics.Impact.Components.Collides - * @extends Phaser.Physics.Impact.Components.Debug - * @extends Phaser.Physics.Impact.Components.Friction - * @extends Phaser.Physics.Impact.Components.Gravity - * @extends Phaser.Physics.Impact.Components.Offset - * @extends Phaser.Physics.Impact.Components.SetGameObject - * @extends Phaser.Physics.Impact.Components.Velocity - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.Texture - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @param {Phaser.Physics.Impact.World} world - The physics world of the Impact physics system. - * @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. - */ -var ImpactImage = new Class({ - - Extends: Image, - - Mixins: [ - Components.Acceleration, - Components.BodyScale, - Components.BodyType, - Components.Bounce, - Components.CheckAgainst, - Components.Collides, - Components.Debug, - Components.Friction, - Components.Gravity, - Components.Offset, - Components.SetGameObject, - Components.Velocity - ], - - initialize: - - function ImpactImage (world, x, y, texture, frame) - { - Image.call(this, world.scene, x, y, texture, frame); - - /** - * The Physics Body linked to an ImpactImage. - * - * @name Phaser.Physics.Impact.ImpactImage#body - * @type {Phaser.Physics.Impact.Body} - * @since 3.0.0 - */ - this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height); - - this.body.parent = this; - this.body.gameObject = this; - - /** - * The size of the physics Body. - * - * @name Phaser.Physics.Impact.ImpactImage#size - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.size = this.body.size; - - /** - * The X and Y offset of the Body from the left and top of the Image. - * - * @name Phaser.Physics.Impact.ImpactImage#offset - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.offset = this.body.offset; - - /** - * The velocity, or rate of change the Body's position. Measured in pixels per second. - * - * @name Phaser.Physics.Impact.ImpactImage#vel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.vel = this.body.vel; - - /** - * The acceleration is the rate of change of the velocity. Measured in pixels per second squared. - * - * @name Phaser.Physics.Impact.ImpactImage#accel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.accel = this.body.accel; - - /** - * Friction between colliding bodies. - * - * @name Phaser.Physics.Impact.ImpactImage#friction - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.friction = this.body.friction; - - /** - * The maximum velocity of the body. - * - * @name Phaser.Physics.Impact.ImpactImage#maxVel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.maxVel = this.body.maxVel; - } - -}); - -module.exports = ImpactImage; - - -/***/ }), -/* 501 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Components = __webpack_require__(232); -var Sprite = __webpack_require__(65); - -/** - * @classdesc - * An Impact 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. - * - * @class ImpactSprite - * @extends Phaser.GameObjects.Sprite - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @extends Phaser.Physics.Impact.Components.Acceleration - * @extends Phaser.Physics.Impact.Components.BodyScale - * @extends Phaser.Physics.Impact.Components.BodyType - * @extends Phaser.Physics.Impact.Components.Bounce - * @extends Phaser.Physics.Impact.Components.CheckAgainst - * @extends Phaser.Physics.Impact.Components.Collides - * @extends Phaser.Physics.Impact.Components.Debug - * @extends Phaser.Physics.Impact.Components.Friction - * @extends Phaser.Physics.Impact.Components.Gravity - * @extends Phaser.Physics.Impact.Components.Offset - * @extends Phaser.Physics.Impact.Components.SetGameObject - * @extends Phaser.Physics.Impact.Components.Velocity - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.Texture - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @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. - */ -var ImpactSprite = new Class({ - - Extends: Sprite, - - Mixins: [ - Components.Acceleration, - Components.BodyScale, - Components.BodyType, - Components.Bounce, - Components.CheckAgainst, - Components.Collides, - Components.Debug, - Components.Friction, - Components.Gravity, - Components.Offset, - Components.SetGameObject, - Components.Velocity - ], - - initialize: - - function ImpactSprite (world, x, y, texture, frame) - { - Sprite.call(this, world.scene, x, y, texture, frame); - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#body - * @type {Phaser.Physics.Impact.Body} - * @since 3.0.0 - */ - this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height); - - this.body.parent = this; - this.body.gameObject = this; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#size - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.size = this.body.size; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#offset - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.offset = this.body.offset; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#vel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.vel = this.body.vel; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#accel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.accel = this.body.accel; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#friction - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.friction = this.body.friction; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#maxVel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.maxVel = this.body.maxVel; - } - -}); - -module.exports = ImpactSprite; - - -/***/ }), -/* 502 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Body = __webpack_require__(496); -var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(112); -var CollisionMap = __webpack_require__(497); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(231); -var GetFastValue = __webpack_require__(1); -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__(113); - -/** - * @classdesc - * [description] - * - * @class World - * @extends Phaser.Events.EventEmitter - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Impact World instance belongs. - * @param {Phaser.Types.Physics.Impact.WorldConfig} config - [description] - */ -var World = new Class({ - - Extends: EventEmitter, - - initialize: - - function World (scene, config) - { - EventEmitter.call(this); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#bodies - * @type {Phaser.Structs.Set.} - * @since 3.0.0 - */ - this.bodies = new Set(); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#gravity - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.gravity = GetFastValue(config, 'gravity', 0); - - /** - * Spatial hash cell dimensions - * - * @name Phaser.Physics.Impact.World#cellSize - * @type {integer} - * @default 64 - * @since 3.0.0 - */ - this.cellSize = GetFastValue(config, 'cellSize', 64); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#collisionMap - * @type {Phaser.Physics.Impact.CollisionMap} - * @since 3.0.0 - */ - this.collisionMap = new CollisionMap(); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#timeScale - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.timeScale = GetFastValue(config, 'timeScale', 1); - - /** - * Impacts maximum time step is 20 fps. - * - * @name Phaser.Physics.Impact.World#maxStep - * @type {number} - * @default 0.05 - * @since 3.0.0 - */ - this.maxStep = GetFastValue(config, 'maxStep', 0.05); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#enabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.enabled = true; - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#drawDebug - * @type {boolean} - * @since 3.0.0 - */ - this.drawDebug = GetFastValue(config, 'debug', false); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#debugGraphic - * @type {Phaser.GameObjects.Graphics} - * @since 3.0.0 - */ - this.debugGraphic; - - var _maxVelocity = GetFastValue(config, 'maxVelocity', 100); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#defaults - * @type {Phaser.Types.Physics.Impact.WorldDefaults} - * @since 3.0.0 - */ - this.defaults = { - debugShowBody: GetFastValue(config, 'debugShowBody', true), - debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true), - bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff), - velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00), - maxVelocityX: GetFastValue(config, 'maxVelocityX', _maxVelocity), - maxVelocityY: GetFastValue(config, 'maxVelocityY', _maxVelocity), - minBounceVelocity: GetFastValue(config, 'minBounceVelocity', 40), - gravityFactor: GetFastValue(config, 'gravityFactor', 1), - bounciness: GetFastValue(config, 'bounciness', 0) - }; - - /** - * An object containing the 4 wall bodies that bound the physics world. - * - * @name Phaser.Physics.Impact.World#walls - * @type {Phaser.Types.Physics.Impact.WorldWalls} - * @since 3.0.0 - */ - this.walls = { left: null, right: null, top: null, bottom: null }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#delta - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.delta = 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#_lastId - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._lastId = 0; - - 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); - } - } - - if (this.drawDebug) - { - this.createDebugGraphic(); - } - }, - - /** - * Sets the collision map for the world either from a Weltmeister JSON level in the cache or from - * a 2D array. If loading from a Weltmeister level, the map must have a layer called "collision". - * - * @method Phaser.Physics.Impact.World#setCollisionMap - * @since 3.0.0 - * - * @param {(string|integer[][])} key - Either a string key that corresponds to a Weltmeister level - * in the cache, or a 2D array of collision IDs. - * @param {integer} tileSize - The size of a tile. This is optional if loading from a Weltmeister - * level in the cache. - * - * @return {?Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap, or null if the method failed to - * create the CollisionMap. - */ - setCollisionMap: function (key, tileSize) - { - if (typeof key === 'string') - { - var tilemapData = this.scene.cache.tilemap.get(key); - - if (!tilemapData || tilemapData.format !== TILEMAP_FORMATS.WELTMEISTER) - { - console.warn('The specified key does not correspond to a Weltmeister tilemap: ' + key); - return null; - } - - var layers = tilemapData.data.layer; - var collisionLayer; - for (var i = 0; i < layers.length; i++) - { - if (layers[i].name === 'collision') - { - collisionLayer = layers[i]; - break; - } - } - - if (tileSize === undefined) { tileSize = collisionLayer.tilesize; } - - this.collisionMap = new CollisionMap(tileSize, collisionLayer.data); - } - else if (Array.isArray(key)) - { - this.collisionMap = new CollisionMap(tileSize, key); - } - else - { - console.warn('Invalid Weltmeister collision map data: ' + key); - } - - return this.collisionMap; - }, - - /** - * Sets the collision map for the world from a tilemap layer. Only tiles that are marked as - * colliding will be used. You can specify the mapping from tiles to slope IDs in a couple of - * ways. The easiest is to use Tiled and the slopeTileProperty option. Alternatively, you can - * manually create a slopeMap that stores the mapping between tile indices and slope IDs. - * - * @method Phaser.Physics.Impact.World#setCollisionMapFromTilemapLayer - * @since 3.0.0 - * - * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemap layer to use. - * @param {Phaser.Types.Physics.Impact.CollisionOptions} [options] - Options for controlling the mapping from tiles to slope IDs. - * - * @return {Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap. - */ - setCollisionMapFromTilemapLayer: function (tilemapLayer, options) - { - if (options === undefined) { options = {}; } - var slopeProperty = GetFastValue(options, 'slopeProperty', null); - var slopeMap = GetFastValue(options, 'slopeMap', null); - var collidingSlope = GetFastValue(options, 'defaultCollidingSlope', null); - var nonCollidingSlope = GetFastValue(options, 'defaultNonCollidingSlope', 0); - - var layerData = tilemapLayer.layer; - var tileSize = layerData.baseTileWidth; - var collisionData = []; - - for (var ty = 0; ty < layerData.height; ty++) - { - collisionData[ty] = []; - - for (var tx = 0; tx < layerData.width; tx++) - { - var tile = layerData.data[ty][tx]; - - if (tile && tile.collides) - { - if (slopeProperty !== null && HasValue(tile.properties, slopeProperty)) - { - collisionData[ty][tx] = parseInt(tile.properties[slopeProperty], 10); - } - else if (slopeMap !== null && HasValue(slopeMap, tile.index)) - { - collisionData[ty][tx] = slopeMap[tile.index]; - } - else if (collidingSlope !== null) - { - collisionData[ty][tx] = collidingSlope; - } - else - { - collisionData[ty][tx] = tile.index; - } - } - else - { - collisionData[ty][tx] = nonCollidingSlope; - } - } - } - - this.collisionMap = new CollisionMap(tileSize, collisionData); - - return this.collisionMap; - }, - - /** - * Sets the bounds of the Physics world to match the given world pixel dimensions. - * You can optionally set which 'walls' to create: left, right, top or bottom. - * If none of the walls are given it will default to use the walls settings it had previously. - * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size - * the newly created bounds will also not have the left and right walls. - * Explicitly state them in the parameters to override this. - * - * @method Phaser.Physics.Impact.World#setBounds - * @since 3.0.0 - * - * @param {number} [x] - The x coordinate of the top-left corner of the bounds. - * @param {number} [y] - 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=64] - [description] - * @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. - * @param {boolean} [bottom=true] - If true will create the bottom bounds wall. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setBounds: function (x, y, width, height, thickness, left, right, top, bottom) - { - if (x === undefined) { x = 0; } - 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 = 64; } - if (left === undefined) { left = true; } - if (right === undefined) { right = true; } - if (top === undefined) { top = true; } - if (bottom === undefined) { bottom = true; } - - this.updateWall(left, 'left', x - thickness, y, thickness, height); - this.updateWall(right, 'right', x + width, y, thickness, height); - this.updateWall(top, 'top', x, y - thickness, width, thickness); - this.updateWall(bottom, 'bottom', x, y + height, width, thickness); - - return this; - }, - - /** - * position = 'left', 'right', 'top' or 'bottom' - * - * @method Phaser.Physics.Impact.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] - */ - updateWall: function (add, position, x, y, width, height) - { - var wall = this.walls[position]; - - if (add) - { - if (wall) - { - wall.resetSize(x, y, width, height); - } - else - { - this.walls[position] = this.create(x, y, width, height); - this.walls[position].name = position; - this.walls[position].gravityFactor = 0; - this.walls[position].collides = COLLIDES.FIXED; - } - } - else - { - if (wall) - { - this.bodies.remove(wall); - } - - this.walls[position] = null; - } - }, - - /** - * Creates a Graphics Game Object used for debug display and enables the world for debug drawing. - * - * @method Phaser.Physics.Impact.World#createDebugGraphic - * @since 3.0.0 - * - * @return {Phaser.GameObjects.Graphics} The Graphics object created that will have the debug visuals drawn to it. - */ - createDebugGraphic: function () - { - var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 }); - - graphic.setDepth(Number.MAX_VALUE); - - this.debugGraphic = graphic; - - this.drawDebug = true; - - return graphic; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#getNextID - * @since 3.0.0 - * - * @return {integer} [description] - */ - getNextID: function () - { - return this._lastId++; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#create - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} sizeX - [description] - * @param {number} sizeY - [description] - * - * @return {Phaser.Physics.Impact.Body} The Body that was added to this World. - */ - create: function (x, y, sizeX, sizeY) - { - var body = new Body(this, x, y, sizeX, sizeY); - - this.bodies.set(body); - - return body; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#remove - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} object - The Body to remove from this World. - */ - remove: function (object) - { - this.bodies.delete(object); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#pause - * @fires Phaser.Physics.Impact.Events#PAUSE - * @since 3.0.0 - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - pause: function () - { - this.enabled = false; - - this.emit(Events.PAUSE); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#resume - * @fires Phaser.Physics.Impact.Events#RESUME - * @since 3.0.0 - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - resume: function () - { - this.enabled = true; - - this.emit(Events.RESUME); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#update - * @since 3.0.0 - * - * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. - * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update: function (time, delta) - { - if (!this.enabled || this.bodies.size === 0) - { - return; - } - - // Impact uses a divided delta value that is clamped to the maxStep (20fps) maximum - - var clampedDelta = Math.min(delta / 1000, this.maxStep) * this.timeScale; - - this.delta = clampedDelta; - - // Update all active bodies - - var i; - var body; - var bodies = this.bodies.entries; - var len = bodies.length; - var hash = {}; - var size = this.cellSize; - - for (i = 0; i < len; i++) - { - body = bodies[i]; - - if (body.enabled) - { - body.update(clampedDelta); - } - } - - // Run collision against them all now they're in the new positions from the update - - for (i = 0; i < len; i++) - { - body = bodies[i]; - - if (body && !body.skipHash()) - { - this.checkHash(body, hash, size); - } - } - - if (this.drawDebug) - { - var graphics = this.debugGraphic; - - graphics.clear(); - - for (i = 0; i < len; i++) - { - body = bodies[i]; - - if (body && body.willDrawDebug()) - { - body.drawDebug(graphics); - } - } - } - }, - - /** - * Check the body against the spatial hash. - * - * @method Phaser.Physics.Impact.World#checkHash - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} body - [description] - * @param {object} hash - [description] - * @param {number} size - [description] - */ - checkHash: function (body, hash, size) - { - var checked = {}; - - var xmin = Math.floor(body.pos.x / size); - var ymin = Math.floor(body.pos.y / size); - var xmax = Math.floor((body.pos.x + body.size.x) / size) + 1; - var ymax = Math.floor((body.pos.y + body.size.y) / size) + 1; - - for (var x = xmin; x < xmax; x++) - { - for (var y = ymin; y < ymax; y++) - { - if (!hash[x]) - { - hash[x] = {}; - hash[x][y] = [ body ]; - } - else if (!hash[x][y]) - { - hash[x][y] = [ body ]; - } - else - { - var cell = hash[x][y]; - - for (var c = 0; c < cell.length; c++) - { - if (body.touches(cell[c]) && !checked[cell[c].id]) - { - checked[cell[c].id] = true; - - this.checkBodies(body, cell[c]); - } - } - - cell.push(body); - } - } - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#checkBodies - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} bodyA - [description] - * @param {Phaser.Physics.Impact.Body} bodyB - [description] - */ - checkBodies: function (bodyA, bodyB) - { - // 2 fixed bodies won't do anything - if (bodyA.collides === COLLIDES.FIXED && bodyB.collides === COLLIDES.FIXED) - { - return; - } - - // bitwise checks - if (bodyA.checkAgainst & bodyB.type) - { - bodyA.check(bodyB); - } - - if (bodyB.checkAgainst & bodyA.type) - { - bodyB.check(bodyA); - } - - if (bodyA.collides && bodyB.collides && bodyA.collides + bodyB.collides > COLLIDES.ACTIVE) - { - Solver(this, bodyA, bodyB); - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setCollidesNever - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setCollidesNever: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.NEVER; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setLite - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setLite: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.LITE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setPassive - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setPassive: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.PASSIVE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setActive - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setActive: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.ACTIVE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setFixed - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setFixed: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.FIXED; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setTypeNone - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setTypeNone: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.NONE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setTypeA - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setTypeA: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.A; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setTypeB - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setTypeB: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.B; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setAvsB - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setAvsB: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.A; - bodies[i].checkAgainst = TYPE.B; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setBvsA - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setBvsA: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.B; - bodies[i].checkAgainst = TYPE.A; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setCheckAgainstNone - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setCheckAgainstNone: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].checkAgainst = TYPE.NONE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setCheckAgainstA - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setCheckAgainstA: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].checkAgainst = TYPE.A; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setCheckAgainstB - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setCheckAgainstB: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].checkAgainst = TYPE.B; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#shutdown - * @since 3.0.0 - */ - shutdown: function () - { - this.removeAllListeners(); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.removeAllListeners(); - - this.scene = null; - - this.bodies.clear(); - - this.bodies = null; - - this.collisionMap = null; - } - -}); - -module.exports = World; - - -/***/ }), -/* 503 */ -/***/ (function(module, exports, __webpack_require__) { - /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -120320,7 +120043,7 @@ module.exports = BodyBounds; /***/ }), -/* 504 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120329,18 +120052,18 @@ module.exports = BodyBounds; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(42); +var Bodies = __webpack_require__(43); 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 Composites = __webpack_require__(232); +var Constraint = __webpack_require__(79); +var Svg = __webpack_require__(233); +var MatterGameObject = __webpack_require__(1320); +var MatterImage = __webpack_require__(502); +var MatterSprite = __webpack_require__(503); +var MatterTileBody = __webpack_require__(237); +var PhysicsEditorParser = __webpack_require__(234); +var PhysicsJSONParser = __webpack_require__(235); +var PointerConstraint = __webpack_require__(1349); var Vertices = __webpack_require__(31); /** @@ -121250,7 +120973,7 @@ module.exports = Factory; /***/ }), -/* 505 */ +/* 501 */ /***/ (function(module, exports) { /** @@ -121920,7 +121643,7 @@ function points_eq(a,b,precision){ /***/ }), -/* 506 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121930,11 +121653,11 @@ function points_eq(a,b,precision){ */ var Class = __webpack_require__(0); -var Components = __webpack_require__(147); -var GameObject = __webpack_require__(14); -var GetFastValue = __webpack_require__(1); -var Image = __webpack_require__(89); -var Pipeline = __webpack_require__(121); +var Components = __webpack_require__(149); +var GameObject = __webpack_require__(13); +var GetFastValue = __webpack_require__(2); +var Image = __webpack_require__(109); +var Pipeline = __webpack_require__(120); var Vector2 = __webpack_require__(3); /** @@ -122056,7 +121779,7 @@ module.exports = MatterImage; /***/ }), -/* 507 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122065,13 +121788,13 @@ module.exports = MatterImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationComponent = __webpack_require__(288); +var AnimationComponent = __webpack_require__(287); var Class = __webpack_require__(0); -var Components = __webpack_require__(147); -var GameObject = __webpack_require__(14); -var GetFastValue = __webpack_require__(1); -var Pipeline = __webpack_require__(121); -var Sprite = __webpack_require__(65); +var Components = __webpack_require__(149); +var GameObject = __webpack_require__(13); +var GetFastValue = __webpack_require__(2); +var Pipeline = __webpack_require__(120); +var Sprite = __webpack_require__(74); var Vector2 = __webpack_require__(3); /** @@ -122198,7 +121921,7 @@ module.exports = MatterSprite; /***/ }), -/* 508 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122211,8 +121934,8 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(240); -var Common = __webpack_require__(19); +var Plugin = __webpack_require__(239); +var Common = __webpack_require__(20); (function() { @@ -122290,7 +122013,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 509 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122305,10 +122028,10 @@ var Query = {}; module.exports = Query; -var Vector = __webpack_require__(37); -var SAT = __webpack_require__(149); -var Bounds = __webpack_require__(38); -var Bodies = __webpack_require__(42); +var Vector = __webpack_require__(36); +var SAT = __webpack_require__(151); +var Bounds = __webpack_require__(37); +var Bodies = __webpack_require__(43); var Vertices = __webpack_require__(31); (function() { @@ -122432,7 +122155,7 @@ var Vertices = __webpack_require__(31); /***/ }), -/* 510 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122449,16 +122172,16 @@ var Engine = {}; module.exports = Engine; -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 World = __webpack_require__(240); +var Sleeping = __webpack_require__(92); +var Resolver = __webpack_require__(243); +var Pairs = __webpack_require__(242); +var Metrics = __webpack_require__(1350); +var Grid = __webpack_require__(241); +var Events = __webpack_require__(93); +var Composite = __webpack_require__(67); +var Constraint = __webpack_require__(79); +var Common = __webpack_require__(20); var Body = __webpack_require__(25); (function() { @@ -122925,7 +122648,7 @@ var Body = __webpack_require__(25); /***/ }), -/* 511 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122934,21 +122657,21 @@ var Body = __webpack_require__(25); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(42); +var Bodies = __webpack_require__(43); var Body = __webpack_require__(25); var Class = __webpack_require__(0); -var Common = __webpack_require__(19); -var Composite = __webpack_require__(68); -var Engine = __webpack_require__(510); +var Common = __webpack_require__(20); +var Composite = __webpack_require__(67); +var Engine = __webpack_require__(506); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(237); -var GetFastValue = __webpack_require__(1); +var Events = __webpack_require__(236); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(5); var MatterBody = __webpack_require__(25); -var MatterEvents = __webpack_require__(96); -var MatterTileBody = __webpack_require__(238); -var MatterWorld = __webpack_require__(241); -var Vector = __webpack_require__(37); +var MatterEvents = __webpack_require__(93); +var MatterTileBody = __webpack_require__(237); +var MatterWorld = __webpack_require__(240); +var Vector = __webpack_require__(36); /** * @classdesc @@ -125146,7 +124869,7 @@ module.exports = World; /***/ }), -/* 512 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125276,7 +124999,7 @@ module.exports = BasePlugin; /***/ }), -/* 513 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125321,7 +125044,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 514 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125330,7 +125053,7 @@ module.exports = ReplaceByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(115); +var IsInLayerBounds = __webpack_require__(113); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns @@ -125364,7 +125087,7 @@ module.exports = HasTileAt; /***/ }), -/* 515 */ +/* 511 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125373,9 +125096,9 @@ module.exports = HasTileAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tile = __webpack_require__(80); -var IsInLayerBounds = __webpack_require__(115); -var CalculateFacesAt = __webpack_require__(245); +var Tile = __webpack_require__(81); +var IsInLayerBounds = __webpack_require__(113); +var CalculateFacesAt = __webpack_require__(244); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -125427,7 +125150,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 516 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125436,11 +125159,11 @@ module.exports = RemoveTileAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(34); -var Parse2DArray = __webpack_require__(248); -var ParseCSV = __webpack_require__(517); -var ParseJSONTiled = __webpack_require__(518); -var ParseWeltmeister = __webpack_require__(529); +var Formats = __webpack_require__(35); +var Parse2DArray = __webpack_require__(247); +var ParseCSV = __webpack_require__(513); +var ParseJSONTiled = __webpack_require__(514); +var ParseWeltmeister = __webpack_require__(525); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -125497,7 +125220,7 @@ module.exports = Parse; /***/ }), -/* 517 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125506,8 +125229,8 @@ module.exports = Parse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(34); -var Parse2DArray = __webpack_require__(248); +var Formats = __webpack_require__(35); +var Parse2DArray = __webpack_require__(247); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -125545,7 +125268,7 @@ module.exports = ParseCSV; /***/ }), -/* 518 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125554,14 +125277,14 @@ module.exports = ParseCSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(34); -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); +var Formats = __webpack_require__(35); +var MapData = __webpack_require__(115); +var ParseTileLayers = __webpack_require__(515); +var ParseImageLayers = __webpack_require__(517); +var ParseTilesets = __webpack_require__(518); +var ParseObjectLayers = __webpack_require__(521); +var BuildTilesetIndex = __webpack_require__(523); +var AssignTileProperties = __webpack_require__(524); /** * Parses a Tiled JSON object into a new MapData object. @@ -125623,7 +125346,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 519 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125632,12 +125355,12 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(520); -var GetFastValue = __webpack_require__(1); -var LayerData = __webpack_require__(116); -var ParseGID = __webpack_require__(249); -var Tile = __webpack_require__(80); -var CreateGroupLayer = __webpack_require__(250); +var Base64Decode = __webpack_require__(516); +var GetFastValue = __webpack_require__(2); +var LayerData = __webpack_require__(114); +var ParseGID = __webpack_require__(248); +var Tile = __webpack_require__(81); +var CreateGroupLayer = __webpack_require__(249); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -125755,7 +125478,7 @@ var ParseTileLayers = function (json, insertNull) tileHeight: json.tileheight, alpha: (curGroupState.opacity * curl.opacity), visible: (curGroupState.visible && curl.visible), - properties: GetFastValue(curl, 'properties', {}) + properties: GetFastValue(curl, 'properties', []) }); for (var c = 0; c < curl.height; c++) @@ -125828,7 +125551,7 @@ var ParseTileLayers = function (json, insertNull) tileHeight: json.tileheight, alpha: (curGroupState.opacity * curl.opacity), visible: (curGroupState.visible && curl.visible), - properties: GetFastValue(curl, 'properties', {}) + properties: GetFastValue(curl, 'properties', []) }); var row = []; @@ -125881,7 +125604,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 520 */ +/* 516 */ /***/ (function(module, exports) { /** @@ -125924,7 +125647,7 @@ module.exports = Base64Decode; /***/ }), -/* 521 */ +/* 517 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -125933,8 +125656,8 @@ module.exports = Base64Decode; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetFastValue = __webpack_require__(1); -var CreateGroupLayer = __webpack_require__(250); +var GetFastValue = __webpack_require__(2); +var CreateGroupLayer = __webpack_require__(249); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -126012,7 +125735,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 522 */ +/* 518 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126021,9 +125744,9 @@ module.exports = ParseImageLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(154); -var ImageCollection = __webpack_require__(523); -var ParseObject = __webpack_require__(251); +var Tileset = __webpack_require__(116); +var ImageCollection = __webpack_require__(519); +var ParseObject = __webpack_require__(250); /** * Tilesets and Image Collections @@ -126031,9 +125754,9 @@ var ParseObject = __webpack_require__(251); * @function Phaser.Tilemaps.Parsers.Tiled.ParseTilesets * @since 3.0.0 * - * @param {object} json - [description] + * @param {object} json - The Tiled JSON data. * - * @return {object} [description] + * @return {object} An object containing the tileset and image collection data. */ var ParseTilesets = function (json) { @@ -126181,7 +125904,7 @@ module.exports = ParseTilesets; /***/ }), -/* 523 */ +/* 519 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126353,7 +126076,7 @@ module.exports = ImageCollection; /***/ }), -/* 524 */ +/* 520 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126362,7 +126085,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(91); +var HasValue = __webpack_require__(110); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -126397,7 +126120,7 @@ module.exports = Pick; /***/ }), -/* 525 */ +/* 521 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126406,10 +126129,10 @@ module.exports = Pick; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetFastValue = __webpack_require__(1); -var ParseObject = __webpack_require__(251); -var ObjectLayer = __webpack_require__(526); -var CreateGroupLayer = __webpack_require__(250); +var GetFastValue = __webpack_require__(2); +var ParseObject = __webpack_require__(250); +var ObjectLayer = __webpack_require__(522); +var CreateGroupLayer = __webpack_require__(249); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -126496,7 +126219,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 526 */ +/* 522 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126506,7 +126229,7 @@ module.exports = ParseObjectLayers; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -126618,8 +126341,8 @@ module.exports = ObjectLayer; /***/ }), -/* 527 */ -/***/ (function(module, exports) { +/* 523 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -126627,23 +126350,44 @@ module.exports = ObjectLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Tileset = __webpack_require__(116); + /** * Master list of tiles -> x, y, index in tileset. * * @function Phaser.Tilemaps.Parsers.Tiled.BuildTilesetIndex * @since 3.0.0 * - * @param {Phaser.Tilemaps.MapData} mapData - [description] + * @param {Phaser.Tilemaps.MapData} mapData - The Map Data object. * - * @return {array} [description] + * @return {array} An array of Tileset objects. */ var BuildTilesetIndex = function (mapData) { + var i; + var set; var tiles = []; - for (var i = 0; i < mapData.tilesets.length; i++) + for (i = 0; i < mapData.imageCollections.length; i++) { - var set = mapData.tilesets[i]; + var collection = mapData.imageCollections[i]; + var images = collection.images; + + for (var j = 0; j < images.length; j++) + { + var image = images[j]; + + set = new Tileset(image.image, image.gid, collection.imageWidth, collection.imageHeight, 0, 0); + + set.updateTileData(collection.imageWidth, collection.imageHeight); + + mapData.tilesets.push(set); + } + } + + for (i = 0; i < mapData.tilesets.length; i++) + { + set = mapData.tilesets[i]; var x = set.tileMargin; var y = set.tileMargin; @@ -126691,7 +126435,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 528 */ +/* 524 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126700,7 +126444,7 @@ module.exports = BuildTilesetIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * Copy properties from tileset to tiles. @@ -126708,7 +126452,7 @@ var Extend = __webpack_require__(17); * @function Phaser.Tilemaps.Parsers.Tiled.AssignTileProperties * @since 3.0.0 * - * @param {Phaser.Tilemaps.MapData} mapData - [description] + * @param {Phaser.Tilemaps.MapData} mapData - The Map Data object. */ var AssignTileProperties = function (mapData) { @@ -126764,7 +126508,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 529 */ +/* 525 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126773,10 +126517,10 @@ module.exports = AssignTileProperties; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(34); -var MapData = __webpack_require__(117); -var ParseTileLayers = __webpack_require__(530); -var ParseTilesets = __webpack_require__(531); +var Formats = __webpack_require__(35); +var MapData = __webpack_require__(115); +var ParseTileLayers = __webpack_require__(526); +var ParseTilesets = __webpack_require__(527); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -126793,7 +126537,7 @@ var ParseTilesets = __webpack_require__(531); * consumption. However if your map is small or you need to update the tiles dynamically, then leave * the default value set. * - * @return {?object} [description] + * @return {?Phaser.Tilemaps.MapData} The created MapData object, or `null` if the data can't be parsed. */ var ParseWeltmeister = function (name, json, insertNull) { @@ -126831,7 +126575,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 530 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126840,19 +126584,21 @@ module.exports = ParseWeltmeister; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LayerData = __webpack_require__(116); -var Tile = __webpack_require__(80); +var LayerData = __webpack_require__(114); +var Tile = __webpack_require__(81); /** - * [description] + * Parses all tilemap layers in an Impact JSON object into new LayerData objects. * * @function Phaser.Tilemaps.Parsers.Impact.ParseTileLayers * @since 3.0.0 * - * @param {object} json - [description] - * @param {boolean} insertNull - [description] + * @param {object} json - The Impact JSON object. + * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map + * data are handled (see {@link Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled}). * - * @return {array} [description] + * @return {Phaser.Tilemaps.LayerData[]} - An array of LayerData objects, one for each entry in + * json.layers with the type 'tilelayer'. */ var ParseTileLayers = function (json, insertNull) { @@ -126915,7 +126661,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 531 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126924,17 +126670,17 @@ module.exports = ParseTileLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(154); +var Tileset = __webpack_require__(116); /** - * [description] + * Tilesets and Image Collections * * @function Phaser.Tilemaps.Parsers.Impact.ParseTilesets * @since 3.0.0 * - * @param {object} json - [description] + * @param {object} json - The Impact JSON data. * - * @return {array} [description] + * @return {array} An array of Tilesets. */ var ParseTilesets = function (json) { @@ -126966,7 +126712,7 @@ module.exports = ParseTilesets; /***/ }), -/* 532 */ +/* 528 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126977,16 +126723,16 @@ module.exports = ParseTilesets; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(40); -var DynamicTilemapLayer = __webpack_require__(533); -var Extend = __webpack_require__(17); -var Formats = __webpack_require__(34); -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); +var DynamicTilemapLayer = __webpack_require__(529); +var Extend = __webpack_require__(18); +var Formats = __webpack_require__(35); +var LayerData = __webpack_require__(114); +var Rotate = __webpack_require__(348); +var SpliceOne = __webpack_require__(86); +var StaticTilemapLayer = __webpack_require__(530); +var Tile = __webpack_require__(81); +var TilemapComponents = __webpack_require__(152); +var Tileset = __webpack_require__(116); /** * @callback TilemapFilterCallback @@ -127642,9 +127388,10 @@ var Tilemap = new Class({ if (obj.height) { sprite.displayHeight = obj.height; } // Origin is (0, 1) in Tiled, so find the offset that matches the Sprite's origin. + // Do not offset objects with zero dimensions (e.g. points). var offset = { - x: sprite.originX * sprite.displayWidth, - y: (sprite.originY - 1) * sprite.displayHeight + x: sprite.originX * obj.width, + y: (sprite.originY - 1) * obj.height }; // If the object is rotated, then the origin offset also needs to be rotated. @@ -128855,7 +128602,6 @@ var Tilemap = new Class({ * * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon. * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing. - * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used. * * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid. */ @@ -129523,7 +129269,7 @@ module.exports = Tilemap; /***/ }), -/* 533 */ +/* 529 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129534,9 +129280,9 @@ module.exports = Tilemap; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1421); -var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(150); +var DynamicTilemapLayerRender = __webpack_require__(1401); +var GameObject = __webpack_require__(13); +var TilemapComponents = __webpack_require__(152); /** * @classdesc @@ -130844,7 +130590,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 534 */ +/* 530 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130856,10 +130602,10 @@ module.exports = DynamicTilemapLayer; var Class = __webpack_require__(0); var Components = __webpack_require__(12); var GameEvents = __webpack_require__(21); -var GameObject = __webpack_require__(14); -var StaticTilemapLayerRender = __webpack_require__(1424); -var TilemapComponents = __webpack_require__(150); -var TransformMatrix = __webpack_require__(35); +var GameObject = __webpack_require__(13); +var StaticTilemapLayerRender = __webpack_require__(1404); +var TilemapComponents = __webpack_require__(152); +var TransformMatrix = __webpack_require__(32); var Utils = __webpack_require__(10); /** @@ -132338,7 +132084,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 535 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132348,7 +132094,7 @@ module.exports = StaticTilemapLayer; */ var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @classdesc @@ -132651,7 +132397,7 @@ module.exports = TimerEvent; /***/ }), -/* 536 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132660,7 +132406,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1433); +var RESERVED = __webpack_require__(1413); /** * Internal function used by the Tween Builder to return an array of properties @@ -132712,7 +132458,7 @@ module.exports = GetProps; /***/ }), -/* 537 */ +/* 533 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132760,7 +132506,7 @@ module.exports = GetTweens; /***/ }), -/* 538 */ +/* 534 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132769,15 +132515,15 @@ module.exports = GetTweens; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(255); +var Defaults = __webpack_require__(254); var GetAdvancedValue = __webpack_require__(15); -var GetBoolean = __webpack_require__(99); -var GetEaseFunction = __webpack_require__(90); -var GetNewValue = __webpack_require__(155); +var GetBoolean = __webpack_require__(97); +var GetEaseFunction = __webpack_require__(75); +var GetNewValue = __webpack_require__(156); var GetValue = __webpack_require__(5); -var GetValueOp = __webpack_require__(254); -var Tween = __webpack_require__(256); -var TweenData = __webpack_require__(258); +var GetValueOp = __webpack_require__(253); +var Tween = __webpack_require__(255); +var TweenData = __webpack_require__(257); /** * Creates a new Number Tween. @@ -132890,7 +132636,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 539 */ +/* 535 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132899,9 +132645,9 @@ module.exports = NumberTweenBuilder; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetEaseFunction = __webpack_require__(90); +var GetEaseFunction = __webpack_require__(75); var GetValue = __webpack_require__(5); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(14); /** * Creates a Stagger function to be used by a Tween property. @@ -133136,7 +132882,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 540 */ +/* 536 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133145,17 +132891,17 @@ module.exports = StaggerBuilder; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(73); -var Defaults = __webpack_require__(255); +var Clone = __webpack_require__(72); +var Defaults = __webpack_require__(254); 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 GetBoolean = __webpack_require__(97); +var GetEaseFunction = __webpack_require__(75); +var GetNewValue = __webpack_require__(156); +var GetTargets = __webpack_require__(252); +var GetTweens = __webpack_require__(533); var GetValue = __webpack_require__(5); -var Timeline = __webpack_require__(541); -var TweenBuilder = __webpack_require__(156); +var Timeline = __webpack_require__(537); +var TweenBuilder = __webpack_require__(157); /** * Builds a Timeline of Tweens based on a configuration object. @@ -133288,7 +133034,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 541 */ +/* 537 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133299,9 +133045,9 @@ module.exports = TimelineBuilder; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(257); -var TweenBuilder = __webpack_require__(156); -var TWEEN_CONST = __webpack_require__(100); +var Events = __webpack_require__(256); +var TweenBuilder = __webpack_require__(157); +var TWEEN_CONST = __webpack_require__(98); /** * @classdesc @@ -134193,7 +133939,7 @@ module.exports = Timeline; /***/ }), -/* 542 */ +/* 538 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -134202,10 +133948,10 @@ module.exports = Timeline; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(544); +__webpack_require__(540); -var CONST = __webpack_require__(32); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(38); +var Extend = __webpack_require__(18); /** * @namespace Phaser @@ -134213,38 +133959,38 @@ var Extend = __webpack_require__(17); var Phaser = { - Actions: __webpack_require__(259), - Animations: __webpack_require__(664), - BlendModes: __webpack_require__(43), - Cache: __webpack_require__(665), - Cameras: __webpack_require__(668), - Core: __webpack_require__(751), + Actions: __webpack_require__(258), + Animations: __webpack_require__(660), + BlendModes: __webpack_require__(44), + Cache: __webpack_require__(661), + Cameras: __webpack_require__(664), + Core: __webpack_require__(750), Class: __webpack_require__(0), - 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), + Create: __webpack_require__(811), + Curves: __webpack_require__(817), + Data: __webpack_require__(820), + Display: __webpack_require__(822), + DOM: __webpack_require__(839), + Events: __webpack_require__(840), + Game: __webpack_require__(842), + GameObjects: __webpack_require__(940), + Geom: __webpack_require__(456), + Input: __webpack_require__(1227), + Loader: __webpack_require__(1261), 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) + Physics: __webpack_require__(1287), + Plugins: __webpack_require__(1355), + Renderer: __webpack_require__(1357), + Scale: __webpack_require__(1362), + ScaleModes: __webpack_require__(158), + Scene: __webpack_require__(399), + Scenes: __webpack_require__(1363), + Structs: __webpack_require__(1365), + Textures: __webpack_require__(1366), + Tilemaps: __webpack_require__(1368), + Time: __webpack_require__(1409), + Tweens: __webpack_require__(1411), + Utils: __webpack_require__(1428) }; @@ -134252,7 +133998,7 @@ var Phaser = { if (true) { - Phaser.Sound = __webpack_require__(1458); + Phaser.Sound = __webpack_require__(1438); } if (false) @@ -134260,7 +134006,7 @@ if (false) if (true) { - Phaser.FacebookInstantGamesPlugin = __webpack_require__(412); + Phaser.FacebookInstantGamesPlugin = __webpack_require__(415); } // Merge in the consts @@ -134286,10 +134032,10 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(543))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(539))) /***/ }), -/* 543 */ +/* 539 */ /***/ (function(module, exports) { var g; @@ -134315,21 +134061,21 @@ module.exports = g; /***/ }), -/* 544 */ +/* 540 */ /***/ (function(module, exports, __webpack_require__) { +__webpack_require__(541); +__webpack_require__(542); +__webpack_require__(543); +__webpack_require__(544); __webpack_require__(545); __webpack_require__(546); __webpack_require__(547); __webpack_require__(548); -__webpack_require__(549); -__webpack_require__(550); -__webpack_require__(551); -__webpack_require__(552); /***/ }), -/* 545 */ +/* 541 */ /***/ (function(module, exports) { /** @@ -134369,7 +134115,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 546 */ +/* 542 */ /***/ (function(module, exports) { /** @@ -134385,7 +134131,7 @@ if (!Array.isArray) /***/ }), -/* 547 */ +/* 543 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -134572,7 +134318,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 548 */ +/* 544 */ /***/ (function(module, exports) { /** @@ -134587,7 +134333,7 @@ if (!window.console) /***/ }), -/* 549 */ +/* 545 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -134599,7 +134345,7 @@ if (!Math.trunc) { /***/ }), -/* 550 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -134636,7 +134382,7 @@ if (!Math.trunc) { /***/ }), -/* 551 */ +/* 547 */ /***/ (function(module, exports) { // References: @@ -134693,7 +134439,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 552 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -134746,7 +134492,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 553 */ +/* 549 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134755,7 +134501,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var QuickSet = __webpack_require__(260); +var QuickSet = __webpack_require__(259); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. @@ -134794,7 +134540,7 @@ module.exports = AlignTo; /***/ }), -/* 554 */ +/* 550 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134835,7 +134581,7 @@ module.exports = Angle; /***/ }), -/* 555 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -134874,7 +134620,7 @@ module.exports = Call; /***/ }), -/* 556 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -134932,7 +134678,7 @@ module.exports = GetFirst; /***/ }), -/* 557 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -134990,7 +134736,7 @@ module.exports = GetLast; /***/ }), -/* 558 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134999,11 +134745,11 @@ module.exports = GetLast; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(273); -var CONST = __webpack_require__(97); -var GetFastValue = __webpack_require__(1); -var NOOP = __webpack_require__(2); -var Zone = __webpack_require__(118); +var AlignIn = __webpack_require__(272); +var CONST = __webpack_require__(94); +var GetFastValue = __webpack_require__(2); +var NOOP = __webpack_require__(1); +var Zone = __webpack_require__(117); var tempZone = new Zone({ sys: { queueDepthSort: NOOP, events: { once: NOOP } } }, 0, 0, 1, 1); @@ -135089,7 +134835,7 @@ module.exports = GridAlign; /***/ }), -/* 559 */ +/* 555 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135098,7 +134844,7 @@ module.exports = GridAlign; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 @@ -135384,7 +135130,7 @@ module.exports = Alpha; /***/ }), -/* 560 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -135411,7 +135157,7 @@ module.exports = 'add'; /***/ }), -/* 561 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -135439,7 +135185,7 @@ module.exports = 'complete'; /***/ }), -/* 562 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -135466,7 +135212,7 @@ module.exports = 'repeat'; /***/ }), -/* 563 */ +/* 559 */ /***/ (function(module, exports) { /** @@ -135494,7 +135240,7 @@ module.exports = 'restart'; /***/ }), -/* 564 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -135522,7 +135268,7 @@ module.exports = 'start'; /***/ }), -/* 565 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -135546,7 +135292,7 @@ module.exports = 'pauseall'; /***/ }), -/* 566 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -135570,7 +135316,7 @@ module.exports = 'remove'; /***/ }), -/* 567 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -135593,7 +135339,7 @@ module.exports = 'resumeall'; /***/ }), -/* 568 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -135622,7 +135368,7 @@ module.exports = 'animationcomplete'; /***/ }), -/* 569 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -135650,7 +135396,7 @@ module.exports = 'animationcomplete-'; /***/ }), -/* 570 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -135679,7 +135425,7 @@ module.exports = 'animationrepeat-'; /***/ }), -/* 571 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -135707,7 +135453,7 @@ module.exports = 'animationrestart-'; /***/ }), -/* 572 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -135735,7 +135481,7 @@ module.exports = 'animationstart-'; /***/ }), -/* 573 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -135764,7 +135510,7 @@ module.exports = 'animationupdate-'; /***/ }), -/* 574 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -135794,7 +135540,7 @@ module.exports = 'animationrepeat'; /***/ }), -/* 575 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -135823,7 +135569,7 @@ module.exports = 'animationrestart'; /***/ }), -/* 576 */ +/* 572 */ /***/ (function(module, exports) { /** @@ -135852,7 +135598,7 @@ module.exports = 'animationstart'; /***/ }), -/* 577 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -135882,7 +135628,7 @@ module.exports = 'animationupdate'; /***/ }), -/* 578 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -136031,7 +135777,7 @@ module.exports = ComputedSize; /***/ }), -/* 579 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -136156,7 +135902,7 @@ module.exports = Crop; /***/ }), -/* 580 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -136320,7 +136066,7 @@ module.exports = Flip; /***/ }), -/* 581 */ +/* 577 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136330,7 +136076,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(11); -var RotateAround = __webpack_require__(295); +var RotateAround = __webpack_require__(294); var Vector2 = __webpack_require__(3); /** @@ -136679,7 +136425,7 @@ module.exports = GetBounds; /***/ }), -/* 582 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -136702,7 +136448,7 @@ module.exports = 'blur'; /***/ }), -/* 583 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -136724,7 +136470,7 @@ module.exports = 'boot'; /***/ }), -/* 584 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -136747,7 +136493,7 @@ module.exports = 'contextlost'; /***/ }), -/* 585 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -136770,7 +136516,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 586 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -136793,7 +136539,7 @@ module.exports = 'destroy'; /***/ }), -/* 587 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -136815,7 +136561,7 @@ module.exports = 'focus'; /***/ }), -/* 588 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -136841,7 +136587,7 @@ module.exports = 'hidden'; /***/ }), -/* 589 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -136862,7 +136608,7 @@ module.exports = 'pause'; /***/ }), -/* 590 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -136888,7 +136634,7 @@ module.exports = 'postrender'; /***/ }), -/* 591 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -136913,7 +136659,7 @@ module.exports = 'poststep'; /***/ }), -/* 592 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -136938,7 +136684,7 @@ module.exports = 'prerender'; /***/ }), -/* 593 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -136963,7 +136709,7 @@ module.exports = 'prestep'; /***/ }), -/* 594 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -136985,7 +136731,7 @@ module.exports = 'ready'; /***/ }), -/* 595 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -137006,7 +136752,7 @@ module.exports = 'resume'; /***/ }), -/* 596 */ +/* 592 */ /***/ (function(module, exports) { /** @@ -137031,7 +136777,7 @@ module.exports = 'step'; /***/ }), -/* 597 */ +/* 593 */ /***/ (function(module, exports) { /** @@ -137055,7 +136801,7 @@ module.exports = 'visible'; /***/ }), -/* 598 */ +/* 594 */ /***/ (function(module, exports) { /** @@ -137258,7 +137004,7 @@ module.exports = Origin; /***/ }), -/* 599 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137268,9 +137014,9 @@ module.exports = Origin; */ var DegToRad = __webpack_require__(40); -var GetBoolean = __webpack_require__(99); +var GetBoolean = __webpack_require__(97); var GetValue = __webpack_require__(5); -var TWEEN_CONST = __webpack_require__(100); +var TWEEN_CONST = __webpack_require__(98); var Vector2 = __webpack_require__(3); /** @@ -137333,6 +137079,15 @@ var PathFollower = { */ pathVector: null, + /** + * The distance the follower has traveled from the previous point to the current one, at the last update. + * + * @name Phaser.GameObjects.PathFollower#pathDelta + * @type {Phaser.Math.Vector2} + * @since 3.23.0 + */ + pathDelta: null, + /** * The Tween used for following the Path. * @@ -137373,7 +137128,7 @@ var PathFollower = { * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time. * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ setPath: function (path, config) { @@ -137405,7 +137160,7 @@ var PathFollower = { * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path. * @param {number} [offset=0] - Rotation offset in degrees. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ setRotateToPath: function (value, offset) { @@ -137444,7 +137199,7 @@ var PathFollower = { * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object. * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ startFollow: function (config, startAt) { @@ -137498,6 +137253,13 @@ var PathFollower = { this.pathVector = new Vector2(); } + if (!this.pathDelta) + { + this.pathDelta = new Vector2(); + } + + this.pathDelta.reset(); + this.pathTween = this.scene.sys.tweens.addCounter(config); // The starting point of the path, relative to this follower @@ -137534,7 +137296,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#pauseFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ pauseFollow: function () { @@ -137556,7 +137318,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#resumeFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ resumeFollow: function () { @@ -137578,7 +137340,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#stopFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ stopFollow: function () { @@ -137607,14 +137369,18 @@ var PathFollower = { if (tween) { var tweenData = tween.data[0]; + var pathDelta = this.pathDelta; var pathVector = this.pathVector; - if (tweenData.state !== TWEEN_CONST.COMPLETE) + pathDelta.copy(pathVector).negate(); + + if (tweenData.state === TWEEN_CONST.COMPLETE) { this.path.getPoint(1, pathVector); + pathDelta.add(pathVector); pathVector.add(this.pathOffset); - + this.setPosition(pathVector.x, pathVector.y); return; @@ -137627,6 +137393,7 @@ var PathFollower = { this.path.getPoint(tween.getValue(), pathVector); + pathDelta.add(pathVector); pathVector.add(this.pathOffset); var oldX = this.x; @@ -137664,7 +137431,7 @@ module.exports = PathFollower; /***/ }), -/* 600 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -137851,7 +137618,7 @@ module.exports = Size; /***/ }), -/* 601 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -137981,7 +137748,7 @@ module.exports = Texture; /***/ }), -/* 602 */ +/* 598 */ /***/ (function(module, exports) { /** @@ -138189,7 +137956,7 @@ module.exports = TextureCrop; /***/ }), -/* 603 */ +/* 599 */ /***/ (function(module, exports) { /** @@ -138529,7 +138296,7 @@ module.exports = Tint; /***/ }), -/* 604 */ +/* 600 */ /***/ (function(module, exports) { /** @@ -138561,7 +138328,7 @@ module.exports = 'changedata'; /***/ }), -/* 605 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -138591,7 +138358,7 @@ module.exports = 'changedata-'; /***/ }), -/* 606 */ +/* 602 */ /***/ (function(module, exports) { /** @@ -138619,7 +138386,7 @@ module.exports = 'removedata'; /***/ }), -/* 607 */ +/* 603 */ /***/ (function(module, exports) { /** @@ -138647,7 +138414,7 @@ module.exports = 'setdata'; /***/ }), -/* 608 */ +/* 604 */ /***/ (function(module, exports) { /** @@ -138672,7 +138439,7 @@ module.exports = 'destroy'; /***/ }), -/* 609 */ +/* 605 */ /***/ (function(module, exports) { /** @@ -138704,7 +138471,7 @@ module.exports = 'complete'; /***/ }), -/* 610 */ +/* 606 */ /***/ (function(module, exports) { /** @@ -138733,7 +138500,7 @@ module.exports = 'created'; /***/ }), -/* 611 */ +/* 607 */ /***/ (function(module, exports) { /** @@ -138759,7 +138526,7 @@ module.exports = 'error'; /***/ }), -/* 612 */ +/* 608 */ /***/ (function(module, exports) { /** @@ -138791,7 +138558,7 @@ module.exports = 'loop'; /***/ }), -/* 613 */ +/* 609 */ /***/ (function(module, exports) { /** @@ -138819,7 +138586,7 @@ module.exports = 'play'; /***/ }), -/* 614 */ +/* 610 */ /***/ (function(module, exports) { /** @@ -138844,7 +138611,7 @@ module.exports = 'seeked'; /***/ }), -/* 615 */ +/* 611 */ /***/ (function(module, exports) { /** @@ -138870,7 +138637,7 @@ module.exports = 'seeking'; /***/ }), -/* 616 */ +/* 612 */ /***/ (function(module, exports) { /** @@ -138896,7 +138663,7 @@ module.exports = 'stop'; /***/ }), -/* 617 */ +/* 613 */ /***/ (function(module, exports) { /** @@ -138922,7 +138689,7 @@ module.exports = 'timeout'; /***/ }), -/* 618 */ +/* 614 */ /***/ (function(module, exports) { /** @@ -138948,7 +138715,7 @@ module.exports = 'unlocked'; /***/ }), -/* 619 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138989,7 +138756,7 @@ module.exports = IncAlpha; /***/ }), -/* 620 */ +/* 616 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139030,7 +138797,7 @@ module.exports = IncX; /***/ }), -/* 621 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139077,7 +138844,7 @@ module.exports = IncXY; /***/ }), -/* 622 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139118,7 +138885,7 @@ module.exports = IncY; /***/ }), -/* 623 */ +/* 619 */ /***/ (function(module, exports) { /** @@ -139167,7 +138934,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 624 */ +/* 620 */ /***/ (function(module, exports) { /** @@ -139219,7 +138986,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 625 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139228,7 +138995,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(162); +var GetPoints = __webpack_require__(163); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -139263,7 +139030,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 626 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139272,9 +139039,9 @@ module.exports = PlaceOnLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(304); -var RotateLeft = __webpack_require__(305); -var RotateRight = __webpack_require__(306); +var MarchingAnts = __webpack_require__(303); +var RotateLeft = __webpack_require__(304); +var RotateRight = __webpack_require__(305); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -139321,7 +139088,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 627 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139330,7 +139097,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(307); +var BresenhamPoints = __webpack_require__(306); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -139382,7 +139149,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 628 */ +/* 624 */ /***/ (function(module, exports) { /** @@ -139419,7 +139186,7 @@ module.exports = PlayAnimation; /***/ }), -/* 629 */ +/* 625 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139428,7 +139195,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(159); +var Random = __webpack_require__(160); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -139459,7 +139226,7 @@ module.exports = RandomCircle; /***/ }), -/* 630 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139468,7 +139235,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(167); +var Random = __webpack_require__(168); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -139499,7 +139266,7 @@ module.exports = RandomEllipse; /***/ }), -/* 631 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139508,7 +139275,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(163); +var Random = __webpack_require__(164); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -139539,7 +139306,7 @@ module.exports = RandomLine; /***/ }), -/* 632 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139548,7 +139315,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(164); +var Random = __webpack_require__(165); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -139577,7 +139344,7 @@ module.exports = RandomRectangle; /***/ }), -/* 633 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139586,7 +139353,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(168); +var Random = __webpack_require__(169); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -139617,7 +139384,7 @@ module.exports = RandomTriangle; /***/ }), -/* 634 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139658,7 +139425,7 @@ module.exports = Rotate; /***/ }), -/* 635 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139667,8 +139434,8 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(169); -var DistanceBetween = __webpack_require__(54); +var RotateAroundDistance = __webpack_require__(170); +var DistanceBetween = __webpack_require__(55); /** * Rotates each item around the given point by the given angle. @@ -139704,7 +139471,7 @@ module.exports = RotateAround; /***/ }), -/* 636 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139713,7 +139480,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(169); +var MathRotateAroundDistance = __webpack_require__(170); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -139753,7 +139520,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 637 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139794,7 +139561,7 @@ module.exports = ScaleX; /***/ }), -/* 638 */ +/* 634 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139841,7 +139608,7 @@ module.exports = ScaleXY; /***/ }), -/* 639 */ +/* 635 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139882,7 +139649,7 @@ module.exports = ScaleY; /***/ }), -/* 640 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139923,7 +139690,7 @@ module.exports = SetAlpha; /***/ }), -/* 641 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139963,7 +139730,7 @@ module.exports = SetBlendMode; /***/ }), -/* 642 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140004,7 +139771,7 @@ module.exports = SetDepth; /***/ }), -/* 643 */ +/* 639 */ /***/ (function(module, exports) { /** @@ -140043,7 +139810,7 @@ module.exports = SetHitArea; /***/ }), -/* 644 */ +/* 640 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140090,7 +139857,7 @@ module.exports = SetOrigin; /***/ }), -/* 645 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140131,7 +139898,7 @@ module.exports = SetRotation; /***/ }), -/* 646 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140178,7 +139945,7 @@ module.exports = SetScale; /***/ }), -/* 647 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140219,7 +139986,7 @@ module.exports = SetScaleX; /***/ }), -/* 648 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140260,7 +140027,7 @@ module.exports = SetScaleY; /***/ }), -/* 649 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140307,7 +140074,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 650 */ +/* 646 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140348,7 +140115,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 651 */ +/* 647 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140389,7 +140156,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 652 */ +/* 648 */ /***/ (function(module, exports) { /** @@ -140428,7 +140195,7 @@ module.exports = SetTint; /***/ }), -/* 653 */ +/* 649 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140466,7 +140233,7 @@ module.exports = SetVisible; /***/ }), -/* 654 */ +/* 650 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140507,7 +140274,7 @@ module.exports = SetX; /***/ }), -/* 655 */ +/* 651 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140554,7 +140321,7 @@ module.exports = SetXY; /***/ }), -/* 656 */ +/* 652 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140595,7 +140362,7 @@ module.exports = SetY; /***/ }), -/* 657 */ +/* 653 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140725,7 +140492,7 @@ module.exports = ShiftPosition; /***/ }), -/* 658 */ +/* 654 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140734,7 +140501,7 @@ module.exports = ShiftPosition; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayShuffle = __webpack_require__(122); +var ArrayShuffle = __webpack_require__(121); /** * Shuffles the array in place. The shuffled array is both modified and returned. @@ -140758,7 +140525,7 @@ module.exports = Shuffle; /***/ }), -/* 659 */ +/* 655 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140767,7 +140534,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(170); +var MathSmootherStep = __webpack_require__(171); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -140816,7 +140583,7 @@ module.exports = SmootherStep; /***/ }), -/* 660 */ +/* 656 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -140825,7 +140592,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(171); +var MathSmoothStep = __webpack_require__(172); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -140874,7 +140641,7 @@ module.exports = SmoothStep; /***/ }), -/* 661 */ +/* 657 */ /***/ (function(module, exports) { /** @@ -140937,7 +140704,7 @@ module.exports = Spread; /***/ }), -/* 662 */ +/* 658 */ /***/ (function(module, exports) { /** @@ -140973,7 +140740,7 @@ module.exports = ToggleVisible; /***/ }), -/* 663 */ +/* 659 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141022,7 +140789,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 664 */ +/* 660 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141037,16 +140804,16 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(160), - AnimationFrame: __webpack_require__(290), - AnimationManager: __webpack_require__(308), - Events: __webpack_require__(119) + Animation: __webpack_require__(161), + AnimationFrame: __webpack_require__(289), + AnimationManager: __webpack_require__(307), + Events: __webpack_require__(118) }; /***/ }), -/* 665 */ +/* 661 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141061,15 +140828,15 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(309), - CacheManager: __webpack_require__(311), - Events: __webpack_require__(310) + BaseCache: __webpack_require__(308), + CacheManager: __webpack_require__(310), + Events: __webpack_require__(309) }; /***/ }), -/* 666 */ +/* 662 */ /***/ (function(module, exports) { /** @@ -141094,7 +140861,7 @@ module.exports = 'add'; /***/ }), -/* 667 */ +/* 663 */ /***/ (function(module, exports) { /** @@ -141119,7 +140886,7 @@ module.exports = 'remove'; /***/ }), -/* 668 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141138,14 +140905,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(669), - Scene2D: __webpack_require__(672) + Controls: __webpack_require__(665), + Scene2D: __webpack_require__(668) }; /***/ }), -/* 669 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141160,14 +140927,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(670), - SmoothedKeyControl: __webpack_require__(671) + FixedKeyControl: __webpack_require__(666), + SmoothedKeyControl: __webpack_require__(667) }; /***/ }), -/* 670 */ +/* 666 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141351,7 +141118,7 @@ var FixedKeyControl = new Class({ * @method Phaser.Cameras.Controls.FixedKeyControl#start * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ start: function () { @@ -141366,7 +141133,7 @@ var FixedKeyControl = new Class({ * @method Phaser.Cameras.Controls.FixedKeyControl#stop * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ stop: function () { @@ -141383,7 +141150,7 @@ var FixedKeyControl = new Class({ * * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to. * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ setCamera: function (camera) { @@ -141473,7 +141240,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 671 */ +/* 667 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141751,7 +141518,7 @@ var SmoothedKeyControl = new Class({ * @method Phaser.Cameras.Controls.SmoothedKeyControl#start * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ start: function () { @@ -141766,7 +141533,7 @@ var SmoothedKeyControl = new Class({ * @method Phaser.Cameras.Controls.SmoothedKeyControl#stop * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ stop: function () { @@ -141783,7 +141550,7 @@ var SmoothedKeyControl = new Class({ * * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to. * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ setCamera: function (camera) { @@ -141956,7 +141723,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 672 */ +/* 668 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141971,17 +141738,17 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(312), - BaseCamera: __webpack_require__(103), - CameraManager: __webpack_require__(725), - Effects: __webpack_require__(320), - Events: __webpack_require__(55) + Camera: __webpack_require__(311), + BaseCamera: __webpack_require__(101), + CameraManager: __webpack_require__(724), + Effects: __webpack_require__(319), + Events: __webpack_require__(41) }; /***/ }), -/* 673 */ +/* 669 */ /***/ (function(module, exports) { /** @@ -142004,7 +141771,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 674 */ +/* 670 */ /***/ (function(module, exports) { /** @@ -142030,7 +141797,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 675 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -142060,7 +141827,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 676 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -142086,7 +141853,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 677 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -142116,7 +141883,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 678 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -142140,7 +141907,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 679 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -142168,7 +141935,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 680 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -142192,7 +141959,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 681 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -142219,7 +141986,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 682 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -142245,7 +142012,7 @@ module.exports = 'postrender'; /***/ }), -/* 683 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -142271,7 +142038,57 @@ module.exports = 'prerender'; /***/ }), -/* 684 */ +/* 680 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Camera Rotate Complete Event. + * + * This event is dispatched by a Camera instance when the Rotate Effect completes. + * + * @event Phaser.Cameras.Scene2D.Events#ROTATE_COMPLETE + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on. + * @param {Phaser.Cameras.Scene2D.Effects.RotateTo} effect - A reference to the effect instance. + */ +module.exports = 'camerarotatecomplete'; + + +/***/ }), +/* 681 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Camera Rotate Start Event. + * + * This event is dispatched by a Camera instance when the Rotate Effect starts. + * + * @event Phaser.Cameras.Scene2D.Events#ROTATE_START + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on. + * @param {Phaser.Cameras.Scene2D.Effects.RotateTo} effect - A reference to the effect instance. + * @param {integer} duration - The duration of the effect. + * @param {number} destination - The destination value. + */ +module.exports = 'camerarotatestart'; + + +/***/ }), +/* 682 */ /***/ (function(module, exports) { /** @@ -142295,7 +142112,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 685 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -142321,7 +142138,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 686 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -142345,7 +142162,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 687 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -142371,7 +142188,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 688 */ +/* 686 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142380,9 +142197,9 @@ module.exports = 'camerazoomstart'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(55); +var Events = __webpack_require__(41); /** * @classdesc @@ -142759,7 +142576,7 @@ module.exports = Fade; /***/ }), -/* 689 */ +/* 687 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142768,9 +142585,9 @@ module.exports = Fade; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(55); +var Events = __webpack_require__(41); /** * @classdesc @@ -143110,7 +142927,7 @@ module.exports = Flash; /***/ }), -/* 690 */ +/* 688 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143119,10 +142936,10 @@ module.exports = Flash; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(179); -var Events = __webpack_require__(55); +var EaseMap = __webpack_require__(122); +var Events = __webpack_require__(41); var Vector2 = __webpack_require__(3); /** @@ -143435,7 +143252,7 @@ module.exports = Pan; /***/ }), -/* 691 */ +/* 689 */ /***/ (function(module, exports) { /** @@ -143466,7 +143283,7 @@ module.exports = In; /***/ }), -/* 692 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -143497,7 +143314,7 @@ module.exports = Out; /***/ }), -/* 693 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -143537,7 +143354,7 @@ module.exports = InOut; /***/ }), -/* 694 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -143582,7 +143399,7 @@ module.exports = In; /***/ }), -/* 695 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -143625,7 +143442,7 @@ module.exports = Out; /***/ }), -/* 696 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -143689,7 +143506,7 @@ module.exports = InOut; /***/ }), -/* 697 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -143717,7 +143534,7 @@ module.exports = In; /***/ }), -/* 698 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -143745,7 +143562,7 @@ module.exports = Out; /***/ }), -/* 699 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -143780,7 +143597,7 @@ module.exports = InOut; /***/ }), -/* 700 */ +/* 698 */ /***/ (function(module, exports) { /** @@ -143808,7 +143625,7 @@ module.exports = In; /***/ }), -/* 701 */ +/* 699 */ /***/ (function(module, exports) { /** @@ -143836,7 +143653,7 @@ module.exports = Out; /***/ }), -/* 702 */ +/* 700 */ /***/ (function(module, exports) { /** @@ -143871,7 +143688,7 @@ module.exports = InOut; /***/ }), -/* 703 */ +/* 701 */ /***/ (function(module, exports) { /** @@ -143926,7 +143743,7 @@ module.exports = In; /***/ }), -/* 704 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -143981,7 +143798,7 @@ module.exports = Out; /***/ }), -/* 705 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -144043,7 +143860,7 @@ module.exports = InOut; /***/ }), -/* 706 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -144071,7 +143888,7 @@ module.exports = In; /***/ }), -/* 707 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -144099,7 +143916,7 @@ module.exports = Out; /***/ }), -/* 708 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -144134,7 +143951,7 @@ module.exports = InOut; /***/ }), -/* 709 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -144146,7 +143963,7 @@ module.exports = InOut; /** * Linear easing (no variation). * - * @function Phaser.Math.Easing.Linear.Linear + * @function Phaser.Math.Easing.Linear * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -144162,7 +143979,7 @@ module.exports = Linear; /***/ }), -/* 710 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -144190,7 +144007,7 @@ module.exports = In; /***/ }), -/* 711 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -144218,7 +144035,7 @@ module.exports = Out; /***/ }), -/* 712 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -144253,7 +144070,7 @@ module.exports = InOut; /***/ }), -/* 713 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -144281,7 +144098,7 @@ module.exports = In; /***/ }), -/* 714 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -144309,7 +144126,7 @@ module.exports = Out; /***/ }), -/* 715 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -144344,7 +144161,7 @@ module.exports = InOut; /***/ }), -/* 716 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -144372,7 +144189,7 @@ module.exports = In; /***/ }), -/* 717 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -144400,7 +144217,7 @@ module.exports = Out; /***/ }), -/* 718 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -144435,7 +144252,7 @@ module.exports = InOut; /***/ }), -/* 719 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -144474,7 +144291,7 @@ module.exports = In; /***/ }), -/* 720 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -144513,7 +144330,7 @@ module.exports = Out; /***/ }), -/* 721 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -144552,7 +144369,7 @@ module.exports = InOut; /***/ }), -/* 722 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -144564,7 +144381,7 @@ module.exports = InOut; /** * Stepped easing. * - * @function Phaser.Math.Easing.Stepped.Stepped + * @function Phaser.Math.Easing.Stepped * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -144594,7 +144411,7 @@ module.exports = Stepped; /***/ }), -/* 723 */ +/* 721 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144603,9 +144420,9 @@ module.exports = Stepped; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(55); +var Events = __webpack_require__(41); var Vector2 = __webpack_require__(3); /** @@ -144913,7 +144730,440 @@ module.exports = Shake; /***/ }), -/* 724 */ +/* 722 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Jason Nicholls + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(19); +var Class = __webpack_require__(0); +var Events = __webpack_require__(41); +var EaseMap = __webpack_require__(122); + +/** + * @classdesc + * A Camera Rotate effect. + * + * This effect will rotate the Camera so that the its viewport finishes at the given angle in radians, + * over the duration and with the ease specified. + * + * Camera rotation always takes place based on the Camera viewport. By default, rotation happens + * in the center of the viewport. You can adjust this with the `originX` and `originY` properties. + * + * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not + * rotate the Camera viewport itself, which always remains an axis-aligned rectangle. + * + * Only the camera is rotates. None of the objects it is displaying are impacted, i.e. their positions do + * not change. + * + * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback, + * which is invoked each frame for the duration of the effect if required. + * + * @class RotateTo + * @memberof Phaser.Cameras.Scene2D.Effects + * @constructor + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon. + */ +var RotateTo = new Class({ + + initialize: + + function RotateTo (camera) + { + /** + * The Camera this effect belongs to. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#camera + * @type {Phaser.Cameras.Scene2D.Camera} + * @readonly + * @since 3.23.0 + */ + this.camera = camera; + + /** + * Is this effect actively running? + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#isRunning + * @type {boolean} + * @readonly + * @default false + * @since 3.23.0 + */ + this.isRunning = false; + + /** + * The duration of the effect, in milliseconds. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#duration + * @type {integer} + * @readonly + * @default 0 + * @since 3.23.0 + */ + this.duration = 0; + + /** + * The starting angle to rotate the camera from. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#source + * @type {number} + * @since 3.23.0 + */ + this.source = 0; + + /** + * The constantly updated value based on the force. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#current + * @type {number} + * @since 3.23.0 + */ + this.current = 0; + + /** + * The destination angle in radians to rotate the camera to. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#destination + * @type {number} + * @since 3.23.0 + */ + this.destination = 0; + + /** + * The ease function to use during the Rotate. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#ease + * @type {function} + * @since 3.23.0 + */ + this.ease; + + /** + * If this effect is running this holds the current percentage of the progress, a value between 0 and 1. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#progress + * @type {number} + * @since 3.23.0 + */ + this.progress = 0; + + /** + * Effect elapsed timer. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_elapsed + * @type {number} + * @private + * @since 3.23.0 + */ + this._elapsed = 0; + + /** + * @callback CameraRotateCallback + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera on which the effect is running. + * @param {number} progress - The progress of the effect. A value between 0 and 1. + * @param {number} angle - The Camera's new angle in radians. + */ + + /** + * This callback is invoked every frame for the duration of the effect. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_onUpdate + * @type {?CameraRotateCallback} + * @private + * @default null + * @since 3.23.0 + */ + this._onUpdate; + + /** + * On Complete callback scope. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_onUpdateScope + * @type {any} + * @private + * @since 3.23.0 + */ + this._onUpdateScope; + + /** + * The direction of the rotation. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#clockwise + * @type {boolean} + * @since 3.23.0 + */ + this.clockwise = true; + + /** + * The shortest direction to the target rotation. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#shortestPath + * @type {boolean} + * @since 3.23.0 + */ + this.shortestPath = false; + }, + + /** + * This effect will scroll the Camera so that the center of its viewport finishes at the given angle, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#start + * @fires Phaser.Cameras.Scene2D.Events#ROTATE_START + * @fires Phaser.Cameras.Scene2D.Events#ROTATE_COMPLETE + * @since 3.23.0 + * + * @param {number} radians - The destination angle in radians to rotate the Camera viewport to. If the angle is positive then the rotation is clockwise else anticlockwise + * @param {boolean} [shortestPath=false] - If shortest path is set to true the camera will rotate in the quickest direction clockwise or anti-clockwise. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the Rotate. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the rotation effect to start immediately, even if already running. + * @param {CameraRotateCallback} [callback] - This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera scroll x coordinate and the current camera scroll y coordinate. + * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + * + * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started. + */ + start: function (radians, shortestPath, duration, ease, force, callback, context) + { + if (duration === undefined) { duration = 1000; } + if (ease === undefined) { ease = EaseMap.Linear; } + if (force === undefined) { force = false; } + if (callback === undefined) { callback = null; } + if (context === undefined) { context = this.camera.scene; } + if (shortestPath === undefined) { shortestPath = false; } + + this.shortestPath = shortestPath; + + var tmpDestination = radians; + + if (radians < 0) + { + tmpDestination = -1 * radians; + this.clockwise = false; + } + else + { + this.clockwise = true; + } + + var maxRad = (360 * Math.PI) / 180; + + tmpDestination = tmpDestination - (Math.floor(tmpDestination / maxRad) * maxRad); + + var cam = this.camera; + + if (!force && this.isRunning) + { + return cam; + } + + this.isRunning = true; + this.duration = duration; + this.progress = 0; + + // Starting from + this.source = cam.rotation; + + // Destination + this.destination = tmpDestination; + + // Using this ease + if (typeof ease === 'string' && EaseMap.hasOwnProperty(ease)) + { + this.ease = EaseMap[ease]; + } + else if (typeof ease === 'function') + { + this.ease = ease; + } + + this._elapsed = 0; + + this._onUpdate = callback; + this._onUpdateScope = context; + + + if (this.shortestPath) + { + // The shortest path is true so calculate the quickest direction + var cwDist = 0; + var acwDist = 0; + + if (this.destination > this.source) + { + cwDist = Math.abs(this.destination - this.source); + } + else + { + cwDist = (Math.abs(this.destination + maxRad) - this.source); + } + + if (this.source > this.destination) + { + acwDist = Math.abs(this.source - this.destination); + } + else + { + acwDist = (Math.abs(this.source + maxRad) - this.destination); + } + + if (cwDist < acwDist) + { + this.clockwise = true; + } + else if (cwDist > acwDist) + { + this.clockwise = false; + } + } + + this.camera.emit(Events.ROTATE_START, this.camera, this, duration, tmpDestination); + + return cam; + }, + + /** + * The main update loop for this effect. Called automatically by the Camera. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#update + * @since 3.23.0 + * + * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + if (!this.isRunning) + { + return; + } + + this._elapsed += delta; + + var progress = Clamp(this._elapsed / this.duration, 0, 1); + + this.progress = progress; + + var cam = this.camera; + + if (this._elapsed < this.duration) + { + var v = this.ease(progress); + + this.current = cam.rotation; + var distance = 0; + var maxRad = (360 * Math.PI) / 180; + var target = this.destination; + var current = this.current; + + if (this.clockwise === false) + { + target = this.current; + current = this.destination; + } + + if (target >= current) + { + distance = Math.abs(target - current); + } + else + { + distance = (Math.abs(target + maxRad) - current); + } + + var r = 0; + + if (this.clockwise) + { + r = (cam.rotation + (distance * v)); + } + else + { + r = (cam.rotation - (distance * v)); + } + + cam.rotation = r; + + if (this._onUpdate) + { + this._onUpdate.call(this._onUpdateScope, cam, progress, r); + } + } + else + { + cam.rotation = this.destination; + + if (this._onUpdate) + { + this._onUpdate.call(this._onUpdateScope, cam, progress, this.destination); + } + + this.effectComplete(); + } + }, + + /** + * Called internally when the effect completes. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#effectComplete + * @since 3.23.0 + */ + effectComplete: function () + { + this._onUpdate = null; + this._onUpdateScope = null; + + this.isRunning = false; + + this.camera.emit(Events.ROTATE_COMPLETE, this.camera, this); + }, + + /** + * Resets this camera effect. + * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#reset + * @since 3.23.0 + */ + reset: function () + { + this.isRunning = false; + + this._onUpdate = null; + this._onUpdateScope = null; + }, + + /** + * Destroys this effect, releasing it from the Camera. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#destroy + * @since 3.23.0 + */ + destroy: function () + { + this.reset(); + + this.camera = null; + this.source = null; + this.destination = null; + } + +}); + +module.exports = RotateTo; + + +/***/ }), +/* 723 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144922,10 +145172,10 @@ module.exports = Shake; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(179); -var Events = __webpack_require__(55); +var EaseMap = __webpack_require__(122); +var Events = __webpack_require__(41); /** * @classdesc @@ -145206,7 +145456,7 @@ module.exports = Zoom; /***/ }), -/* 725 */ +/* 724 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145215,13 +145465,13 @@ module.exports = Zoom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(312); +var Camera = __webpack_require__(311); var Class = __webpack_require__(0); -var GetFastValue = __webpack_require__(1); -var PluginCache = __webpack_require__(22); -var RectangleContains = __webpack_require__(53); -var ScaleEvents = __webpack_require__(104); -var SceneEvents = __webpack_require__(18); +var GetFastValue = __webpack_require__(2); +var PluginCache = __webpack_require__(24); +var RectangleContains = __webpack_require__(54); +var ScaleEvents = __webpack_require__(102); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -145606,7 +145856,7 @@ var CameraManager = new Class({ * * @param {(Phaser.Types.Cameras.Scene2D.CameraConfig|Phaser.Types.Cameras.Scene2D.CameraConfig[])} config - A Camera configuration object, or an array of them, to be added to this Camera Manager. * - * @return {Phaser.Cameras.Scene2D.CameraManager} This Camera Manager instance. + * @return {this} This Camera Manager instance. */ fromJSON: function (config) { @@ -145954,7 +146204,7 @@ module.exports = CameraManager; /***/ }), -/* 726 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -145973,7 +146223,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 727 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -145992,7 +146242,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 728 */ +/* 727 */ /***/ (function(module, exports) { /** @@ -146011,7 +146261,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 729 */ +/* 728 */ /***/ (function(module, exports) { /** @@ -146031,7 +146281,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 730 */ +/* 729 */ /***/ (function(module, exports) { /** @@ -146052,7 +146302,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 731 */ +/* 730 */ /***/ (function(module, exports) { /** @@ -146083,7 +146333,7 @@ module.exports = 'resize'; /***/ }), -/* 732 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -146108,7 +146358,7 @@ module.exports = 'boot'; /***/ }), -/* 733 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -146137,7 +146387,7 @@ module.exports = 'create'; /***/ }), -/* 734 */ +/* 733 */ /***/ (function(module, exports) { /** @@ -146164,7 +146414,7 @@ module.exports = 'destroy'; /***/ }), -/* 735 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -146191,7 +146441,7 @@ module.exports = 'pause'; /***/ }), -/* 736 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -146228,7 +146478,7 @@ module.exports = 'postupdate'; /***/ }), -/* 737 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -146265,7 +146515,7 @@ module.exports = 'preupdate'; /***/ }), -/* 738 */ +/* 737 */ /***/ (function(module, exports) { /** @@ -146293,7 +146543,7 @@ module.exports = 'ready'; /***/ }), -/* 739 */ +/* 738 */ /***/ (function(module, exports) { /** @@ -146329,7 +146579,7 @@ module.exports = 'render'; /***/ }), -/* 740 */ +/* 739 */ /***/ (function(module, exports) { /** @@ -146356,7 +146606,7 @@ module.exports = 'resume'; /***/ }), -/* 741 */ +/* 740 */ /***/ (function(module, exports) { /** @@ -146386,7 +146636,7 @@ module.exports = 'shutdown'; /***/ }), -/* 742 */ +/* 741 */ /***/ (function(module, exports) { /** @@ -146413,7 +146663,7 @@ module.exports = 'sleep'; /***/ }), -/* 743 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -146438,7 +146688,7 @@ module.exports = 'start'; /***/ }), -/* 744 */ +/* 743 */ /***/ (function(module, exports) { /** @@ -146474,7 +146724,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 745 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -146511,7 +146761,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 746 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -146545,7 +146795,7 @@ module.exports = 'transitionout'; /***/ }), -/* 747 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -146585,7 +146835,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 748 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -146620,7 +146870,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 749 */ +/* 748 */ /***/ (function(module, exports) { /** @@ -146657,7 +146907,7 @@ module.exports = 'update'; /***/ }), -/* 750 */ +/* 749 */ /***/ (function(module, exports) { /** @@ -146684,7 +146934,7 @@ module.exports = 'wake'; /***/ }), -/* 751 */ +/* 750 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146699,18 +146949,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(333), - CreateRenderer: __webpack_require__(356), - DebugHeader: __webpack_require__(366), + Config: __webpack_require__(332), + CreateRenderer: __webpack_require__(355), + DebugHeader: __webpack_require__(367), Events: __webpack_require__(21), - TimeStep: __webpack_require__(367), - VisibilityHandler: __webpack_require__(369) + TimeStep: __webpack_require__(368), + VisibilityHandler: __webpack_require__(370) }; /***/ }), -/* 752 */ +/* 751 */ /***/ (function(module, exports) { // shim for using process in browser @@ -146900,7 +147150,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 753 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146975,7 +147225,7 @@ module.exports = init(); /***/ }), -/* 754 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147100,7 +147350,7 @@ module.exports = init(); /***/ }), -/* 755 */ +/* 754 */ /***/ (function(module, exports) { /** @@ -147187,7 +147437,7 @@ module.exports = init(); /***/ }), -/* 756 */ +/* 755 */ /***/ (function(module, exports) { /** @@ -147291,7 +147541,7 @@ module.exports = init(); /***/ }), -/* 757 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147306,23 +147556,25 @@ module.exports = init(); module.exports = { - 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) + Between: __webpack_require__(335), + BetweenPoints: __webpack_require__(757), + BetweenPointsY: __webpack_require__(758), + BetweenY: __webpack_require__(759), + CounterClockwise: __webpack_require__(760), + Normalize: __webpack_require__(336), + Random: __webpack_require__(761), + RandomDegrees: __webpack_require__(762), + Reverse: __webpack_require__(763), + RotateTo: __webpack_require__(764), + ShortestBetween: __webpack_require__(765), + Wrap: __webpack_require__(166), + WrapDegrees: __webpack_require__(167) }; /***/ }), -/* 758 */ +/* 757 */ /***/ (function(module, exports) { /** @@ -147339,8 +147591,8 @@ module.exports = { * @function Phaser.Math.Angle.BetweenPoints * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -147353,7 +147605,7 @@ module.exports = BetweenPoints; /***/ }), -/* 759 */ +/* 758 */ /***/ (function(module, exports) { /** @@ -147371,8 +147623,8 @@ module.exports = BetweenPoints; * @function Phaser.Math.Angle.BetweenPointsY * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -147385,7 +147637,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 760 */ +/* 759 */ /***/ (function(module, exports) { /** @@ -147419,7 +147671,7 @@ module.exports = BetweenY; /***/ }), -/* 761 */ +/* 760 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147428,7 +147680,7 @@ module.exports = BetweenY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(14); /** * Takes an angle in Phasers default clockwise format and converts it so that @@ -147463,17 +147715,75 @@ var CounterClockwise = function (angle) module.exports = CounterClockwise; +/***/ }), +/* 761 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(126); + +/** + * Returns a random angle in the range [-pi, pi]. + * + * @function Phaser.Math.Angle.Random + * @since 3.23.0 + * + * @return {number} The angle, in radians. + */ +var Random = function () +{ + return FloatBetween(-Math.PI, Math.PI); +}; + +module.exports = Random; + + /***/ }), /* 762 */ /***/ (function(module, exports, __webpack_require__) { +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(126); + +/** + * Returns a random angle in the range [-180, 180]. + * + * @function Phaser.Math.Angle.RandomDegrees + * @since 3.23.0 + * + * @return {number} The angle, in degrees. + */ +var RandomDegrees = function () +{ + return FloatBetween(-180, 180); +}; + +module.exports = RandomDegrees; + + +/***/ }), +/* 763 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(337); +var Normalize = __webpack_require__(336); /** * Reverse the given angle. @@ -147494,7 +147804,7 @@ module.exports = Reverse; /***/ }), -/* 763 */ +/* 764 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147503,7 +147813,7 @@ module.exports = Reverse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(14); /** * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. @@ -147561,7 +147871,7 @@ module.exports = RotateTo; /***/ }), -/* 764 */ +/* 765 */ /***/ (function(module, exports) { /** @@ -147610,7 +147920,7 @@ module.exports = ShortestBetween; /***/ }), -/* 765 */ +/* 766 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147625,8 +147935,8 @@ module.exports = ShortestBetween; module.exports = { - Between: __webpack_require__(54), - BetweenPoints: __webpack_require__(766), + Between: __webpack_require__(55), + BetweenPoints: __webpack_require__(337), BetweenPointsSquared: __webpack_require__(767), Chebyshev: __webpack_require__(768), Power: __webpack_require__(769), @@ -147636,38 +147946,6 @@ module.exports = { }; -/***/ }), -/* 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) { @@ -147818,18 +148096,18 @@ module.exports = SnakeDistance; module.exports = { - 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) + Back: __webpack_require__(320), + Bounce: __webpack_require__(321), + Circular: __webpack_require__(322), + Cubic: __webpack_require__(323), + Elastic: __webpack_require__(324), + Expo: __webpack_require__(325), + Linear: __webpack_require__(326), + Quadratic: __webpack_require__(327), + Quartic: __webpack_require__(328), + Quintic: __webpack_require__(329), + Sine: __webpack_require__(330), + Stepped: __webpack_require__(331) }; @@ -147851,7 +148129,7 @@ module.exports = { module.exports = { Ceil: __webpack_require__(773), - Equal: __webpack_require__(126), + Equal: __webpack_require__(96), Floor: __webpack_require__(774), GreaterThan: __webpack_require__(339), LessThan: __webpack_require__(340) @@ -148101,7 +148379,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(170); +var SmootherStep = __webpack_require__(171); /** * A Smoother Step interpolation method. @@ -148192,7 +148470,7 @@ module.exports = IsValuePowerOfTwo; module.exports = { Ceil: __webpack_require__(347), - Floor: __webpack_require__(105), + Floor: __webpack_require__(103), To: __webpack_require__(783) }; @@ -149421,8 +149699,8 @@ module.exports = Within; */ var Vector3 = __webpack_require__(185); -var Matrix4 = __webpack_require__(354); -var Quaternion = __webpack_require__(355); +var Matrix4 = __webpack_require__(353); +var Quaternion = __webpack_require__(354); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -149706,85 +149984,6 @@ module.exports = [ /***/ }), /* 811 */ -/***/ (function(module, exports) { - -module.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'); - - -/***/ }), -/* 812 */ -/***/ (function(module, exports) { - -module.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'); - - -/***/ }), -/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149799,14 +149998,14 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(370), - Palettes: __webpack_require__(814) + GenerateTexture: __webpack_require__(371), + Palettes: __webpack_require__(812) }; /***/ }), -/* 814 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149821,17 +150020,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(371), - C64: __webpack_require__(815), - CGA: __webpack_require__(816), - JMP: __webpack_require__(817), - MSX: __webpack_require__(818) + ARNE16: __webpack_require__(372), + C64: __webpack_require__(813), + CGA: __webpack_require__(814), + JMP: __webpack_require__(815), + MSX: __webpack_require__(816) }; /***/ }), -/* 815 */ +/* 813 */ /***/ (function(module, exports) { /** @@ -149869,7 +150068,7 @@ module.exports = { /***/ }), -/* 816 */ +/* 814 */ /***/ (function(module, exports) { /** @@ -149907,7 +150106,7 @@ module.exports = { /***/ }), -/* 817 */ +/* 815 */ /***/ (function(module, exports) { /** @@ -149945,7 +150144,7 @@ module.exports = { /***/ }), -/* 818 */ +/* 816 */ /***/ (function(module, exports) { /** @@ -149983,7 +150182,7 @@ module.exports = { /***/ }), -/* 819 */ +/* 817 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149997,19 +150196,19 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(820), + Path: __webpack_require__(818), - CubicBezier: __webpack_require__(372), - Curve: __webpack_require__(86), - Ellipse: __webpack_require__(373), - Line: __webpack_require__(374), - QuadraticBezier: __webpack_require__(375), - Spline: __webpack_require__(376) + CubicBezier: __webpack_require__(373), + Curve: __webpack_require__(87), + Ellipse: __webpack_require__(374), + Line: __webpack_require__(375), + QuadraticBezier: __webpack_require__(376), + Spline: __webpack_require__(377) }; /***/ }), -/* 820 */ +/* 818 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150021,16 +150220,16 @@ module.exports = { // 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__(372); -var EllipseCurve = __webpack_require__(373); +var CubicBezierCurve = __webpack_require__(373); +var EllipseCurve = __webpack_require__(374); var GameObjectFactory = __webpack_require__(6); -var LineCurve = __webpack_require__(374); -var MovePathTo = __webpack_require__(821); -var QuadraticBezierCurve = __webpack_require__(375); +var LineCurve = __webpack_require__(375); +var MovePathTo = __webpack_require__(819); +var QuadraticBezierCurve = __webpack_require__(376); var Rectangle = __webpack_require__(11); -var SplineCurve = __webpack_require__(376); +var SplineCurve = __webpack_require__(377); var Vector2 = __webpack_require__(3); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(14); /** * @classdesc @@ -150151,7 +150350,7 @@ var Path = new Class({ * * @param {Phaser.Curves.Curve} curve - The Curve to append. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ add: function (curve) { @@ -150170,7 +150369,7 @@ var Path = new Class({ * @param {boolean} [clockwise=false] - `true` to create a clockwise circle as opposed to a counter-clockwise circle. * @param {number} [rotation=0] - The rotation of the circle in degrees. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ circleTo: function (radius, clockwise, rotation) { @@ -150189,7 +150388,7 @@ var Path = new Class({ * @method Phaser.Curves.Path#closePath * @since 3.0.0 * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ closePath: function () { @@ -150219,7 +150418,7 @@ var Path = new Class({ * @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. + * @return {this} This Path object. */ cubicBezierTo: function (x, y, control1X, control1Y, control2X, control2Y) { @@ -150258,7 +150457,7 @@ var Path = new Class({ * @param {number} [controlX] - If `x` is not a `Vector2`, the X coordinate of the first control point. * @param {number} [controlY] - If `x` is not a `Vector2`, the Y coordinate of the first control point. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ quadraticBezierTo: function (x, y, controlX, controlY) { @@ -150324,7 +150523,7 @@ var Path = new Class({ * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`). * @param {number} [rotation=0] - The rotation of the ellipse, in degrees. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ ellipseTo: function (xRadius, yRadius, startAngle, endAngle, clockwise, rotation) { @@ -150353,7 +150552,7 @@ var Path = new Class({ * * @param {Phaser.Types.Curves.JSONPath} data - The JSON object containing the Path data. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ fromJSON: function (data) { @@ -150707,6 +150906,46 @@ var Path = new Class({ return out.copy(this.startPoint); }, + /** + * Gets a unit vector tangent at a relative position on the path. + * + * @method Phaser.Curves.Path#getTangent + * @since 3.23.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] + * + * @param {number} t - The relative position on the path, [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) + */ + getTangent: function (t, out) + { + if (out === undefined) { out = new Vector2(); } + + var d = t * this.getLength(); + var curveLengths = this.getCurveLengths(); + var i = 0; + + while (i < curveLengths.length) + { + if (curveLengths[i] >= d) + { + var diff = curveLengths[i] - d; + var curve = this.curves[i]; + + var segmentLength = curve.getLength(); + var u = (segmentLength === 0) ? 0 : 1 - diff / segmentLength; + + return curve.getTangentAt(u, out); + } + + i++; + } + + return null; + }, + /** * Creates a line curve from the previous end point to x/y. * @@ -150716,7 +150955,7 @@ var Path = new Class({ * @param {(number|Phaser.Math.Vector2)} x - The X coordinate of the line's end point, or a `Vector2` containing the entire end point. * @param {number} [y] - The Y coordinate of the line's end point, if a number was passed as the X parameter. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ lineTo: function (x, y) { @@ -150742,7 +150981,7 @@ var Path = new Class({ * * @param {Phaser.Math.Vector2[]} points - The points the newly created spline curve should consist of. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ splineTo: function (points) { @@ -150762,7 +151001,7 @@ var Path = new Class({ * @param {(number|Phaser.Math.Vector2)} x - The X coordinate of the position to move the path's end point to, or a `Vector2` containing the entire new end point. * @param {number} y - The Y coordinate of the position to move the path's end point to, if a number was passed as the X coordinate. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ moveTo: function (x, y) { @@ -150858,7 +151097,7 @@ module.exports = Path; /***/ }), -/* 821 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150998,7 +151237,7 @@ module.exports = MoveTo; /***/ }), -/* 822 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151013,15 +151252,15 @@ module.exports = MoveTo; module.exports = { - DataManager: __webpack_require__(101), - DataManagerPlugin: __webpack_require__(823), - Events: __webpack_require__(303) + DataManager: __webpack_require__(99), + DataManagerPlugin: __webpack_require__(821), + Events: __webpack_require__(302) }; /***/ }), -/* 823 */ +/* 821 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151031,9 +151270,9 @@ module.exports = { */ var Class = __webpack_require__(0); -var DataManager = __webpack_require__(101); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); +var DataManager = __webpack_require__(99); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -151148,7 +151387,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 824 */ +/* 822 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151163,18 +151402,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(825), - BaseShader: __webpack_require__(377), - Bounds: __webpack_require__(828), - Canvas: __webpack_require__(831), - Color: __webpack_require__(378), - Masks: __webpack_require__(840) + Align: __webpack_require__(823), + BaseShader: __webpack_require__(378), + Bounds: __webpack_require__(826), + Canvas: __webpack_require__(829), + Color: __webpack_require__(379), + Masks: __webpack_require__(838) }; /***/ }), -/* 825 */ +/* 823 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151183,8 +151422,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(97); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(94); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Display.Align @@ -151192,8 +151431,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(826), - To: __webpack_require__(827) + In: __webpack_require__(824), + To: __webpack_require__(825) }; @@ -151204,7 +151443,7 @@ module.exports = Align; /***/ }), -/* 826 */ +/* 824 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151219,22 +151458,22 @@ module.exports = Align; module.exports = { - 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) + BottomCenter: __webpack_require__(273), + BottomLeft: __webpack_require__(274), + BottomRight: __webpack_require__(275), + Center: __webpack_require__(276), + LeftCenter: __webpack_require__(278), + QuickSet: __webpack_require__(272), + RightCenter: __webpack_require__(279), + TopCenter: __webpack_require__(280), + TopLeft: __webpack_require__(281), + TopRight: __webpack_require__(282) }; /***/ }), -/* 827 */ +/* 825 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151249,25 +151488,25 @@ module.exports = { module.exports = { - 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) + BottomCenter: __webpack_require__(260), + BottomLeft: __webpack_require__(261), + BottomRight: __webpack_require__(262), + LeftBottom: __webpack_require__(263), + LeftCenter: __webpack_require__(264), + LeftTop: __webpack_require__(265), + QuickSet: __webpack_require__(259), + RightBottom: __webpack_require__(266), + RightCenter: __webpack_require__(267), + RightTop: __webpack_require__(268), + TopCenter: __webpack_require__(269), + TopLeft: __webpack_require__(270), + TopRight: __webpack_require__(271) }; /***/ }), -/* 828 */ +/* 826 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151282,27 +151521,27 @@ module.exports = { module.exports = { - CenterOn: __webpack_require__(278), - GetBottom: __webpack_require__(44), - GetCenterX: __webpack_require__(81), - GetCenterY: __webpack_require__(83), - 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) + CenterOn: __webpack_require__(277), + GetBottom: __webpack_require__(45), + GetCenterX: __webpack_require__(82), + GetCenterY: __webpack_require__(84), + GetLeft: __webpack_require__(47), + GetOffsetX: __webpack_require__(827), + GetOffsetY: __webpack_require__(828), + GetRight: __webpack_require__(49), + GetTop: __webpack_require__(52), + SetBottom: __webpack_require__(51), + SetCenterX: __webpack_require__(83), + SetCenterY: __webpack_require__(85), + SetLeft: __webpack_require__(48), + SetRight: __webpack_require__(50), + SetTop: __webpack_require__(46) }; /***/ }), -/* 829 */ +/* 827 */ /***/ (function(module, exports) { /** @@ -151332,7 +151571,7 @@ module.exports = GetOffsetX; /***/ }), -/* 830 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -151362,7 +151601,7 @@ module.exports = GetOffsetY; /***/ }), -/* 831 */ +/* 829 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151377,17 +151616,17 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(357), + CanvasInterpolation: __webpack_require__(356), CanvasPool: __webpack_require__(28), - Smoothing: __webpack_require__(177), - TouchAction: __webpack_require__(832), - UserSelect: __webpack_require__(833) + Smoothing: __webpack_require__(178), + TouchAction: __webpack_require__(830), + UserSelect: __webpack_require__(831) }; /***/ }), -/* 832 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -151422,7 +151661,7 @@ module.exports = TouchAction; /***/ }), -/* 833 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -151469,7 +151708,7 @@ module.exports = UserSelect; /***/ }), -/* 834 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -151509,7 +151748,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 835 */ +/* 833 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151518,8 +151757,8 @@ module.exports = ColorToRGBA; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(36); -var HueToComponent = __webpack_require__(380); +var Color = __webpack_require__(34); +var HueToComponent = __webpack_require__(381); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -151559,7 +151798,7 @@ module.exports = HSLToColor; /***/ }), -/* 836 */ +/* 834 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151568,7 +151807,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(176); +var HSVToRGB = __webpack_require__(177); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -151600,7 +151839,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 837 */ +/* 835 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151708,7 +151947,7 @@ module.exports = { /***/ }), -/* 838 */ +/* 836 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151718,7 +151957,7 @@ module.exports = { */ var Between = __webpack_require__(183); -var Color = __webpack_require__(36); +var Color = __webpack_require__(34); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -151744,7 +151983,7 @@ module.exports = RandomRGB; /***/ }), -/* 839 */ +/* 837 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151753,7 +151992,7 @@ module.exports = RandomRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(379); +var ComponentToHex = __webpack_require__(380); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -151788,7 +152027,7 @@ module.exports = RGBToString; /***/ }), -/* 840 */ +/* 838 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151803,14 +152042,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(297), - GeometryMask: __webpack_require__(298) + BitmapMask: __webpack_require__(296), + GeometryMask: __webpack_require__(297) }; /***/ }), -/* 841 */ +/* 839 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151825,13 +152064,13 @@ module.exports = { var Dom = { - AddToDOM: __webpack_require__(129), - DOMContentLoaded: __webpack_require__(381), - GetScreenOrientation: __webpack_require__(382), - GetTarget: __webpack_require__(387), - ParseXML: __webpack_require__(388), + AddToDOM: __webpack_require__(130), + DOMContentLoaded: __webpack_require__(382), + GetScreenOrientation: __webpack_require__(383), + GetTarget: __webpack_require__(388), + ParseXML: __webpack_require__(389), RemoveFromDOM: __webpack_require__(191), - RequestAnimationFrame: __webpack_require__(368) + RequestAnimationFrame: __webpack_require__(369) }; @@ -151839,7 +152078,7 @@ module.exports = Dom; /***/ }), -/* 842 */ +/* 840 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151852,11 +152091,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(843) }; +module.exports = { EventEmitter: __webpack_require__(841) }; /***/ }), -/* 843 */ +/* 841 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151867,7 +152106,7 @@ module.exports = { EventEmitter: __webpack_require__(843) }; var Class = __webpack_require__(0); var EE = __webpack_require__(9); -var PluginCache = __webpack_require__(22); +var PluginCache = __webpack_require__(24); /** * @classdesc @@ -152040,7 +152279,7 @@ module.exports = EventEmitter; /***/ }), -/* 844 */ +/* 842 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152049,38 +152288,38 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(129); -var AnimationManager = __webpack_require__(308); -var CacheManager = __webpack_require__(311); +var AddToDOM = __webpack_require__(130); +var AnimationManager = __webpack_require__(307); +var CacheManager = __webpack_require__(310); var CanvasPool = __webpack_require__(28); var Class = __webpack_require__(0); -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 Config = __webpack_require__(332); +var CreateDOMContainer = __webpack_require__(843); +var CreateRenderer = __webpack_require__(355); +var DataManager = __webpack_require__(99); +var DebugHeader = __webpack_require__(367); +var Device = __webpack_require__(333); +var DOMContentLoaded = __webpack_require__(382); var EventEmitter = __webpack_require__(9); 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 InputManager = __webpack_require__(390); +var PluginCache = __webpack_require__(24); +var PluginManager = __webpack_require__(395); +var ScaleManager = __webpack_require__(396); +var SceneManager = __webpack_require__(398); var TextureEvents = __webpack_require__(128); -var TextureManager = __webpack_require__(400); -var TimeStep = __webpack_require__(367); -var VisibilityHandler = __webpack_require__(369); +var TextureManager = __webpack_require__(401); +var TimeStep = __webpack_require__(368); +var VisibilityHandler = __webpack_require__(370); if (true) { - var SoundManagerCreator = __webpack_require__(404); + var SoundManagerCreator = __webpack_require__(405); } if (true) { - var FacebookInstantGamesPlugin = __webpack_require__(412); + var FacebookInstantGamesPlugin = __webpack_require__(415); } /** @@ -152434,7 +152673,7 @@ var Game = new Class({ * * @method Phaser.Game#texturesReady * @private - * @fires Phaser.Game#ready + * @fires Phaser.Game#READY * @since 3.12.0 */ texturesReady: function () @@ -152488,11 +152727,11 @@ var Game = new Class({ * It will then render each Scene in turn, via the Renderer. This process emits `prerender` and `postrender` events. * * @method Phaser.Game#step - * @fires Phaser.Core.Events#PRE_STEP_EVENT - * @fires Phaser.Core.Events#STEP_EVENT - * @fires Phaser.Core.Events#POST_STEP_EVENT - * @fires Phaser.Core.Events#PRE_RENDER_EVENT - * @fires Phaser.Core.Events#POST_RENDER_EVENT + * @fires Phaser.Core.Events#PRE_STEP + * @fires Phaser.Core.Events#STEP + * @fires Phaser.Core.Events#POST_STEP + * @fires Phaser.Core.Events#PRE_RENDER + * @fires Phaser.Core.Events#POST_RENDER * @since 3.0.0 * * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. @@ -152555,8 +152794,8 @@ var Game = new Class({ * This process emits `prerender` and `postrender` events, even though nothing actually displays. * * @method Phaser.Game#headlessStep - * @fires Phaser.Game#prerenderEvent - * @fires Phaser.Game#postrenderEvent + * @fires Phaser.Game#PRE_RENDER + * @fires Phaser.Game#POST_RENDER * @since 3.2.0 * * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. @@ -152717,7 +152956,7 @@ var Game = new Class({ runDestroy: function () { this.scene.destroy(); - + this.events.emit(Events.DESTROY); this.events.removeAllListeners(); @@ -152757,7 +152996,7 @@ module.exports = Game; /***/ }), -/* 845 */ +/* 843 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152766,7 +153005,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(129); +var AddToDOM = __webpack_require__(130); var CreateDOMContainer = function (game) { @@ -152801,7 +153040,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 846 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -152822,7 +153061,7 @@ module.exports = 'boot'; /***/ }), -/* 847 */ +/* 845 */ /***/ (function(module, exports) { /** @@ -152843,7 +153082,7 @@ module.exports = 'destroy'; /***/ }), -/* 848 */ +/* 846 */ /***/ (function(module, exports) { /** @@ -152871,7 +153110,7 @@ module.exports = 'dragend'; /***/ }), -/* 849 */ +/* 847 */ /***/ (function(module, exports) { /** @@ -152902,7 +153141,7 @@ module.exports = 'dragenter'; /***/ }), -/* 850 */ +/* 848 */ /***/ (function(module, exports) { /** @@ -152934,7 +153173,7 @@ module.exports = 'drag'; /***/ }), -/* 851 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -152965,7 +153204,7 @@ module.exports = 'dragleave'; /***/ }), -/* 852 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -152999,7 +153238,7 @@ module.exports = 'dragover'; /***/ }), -/* 853 */ +/* 851 */ /***/ (function(module, exports) { /** @@ -153029,7 +153268,7 @@ module.exports = 'dragstart'; /***/ }), -/* 854 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -153058,7 +153297,7 @@ module.exports = 'drop'; /***/ }), -/* 855 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -153085,7 +153324,7 @@ module.exports = 'gameout'; /***/ }), -/* 856 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -153112,7 +153351,7 @@ module.exports = 'gameover'; /***/ }), -/* 857 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -153153,7 +153392,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 858 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -153184,7 +153423,7 @@ module.exports = 'dragend'; /***/ }), -/* 859 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -153214,7 +153453,7 @@ module.exports = 'dragenter'; /***/ }), -/* 860 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -153245,7 +153484,7 @@ module.exports = 'drag'; /***/ }), -/* 861 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -153275,7 +153514,7 @@ module.exports = 'dragleave'; /***/ }), -/* 862 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -153308,7 +153547,7 @@ module.exports = 'dragover'; /***/ }), -/* 863 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -153342,7 +153581,7 @@ module.exports = 'dragstart'; /***/ }), -/* 864 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -153372,7 +153611,7 @@ module.exports = 'drop'; /***/ }), -/* 865 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -153413,7 +153652,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 866 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -153454,7 +153693,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 867 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -153495,7 +153734,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 868 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -153536,7 +153775,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 869 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -153577,7 +153816,7 @@ module.exports = 'pointermove'; /***/ }), -/* 870 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -153616,7 +153855,7 @@ module.exports = 'pointerout'; /***/ }), -/* 871 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -153657,7 +153896,7 @@ module.exports = 'pointerover'; /***/ }), -/* 872 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -153698,7 +153937,7 @@ module.exports = 'pointerup'; /***/ }), -/* 873 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -153740,7 +153979,7 @@ module.exports = 'wheel'; /***/ }), -/* 874 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -153781,7 +154020,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 875 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -153825,7 +154064,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 876 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -153846,7 +154085,7 @@ module.exports = 'boot'; /***/ }), -/* 877 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -153871,7 +154110,7 @@ module.exports = 'process'; /***/ }), -/* 878 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -153892,7 +154131,7 @@ module.exports = 'update'; /***/ }), -/* 879 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -153927,7 +154166,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 880 */ +/* 878 */ /***/ (function(module, exports) { /** @@ -153961,7 +154200,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 881 */ +/* 879 */ /***/ (function(module, exports) { /** @@ -153996,7 +154235,7 @@ module.exports = 'pointermove'; /***/ }), -/* 882 */ +/* 880 */ /***/ (function(module, exports) { /** @@ -154031,7 +154270,7 @@ module.exports = 'pointerout'; /***/ }), -/* 883 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -154066,7 +154305,7 @@ module.exports = 'pointerover'; /***/ }), -/* 884 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -154101,7 +154340,7 @@ module.exports = 'pointerup'; /***/ }), -/* 885 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -154135,7 +154374,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 886 */ +/* 884 */ /***/ (function(module, exports) { /** @@ -154173,7 +154412,7 @@ module.exports = 'wheel'; /***/ }), -/* 887 */ +/* 885 */ /***/ (function(module, exports) { /** @@ -154197,7 +154436,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 888 */ +/* 886 */ /***/ (function(module, exports) { /** @@ -154219,7 +154458,7 @@ module.exports = 'preupdate'; /***/ }), -/* 889 */ +/* 887 */ /***/ (function(module, exports) { /** @@ -154240,7 +154479,7 @@ module.exports = 'shutdown'; /***/ }), -/* 890 */ +/* 888 */ /***/ (function(module, exports) { /** @@ -154262,7 +154501,7 @@ module.exports = 'start'; /***/ }), -/* 891 */ +/* 889 */ /***/ (function(module, exports) { /** @@ -154287,7 +154526,7 @@ module.exports = 'update'; /***/ }), -/* 892 */ +/* 890 */ /***/ (function(module, exports) { /** @@ -154346,7 +154585,7 @@ module.exports = GetInnerHeight; /***/ }), -/* 893 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -154376,7 +154615,7 @@ module.exports = 'addfile'; /***/ }), -/* 894 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -154404,7 +154643,7 @@ module.exports = 'complete'; /***/ }), -/* 895 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -154433,7 +154672,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 896 */ +/* 894 */ /***/ (function(module, exports) { /** @@ -154487,7 +154726,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 897 */ +/* 895 */ /***/ (function(module, exports) { /** @@ -154512,7 +154751,7 @@ module.exports = 'loaderror'; /***/ }), -/* 898 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -154538,7 +154777,7 @@ module.exports = 'load'; /***/ }), -/* 899 */ +/* 897 */ /***/ (function(module, exports) { /** @@ -154565,7 +154804,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 900 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -154594,7 +154833,7 @@ module.exports = 'postprocess'; /***/ }), -/* 901 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -154619,7 +154858,7 @@ module.exports = 'progress'; /***/ }), -/* 902 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -154646,7 +154885,7 @@ module.exports = 'start'; /***/ }), -/* 903 */ +/* 901 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154655,7 +154894,7 @@ module.exports = 'start'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var UppercaseFirst = __webpack_require__(194); /** @@ -154708,7 +154947,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 904 */ +/* 902 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154717,7 +154956,7 @@ module.exports = GetPhysicsPlugins; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Builds an array of which plugins (not including physics plugins) should be activated for the given Scene. @@ -154755,7 +154994,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 905 */ +/* 903 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154818,7 +155057,7 @@ module.exports = InjectionMap; /***/ }), -/* 906 */ +/* 904 */ /***/ (function(module, exports) { /** @@ -154899,7 +155138,7 @@ module.exports = AtlasXML; /***/ }), -/* 907 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -154934,7 +155173,7 @@ module.exports = Canvas; /***/ }), -/* 908 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -154969,7 +155208,7 @@ module.exports = Image; /***/ }), -/* 909 */ +/* 907 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154978,7 +155217,7 @@ module.exports = Image; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(73); +var Clone = __webpack_require__(72); /** * Parses a Texture Atlas JSON Array and adds the Frames to the Texture. @@ -155040,11 +155279,13 @@ var JSONArray = function (texture, sourceIndex, json) newFrame.updateUVsInverted(); } - if (src.anchor) + var pivot = src.anchor || src.pivot; + + if (pivot) { newFrame.customPivot = true; - newFrame.pivotX = src.anchor.x; - newFrame.pivotY = src.anchor.y; + newFrame.pivotX = pivot.x; + newFrame.pivotY = pivot.y; } // Copy over any extra data @@ -155076,7 +155317,7 @@ module.exports = JSONArray; /***/ }), -/* 910 */ +/* 908 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155085,7 +155326,7 @@ module.exports = JSONArray; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(73); +var Clone = __webpack_require__(72); /** * Parses a Texture Atlas JSON Hash and adds the Frames to the Texture. @@ -155117,7 +155358,7 @@ var JSONHash = function (texture, sourceIndex, json) texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height); // By this stage frames is a fully parsed Object - var frames = json['frames']; + var frames = json.frames; var newFrame; for (var key in frames) @@ -155146,6 +155387,15 @@ var JSONHash = function (texture, sourceIndex, json) newFrame.updateUVsInverted(); } + var pivot = src.anchor || src.pivot; + + if (pivot) + { + newFrame.customPivot = true; + newFrame.pivotX = pivot.x; + newFrame.pivotY = pivot.y; + } + // Copy over any extra data newFrame.customData = Clone(src); } @@ -155175,7 +155425,7 @@ module.exports = JSONHash; /***/ }), -/* 911 */ +/* 909 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155184,7 +155434,7 @@ module.exports = JSONHash; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Parses a Sprite Sheet and adds the Frames to the Texture. @@ -155199,15 +155449,15 @@ var GetFastValue = __webpack_require__(1); * * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to. * @param {integer} sourceIndex - The index of the TextureSource. - * @param {integer} x - [description] - * @param {integer} y - [description] - * @param {integer} width - [description] - * @param {integer} height - [description] + * @param {integer} x - The top-left coordinate of the Sprite Sheet. Defaults to zero. Used when extracting sheets from atlases. + * @param {integer} y - The top-left coordinate of the Sprite Sheet. Defaults to zero. Used when extracting sheets from atlases. + * @param {integer} width - The width of the source image. + * @param {integer} height - The height of the source image. * @param {object} config - An object describing how to parse the Sprite Sheet. * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet. * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided. - * @param {number} [config.startFrame=0] - [description] - * @param {number} [config.endFrame=-1] - [description] + * @param {number} [config.startFrame=0] - The frame to start extracting from. Defaults to zero. + * @param {number} [config.endFrame=-1] - The frame to finish extracting at. Defaults to -1, which means 'all frames'. * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here. * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here. * @@ -155300,7 +155550,7 @@ module.exports = SpriteSheet; /***/ }), -/* 912 */ +/* 910 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155309,7 +155559,7 @@ module.exports = SpriteSheet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * Parses a Sprite Sheet and adds the Frames to the Texture, where the Sprite Sheet is stored as a frame within an Atlas. @@ -155491,7 +155741,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 913 */ +/* 911 */ /***/ (function(module, exports) { /** @@ -155661,7 +155911,7 @@ TextureImporter: /***/ }), -/* 914 */ +/* 912 */ /***/ (function(module, exports) { /** @@ -155692,7 +155942,7 @@ module.exports = 'complete'; /***/ }), -/* 915 */ +/* 913 */ /***/ (function(module, exports) { /** @@ -155722,7 +155972,7 @@ module.exports = 'decoded'; /***/ }), -/* 916 */ +/* 914 */ /***/ (function(module, exports) { /** @@ -155754,7 +156004,7 @@ module.exports = 'decodedall'; /***/ }), -/* 917 */ +/* 915 */ /***/ (function(module, exports) { /** @@ -155786,7 +156036,7 @@ module.exports = 'destroy'; /***/ }), -/* 918 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -155819,7 +156069,7 @@ module.exports = 'detune'; /***/ }), -/* 919 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -155847,7 +156097,7 @@ module.exports = 'detune'; /***/ }), -/* 920 */ +/* 918 */ /***/ (function(module, exports) { /** @@ -155874,7 +156124,7 @@ module.exports = 'mute'; /***/ }), -/* 921 */ +/* 919 */ /***/ (function(module, exports) { /** @@ -155902,7 +156152,7 @@ module.exports = 'rate'; /***/ }), -/* 922 */ +/* 920 */ /***/ (function(module, exports) { /** @@ -155929,7 +156179,7 @@ module.exports = 'volume'; /***/ }), -/* 923 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -155963,7 +156213,7 @@ module.exports = 'loop'; /***/ }), -/* 924 */ +/* 922 */ /***/ (function(module, exports) { /** @@ -155997,7 +156247,7 @@ module.exports = 'looped'; /***/ }), -/* 925 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -156030,7 +156280,7 @@ module.exports = 'mute'; /***/ }), -/* 926 */ +/* 924 */ /***/ (function(module, exports) { /** @@ -156057,7 +156307,7 @@ module.exports = 'pauseall'; /***/ }), -/* 927 */ +/* 925 */ /***/ (function(module, exports) { /** @@ -156089,7 +156339,7 @@ module.exports = 'pause'; /***/ }), -/* 928 */ +/* 926 */ /***/ (function(module, exports) { /** @@ -156120,7 +156370,7 @@ module.exports = 'play'; /***/ }), -/* 929 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -156153,7 +156403,7 @@ module.exports = 'rate'; /***/ }), -/* 930 */ +/* 928 */ /***/ (function(module, exports) { /** @@ -156180,7 +156430,7 @@ module.exports = 'resumeall'; /***/ }), -/* 931 */ +/* 929 */ /***/ (function(module, exports) { /** @@ -156213,7 +156463,7 @@ module.exports = 'resume'; /***/ }), -/* 932 */ +/* 930 */ /***/ (function(module, exports) { /** @@ -156246,7 +156496,7 @@ module.exports = 'seek'; /***/ }), -/* 933 */ +/* 931 */ /***/ (function(module, exports) { /** @@ -156273,7 +156523,7 @@ module.exports = 'stopall'; /***/ }), -/* 934 */ +/* 932 */ /***/ (function(module, exports) { /** @@ -156305,7 +156555,7 @@ module.exports = 'stop'; /***/ }), -/* 935 */ +/* 933 */ /***/ (function(module, exports) { /** @@ -156332,7 +156582,7 @@ module.exports = 'unlocked'; /***/ }), -/* 936 */ +/* 934 */ /***/ (function(module, exports) { /** @@ -156365,7 +156615,7 @@ module.exports = 'volume'; /***/ }), -/* 937 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -156397,7 +156647,7 @@ module.exports = AdInstance; /***/ }), -/* 938 */ +/* 936 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156408,7 +156658,7 @@ module.exports = AdInstance; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var LeaderboardScore = __webpack_require__(939); +var LeaderboardScore = __webpack_require__(937); /** * @classdesc @@ -156711,7 +156961,7 @@ module.exports = Leaderboard; /***/ }), -/* 939 */ +/* 937 */ /***/ (function(module, exports) { /** @@ -156751,7 +157001,7 @@ module.exports = LeaderboardScore; /***/ }), -/* 940 */ +/* 938 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156760,7 +157010,7 @@ module.exports = LeaderboardScore; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @typedef {object} Product @@ -156789,7 +157039,7 @@ module.exports = Product; /***/ }), -/* 941 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156798,7 +157048,7 @@ module.exports = Product; * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} */ -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); /** * @typedef {object} Purchase @@ -156827,7 +157077,7 @@ module.exports = Purchase; /***/ }), -/* 942 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156842,66 +157092,68 @@ module.exports = Purchase; var GameObjects = { - Events: __webpack_require__(102), + Events: __webpack_require__(100), - DisplayList: __webpack_require__(943), + DisplayList: __webpack_require__(941), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(6), - UpdateList: __webpack_require__(971), + UpdateList: __webpack_require__(967), Components: __webpack_require__(12), - BuildGameObject: __webpack_require__(30), - BuildGameObjectAnimation: __webpack_require__(416), - GameObject: __webpack_require__(14), - BitmapText: __webpack_require__(138), + BuildGameObject: __webpack_require__(29), + BuildGameObjectAnimation: __webpack_require__(419), + GameObject: __webpack_require__(13), + BitmapText: __webpack_require__(139), Blitter: __webpack_require__(201), Container: __webpack_require__(202), - DOMElement: __webpack_require__(418), + DOMElement: __webpack_require__(421), DynamicBitmapText: __webpack_require__(203), - Extern: __webpack_require__(420), + Extern: __webpack_require__(423), Graphics: __webpack_require__(204), - Group: __webpack_require__(109), - Image: __webpack_require__(89), - Particles: __webpack_require__(1003), - PathFollower: __webpack_require__(432), + Group: __webpack_require__(108), + Image: __webpack_require__(109), + Particles: __webpack_require__(999), + PathFollower: __webpack_require__(435), RenderTexture: __webpack_require__(208), - RetroFont: __webpack_require__(1012), - Sprite: __webpack_require__(65), - Text: __webpack_require__(210), - TileSprite: __webpack_require__(211), - Zone: __webpack_require__(118), - Video: __webpack_require__(212), + RetroFont: __webpack_require__(1008), + Rope: __webpack_require__(210), + Sprite: __webpack_require__(74), + Text: __webpack_require__(211), + TileSprite: __webpack_require__(212), + Zone: __webpack_require__(117), + Video: __webpack_require__(213), // Shapes Shape: __webpack_require__(33), - 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), + Arc: __webpack_require__(436), + Curve: __webpack_require__(437), + Ellipse: __webpack_require__(438), + Grid: __webpack_require__(439), + IsoBox: __webpack_require__(440), + IsoTriangle: __webpack_require__(441), + Line: __webpack_require__(442), + Polygon: __webpack_require__(443), + Rectangle: __webpack_require__(448), + Star: __webpack_require__(449), + Triangle: __webpack_require__(450), // Game Object Factories Factories: { - 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), + Blitter: __webpack_require__(1059), + Container: __webpack_require__(1060), + DOMElement: __webpack_require__(1061), + DynamicBitmapText: __webpack_require__(1062), + Extern: __webpack_require__(1063), + Graphics: __webpack_require__(1064), + Group: __webpack_require__(1065), + Image: __webpack_require__(1066), + Particles: __webpack_require__(1067), + PathFollower: __webpack_require__(1068), + RenderTexture: __webpack_require__(1069), + Rope: __webpack_require__(1070), Sprite: __webpack_require__(1071), StaticBitmapText: __webpack_require__(1072), Text: __webpack_require__(1073), @@ -156932,12 +157184,13 @@ var GameObjects = { 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) + Rope: __webpack_require__(1096), + Sprite: __webpack_require__(1097), + StaticBitmapText: __webpack_require__(1098), + Text: __webpack_require__(1099), + TileSprite: __webpack_require__(1100), + Zone: __webpack_require__(1101), + Video: __webpack_require__(1102) } }; @@ -156945,29 +157198,29 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(139); - GameObjects.Quad = __webpack_require__(215); - GameObjects.Shader = __webpack_require__(216); + GameObjects.Mesh = __webpack_require__(141); + GameObjects.Quad = __webpack_require__(216); + GameObjects.Shader = __webpack_require__(217); - GameObjects.Factories.Mesh = __webpack_require__(1108); - GameObjects.Factories.Quad = __webpack_require__(1109); - GameObjects.Factories.Shader = __webpack_require__(1110); + GameObjects.Factories.Mesh = __webpack_require__(1109); + GameObjects.Factories.Quad = __webpack_require__(1110); + GameObjects.Factories.Shader = __webpack_require__(1111); - GameObjects.Creators.Mesh = __webpack_require__(1111); - GameObjects.Creators.Quad = __webpack_require__(1112); - GameObjects.Creators.Shader = __webpack_require__(1113); + GameObjects.Creators.Mesh = __webpack_require__(1112); + GameObjects.Creators.Quad = __webpack_require__(1113); + GameObjects.Creators.Shader = __webpack_require__(1114); - GameObjects.Light = __webpack_require__(451); + GameObjects.Light = __webpack_require__(454); - __webpack_require__(452); - __webpack_require__(1114); + __webpack_require__(455); + __webpack_require__(1115); } module.exports = GameObjects; /***/ }), -/* 943 */ +/* 941 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156977,10 +157230,10 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(135); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); -var StableSort = __webpack_require__(137); +var List = __webpack_require__(136); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); +var StableSort = __webpack_require__(138); /** * @classdesc @@ -157172,7 +157425,7 @@ module.exports = DisplayList; /***/ }), -/* 944 */ +/* 942 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157188,20 +157441,20 @@ module.exports = DisplayList; module.exports = { 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) + MatrixToString: __webpack_require__(943), + ReverseColumns: __webpack_require__(944), + ReverseRows: __webpack_require__(945), + Rotate180: __webpack_require__(946), + RotateLeft: __webpack_require__(947), + RotateMatrix: __webpack_require__(137), + RotateRight: __webpack_require__(948), + TransposeMatrix: __webpack_require__(416) }; /***/ }), -/* 945 */ +/* 943 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157210,7 +157463,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(173); +var Pad = __webpack_require__(174); var CheckMatrix = __webpack_require__(197); /** @@ -157282,7 +157535,7 @@ module.exports = MatrixToString; /***/ }), -/* 946 */ +/* 944 */ /***/ (function(module, exports) { /** @@ -157313,7 +157566,7 @@ module.exports = ReverseColumns; /***/ }), -/* 947 */ +/* 945 */ /***/ (function(module, exports) { /** @@ -157349,7 +157602,7 @@ module.exports = ReverseRows; /***/ }), -/* 948 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157358,7 +157611,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix 180 degrees. @@ -157382,7 +157635,7 @@ module.exports = Rotate180; /***/ }), -/* 949 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157391,7 +157644,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix to the left (or 90 degrees) @@ -157415,7 +157668,7 @@ module.exports = RotateLeft; /***/ }), -/* 950 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157424,7 +157677,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(136); +var RotateMatrix = __webpack_require__(137); /** * Rotates the array matrix to the left (or -90 degrees) @@ -157448,7 +157701,7 @@ module.exports = RotateRight; /***/ }), -/* 951 */ +/* 949 */ /***/ (function(module, exports) { /** @@ -157565,7 +157818,7 @@ module.exports = Add; /***/ }), -/* 952 */ +/* 950 */ /***/ (function(module, exports) { /** @@ -157687,7 +157940,7 @@ module.exports = AddAt; /***/ }), -/* 953 */ +/* 951 */ /***/ (function(module, exports) { /** @@ -157725,7 +157978,7 @@ module.exports = BringToTop; /***/ }), -/* 954 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157734,7 +157987,7 @@ module.exports = BringToTop; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(74); +var SafeRange = __webpack_require__(73); /** * Returns the total number of elements in the array which have a property matching the given value. @@ -157777,7 +158030,7 @@ module.exports = CountAllMatching; /***/ }), -/* 955 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -157823,7 +158076,7 @@ module.exports = Each; /***/ }), -/* 956 */ +/* 954 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157832,7 +158085,7 @@ module.exports = Each; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(74); +var SafeRange = __webpack_require__(73); /** * Passes each element in the array, between the start and end indexes, to the given callback. @@ -157879,128 +158132,7 @@ module.exports = EachInRange; /***/ }), -/* 957 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(74); - -/** - * Returns all elements in the array. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return only elements that have their visible property set. - * - * Optionally you can specify a start and end index. For example if the array had 100 elements, - * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only - * the first 50 elements. - * - * @function Phaser.Utils.Array.GetAll - * @since 3.4.0 - * - * @param {array} array - The array to search. - * @param {string} [property] - The property to test on each array element. - * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. - * @param {integer} [startIndex] - An optional start index to search from. - * @param {integer} [endIndex] - An optional end index to search to. - * - * @return {array} All matching elements from the array. - */ -var GetAll = function (array, property, value, startIndex, endIndex) -{ - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = array.length; } - - var output = []; - - if (SafeRange(array, startIndex, endIndex)) - { - for (var i = startIndex; i < endIndex; i++) - { - var child = array[i]; - - if (!property || - (property && value === undefined && child.hasOwnProperty(property)) || - (property && value !== undefined && child[property] === value)) - { - output.push(child); - } - } - } - - return output; -}; - -module.exports = GetAll; - - -/***/ }), -/* 958 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(74); - -/** - * Returns the first element in the array. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. - * - * Optionally you can specify a start and end index. For example if the array had 100 elements, - * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. - * - * @function Phaser.Utils.Array.GetFirst - * @since 3.4.0 - * - * @param {array} array - The array to search. - * @param {string} [property] - The property to test on each array element. - * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. - * @param {integer} [startIndex=0] - An optional start index to search from. - * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) - * - * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. - */ -var GetFirst = function (array, property, value, startIndex, endIndex) -{ - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = array.length; } - - if (SafeRange(array, startIndex, endIndex)) - { - for (var i = startIndex; i < endIndex; i++) - { - var child = array[i]; - - if (!property || - (property && value === undefined && child.hasOwnProperty(property)) || - (property && value !== undefined && child[property] === value)) - { - return child; - } - } - } - - return null; -}; - -module.exports = GetFirst; - - -/***/ }), -/* 959 */ +/* 955 */ /***/ (function(module, exports) { /** @@ -158042,7 +158174,7 @@ module.exports = MoveDown; /***/ }), -/* 960 */ +/* 956 */ /***/ (function(module, exports) { /** @@ -158089,7 +158221,7 @@ module.exports = MoveTo; /***/ }), -/* 961 */ +/* 957 */ /***/ (function(module, exports) { /** @@ -158131,7 +158263,7 @@ module.exports = MoveUp; /***/ }), -/* 962 */ +/* 958 */ /***/ (function(module, exports) { /** @@ -158195,7 +158327,7 @@ module.exports = NumberArray; /***/ }), -/* 963 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158204,7 +158336,7 @@ module.exports = NumberArray; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(350); +var RoundAwayFromZero = __webpack_require__(349); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -158272,7 +158404,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 964 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158281,7 +158413,7 @@ module.exports = NumberArrayStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(85); +var SpliceOne = __webpack_require__(86); /** * Removes the item from the given position in the array. @@ -158323,7 +158455,7 @@ module.exports = RemoveAt; /***/ }), -/* 965 */ +/* 961 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158332,7 +158464,7 @@ module.exports = RemoveAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(74); +var SafeRange = __webpack_require__(73); /** * Removes the item within the given range in the array. @@ -158386,7 +158518,7 @@ module.exports = RemoveBetween; /***/ }), -/* 966 */ +/* 962 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158395,7 +158527,7 @@ module.exports = RemoveBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(85); +var SpliceOne = __webpack_require__(86); /** * Removes a random object from the given array and returns it. @@ -158424,7 +158556,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 967 */ +/* 963 */ /***/ (function(module, exports) { /** @@ -158468,7 +158600,7 @@ module.exports = Replace; /***/ }), -/* 968 */ +/* 964 */ /***/ (function(module, exports) { /** @@ -158506,7 +158638,7 @@ module.exports = SendToBack; /***/ }), -/* 969 */ +/* 965 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158515,7 +158647,7 @@ module.exports = SendToBack; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SafeRange = __webpack_require__(74); +var SafeRange = __webpack_require__(73); /** * Scans the array for elements with the given property. If found, the property is set to the `value`. @@ -158561,7 +158693,7 @@ module.exports = SetAll; /***/ }), -/* 970 */ +/* 966 */ /***/ (function(module, exports) { /** @@ -158609,7 +158741,7 @@ module.exports = Swap; /***/ }), -/* 971 */ +/* 967 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158620,8 +158752,8 @@ module.exports = Swap; var Class = __webpack_require__(0); var ProcessQueue = __webpack_require__(199); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -158910,7 +159042,7 @@ module.exports = UpdateList; /***/ }), -/* 972 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158925,14 +159057,14 @@ module.exports = UpdateList; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(973), - PROCESS_QUEUE_REMOVE: __webpack_require__(974) + PROCESS_QUEUE_ADD: __webpack_require__(969), + PROCESS_QUEUE_REMOVE: __webpack_require__(970) }; /***/ }), -/* 973 */ +/* 969 */ /***/ (function(module, exports) { /** @@ -158959,7 +159091,7 @@ module.exports = 'add'; /***/ }), -/* 974 */ +/* 970 */ /***/ (function(module, exports) { /** @@ -158986,7 +159118,7 @@ module.exports = 'remove'; /***/ }), -/* 975 */ +/* 971 */ /***/ (function(module, exports) { /** @@ -159439,7 +159571,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 976 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159492,7 +159624,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 977 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159501,17 +159633,17 @@ module.exports = ParseFromAtlas; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(978); + renderWebGL = __webpack_require__(974); } if (true) { - renderCanvas = __webpack_require__(979); + renderCanvas = __webpack_require__(975); } module.exports = { @@ -159523,7 +159655,7 @@ module.exports = { /***/ }), -/* 978 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159759,7 +159891,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 979 */ +/* 975 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159768,7 +159900,7 @@ module.exports = BitmapTextWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -159941,7 +160073,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 980 */ +/* 976 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159950,17 +160082,17 @@ module.exports = BitmapTextCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(981); + renderWebGL = __webpack_require__(977); } if (true) { - renderCanvas = __webpack_require__(982); + renderCanvas = __webpack_require__(978); } module.exports = { @@ -159972,7 +160104,7 @@ module.exports = { /***/ }), -/* 981 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160102,7 +160234,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 982 */ +/* 978 */ /***/ (function(module, exports) { /** @@ -160232,7 +160364,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 983 */ +/* 979 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160242,7 +160374,7 @@ module.exports = BlitterCanvasRenderer; */ var Class = __webpack_require__(0); -var Frame = __webpack_require__(106); +var Frame = __webpack_require__(105); /** * @classdesc @@ -160389,7 +160521,7 @@ var Bob = new Class({ * * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFrame: function (frame) { @@ -160415,7 +160547,7 @@ var Bob = new Class({ * @method Phaser.GameObjects.Bob#resetFlip * @since 3.0.0 * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ resetFlip: function () { @@ -160439,7 +160571,7 @@ var Bob = new Class({ * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ reset: function (x, y, frame) { @@ -160471,7 +160603,7 @@ var Bob = new Class({ * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setPosition: function (x, y) { @@ -160489,7 +160621,7 @@ var Bob = new Class({ * * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlipX: function (value) { @@ -160506,7 +160638,7 @@ var Bob = new Class({ * * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlipY: function (value) { @@ -160524,7 +160656,7 @@ var Bob = new Class({ * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlip: function (x, y) { @@ -160544,7 +160676,7 @@ var Bob = new Class({ * * @param {boolean} value - The visible state of the Game Object. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setVisible: function (value) { @@ -160564,7 +160696,7 @@ var Bob = new Class({ * * @param {number} value - The alpha value used for this Bob. Between 0 and 1. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setAlpha: function (value) { @@ -160581,7 +160713,7 @@ var Bob = new Class({ * * @param {number} value - The tint value used for this Bob. Between 0 and 0xffffff. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setTint: function (value) { @@ -160662,7 +160794,7 @@ module.exports = Bob; /***/ }), -/* 984 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160672,17 +160804,17 @@ module.exports = Bob; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(985); + renderWebGL = __webpack_require__(981); } if (true) { - renderCanvas = __webpack_require__(986); + renderCanvas = __webpack_require__(982); } module.exports = { @@ -160694,7 +160826,7 @@ module.exports = { /***/ }), -/* 985 */ +/* 981 */ /***/ (function(module, exports) { /** @@ -160843,7 +160975,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 986 */ +/* 982 */ /***/ (function(module, exports) { /** @@ -160940,7 +161072,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 987 */ +/* 983 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160949,17 +161081,17 @@ module.exports = ContainerCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(419); + renderWebGL = __webpack_require__(422); } if (true) { - renderCanvas = __webpack_require__(419); + renderCanvas = __webpack_require__(422); } module.exports = { @@ -160971,7 +161103,7 @@ module.exports = { /***/ }), -/* 988 */ +/* 984 */ /***/ (function(module, exports) { /** @@ -161012,7 +161144,7 @@ module.exports = [ /***/ }), -/* 989 */ +/* 985 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161021,17 +161153,17 @@ module.exports = [ * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(990); + renderWebGL = __webpack_require__(986); } if (true) { - renderCanvas = __webpack_require__(991); + renderCanvas = __webpack_require__(987); } module.exports = { @@ -161043,7 +161175,7 @@ module.exports = { /***/ }), -/* 990 */ +/* 986 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161349,7 +161481,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 991 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161358,7 +161490,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -161560,7 +161692,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 992 */ +/* 988 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161569,17 +161701,17 @@ module.exports = DynamicBitmapTextCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(993); + renderWebGL = __webpack_require__(989); } if (true) { - renderCanvas = __webpack_require__(994); + renderCanvas = __webpack_require__(990); } module.exports = { @@ -161591,7 +161723,7 @@ module.exports = { /***/ }), -/* 993 */ +/* 989 */ /***/ (function(module, exports) { /** @@ -161660,13 +161792,13 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 994 */ +/* 990 */ /***/ (function(module, exports) { /***/ }), -/* 995 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161675,20 +161807,20 @@ module.exports = ExternWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(996); + renderWebGL = __webpack_require__(992); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(424); + renderCanvas = __webpack_require__(427); } if (true) { - renderCanvas = __webpack_require__(424); + renderCanvas = __webpack_require__(427); } module.exports = { @@ -161700,7 +161832,7 @@ module.exports = { /***/ }), -/* 996 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162065,7 +162197,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 997 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162074,17 +162206,17 @@ module.exports = GraphicsWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(998); + renderWebGL = __webpack_require__(994); } if (true) { - renderCanvas = __webpack_require__(999); + renderCanvas = __webpack_require__(995); } module.exports = { @@ -162096,7 +162228,7 @@ module.exports = { /***/ }), -/* 998 */ +/* 994 */ /***/ (function(module, exports) { /** @@ -162129,7 +162261,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 999 */ +/* 995 */ /***/ (function(module, exports) { /** @@ -162162,7 +162294,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 1000 */ +/* 996 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162171,17 +162303,17 @@ module.exports = SpriteCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1001); + renderWebGL = __webpack_require__(997); } if (true) { - renderCanvas = __webpack_require__(1002); + renderCanvas = __webpack_require__(998); } module.exports = { @@ -162193,7 +162325,7 @@ module.exports = { /***/ }), -/* 1001 */ +/* 997 */ /***/ (function(module, exports) { /** @@ -162226,7 +162358,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 1002 */ +/* 998 */ /***/ (function(module, exports) { /** @@ -162259,7 +162391,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 1003 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162274,17 +162406,17 @@ module.exports = ImageCanvasRenderer; module.exports = { - GravityWell: __webpack_require__(425), - Particle: __webpack_require__(426), - ParticleEmitter: __webpack_require__(427), + GravityWell: __webpack_require__(428), + Particle: __webpack_require__(429), + ParticleEmitter: __webpack_require__(430), ParticleEmitterManager: __webpack_require__(207), - Zones: __webpack_require__(1008) + Zones: __webpack_require__(1004) }; /***/ }), -/* 1004 */ +/* 1000 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162294,9 +162426,9 @@ module.exports = { */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(348); -var GetEaseFunction = __webpack_require__(90); -var GetFastValue = __webpack_require__(1); +var FloatBetween = __webpack_require__(126); +var GetEaseFunction = __webpack_require__(75); +var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(63); /** @@ -162498,7 +162630,7 @@ var EmitterOp = new Class({ * * @param {number} value - The value of the property. * - * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object. + * @return {this} This Emitter Op object. */ onChange: function (value) { @@ -162515,7 +162647,7 @@ var EmitterOp = new Class({ * @method Phaser.GameObjects.Particles.EmitterOp#setMethods * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object. + * @return {this} This Emitter Op object. */ setMethods: function () { @@ -162875,7 +163007,7 @@ module.exports = EmitterOp; /***/ }), -/* 1005 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162884,17 +163016,17 @@ module.exports = EmitterOp; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1006); + renderWebGL = __webpack_require__(1002); } if (true) { - renderCanvas = __webpack_require__(1007); + renderCanvas = __webpack_require__(1003); } module.exports = { @@ -162906,7 +163038,7 @@ module.exports = { /***/ }), -/* 1006 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163065,7 +163197,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 1007 */ +/* 1003 */ /***/ (function(module, exports) { /** @@ -163188,7 +163320,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 1008 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163203,15 +163335,15 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(428), - EdgeZone: __webpack_require__(429), - RandomZone: __webpack_require__(431) + DeathZone: __webpack_require__(431), + EdgeZone: __webpack_require__(432), + RandomZone: __webpack_require__(434) }; /***/ }), -/* 1009 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163220,17 +163352,17 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1010); + renderWebGL = __webpack_require__(1006); } if (true) { - renderCanvas = __webpack_require__(1011); + renderCanvas = __webpack_require__(1007); } module.exports = { @@ -163242,7 +163374,7 @@ module.exports = { /***/ }), -/* 1010 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163305,7 +163437,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 1011 */ +/* 1007 */ /***/ (function(module, exports) { /** @@ -163338,7 +163470,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 1012 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163347,15 +163479,15 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(1013); -var Extend = __webpack_require__(17); +var RETRO_FONT_CONST = __webpack_require__(1009); +var Extend = __webpack_require__(18); /** * @namespace Phaser.GameObjects.RetroFont * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(1014) }; +var RetroFont = { Parse: __webpack_require__(1010) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -163364,7 +163496,7 @@ module.exports = RetroFont; /***/ }), -/* 1013 */ +/* 1009 */ /***/ (function(module, exports) { /** @@ -163480,7 +163612,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 1014 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163596,7 +163728,206 @@ module.exports = ParseRetroFont; /***/ }), -/* 1015 */ +/* 1011 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); + +if (true) +{ + renderWebGL = __webpack_require__(1012); +} + +if (true) +{ + renderCanvas = __webpack_require__(1013); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 1012 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Utils = __webpack_require__(10); + +/** + * 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 = src.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 alpha = src.alpha; + var getTint = Utils.getTintAppendFloatAlphaAndSwap; + var roundPixels = camera.roundPixels; + + var meshVerticesLength = vertices.length; + var vertexCount = Math.floor(meshVerticesLength * 0.5); + + // Because it's a triangle strip and we don't want lots of degenerate triangles joining things up + 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(); + } + + var debugCallback = src.debugCallback; + var debugVerts = []; + + 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 (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] = getTint(colors[colorIndex], camera.alpha * (alphas[colorIndex] * alpha)); + + colorIndex++; + + if (debugCallback) + { + debugVerts[i + 0] = tx; + debugVerts[i + 1] = ty; + } + } + + if (debugCallback) + { + debugCallback.call(src, src, meshVerticesLength, debugVerts); + } + + pipeline.vertexCount += vertexCount; +}; + +module.exports = RopeWebGLRenderer; + + +/***/ }), +/* 1013 */ +/***/ (function(module, exports) { + +/** + * @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.23.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; + + +/***/ }), +/* 1014 */ /***/ (function(module, exports) { /** @@ -163678,7 +164009,7 @@ module.exports = GetTextSize; /***/ }), -/* 1016 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163687,17 +164018,17 @@ module.exports = GetTextSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1017); + renderWebGL = __webpack_require__(1016); } if (true) { - renderCanvas = __webpack_require__(1018); + renderCanvas = __webpack_require__(1017); } module.exports = { @@ -163709,7 +164040,7 @@ module.exports = { /***/ }), -/* 1017 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163774,7 +164105,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 1018 */ +/* 1017 */ /***/ (function(module, exports) { /** @@ -163812,7 +164143,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 1019 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -163824,7 +164155,7 @@ module.exports = TextCanvasRenderer; var Class = __webpack_require__(0); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(5); -var MeasureText = __webpack_require__(1020); +var MeasureText = __webpack_require__(1019); // Key: [ Object Key, Default Value ] @@ -164865,7 +165196,7 @@ module.exports = TextStyle; /***/ }), -/* 1020 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165000,7 +165331,7 @@ module.exports = MeasureText; /***/ }), -/* 1021 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165009,17 +165340,17 @@ module.exports = MeasureText; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1022); + renderWebGL = __webpack_require__(1021); } if (true) { - renderCanvas = __webpack_require__(1023); + renderCanvas = __webpack_require__(1022); } module.exports = { @@ -165031,7 +165362,7 @@ module.exports = { /***/ }), -/* 1022 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165091,7 +165422,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 1023 */ +/* 1022 */ /***/ (function(module, exports) { /** @@ -165126,7 +165457,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 1024 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165135,17 +165466,17 @@ module.exports = TileSpriteCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1025); + renderWebGL = __webpack_require__(1024); } if (true) { - renderCanvas = __webpack_require__(1026); + renderCanvas = __webpack_require__(1025); } module.exports = { @@ -165157,7 +165488,7 @@ module.exports = { /***/ }), -/* 1025 */ +/* 1024 */ /***/ (function(module, exports) { /** @@ -165193,7 +165524,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 1026 */ +/* 1025 */ /***/ (function(module, exports) { /** @@ -165229,7 +165560,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 1027 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165238,17 +165569,17 @@ module.exports = VideoCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1028); + renderWebGL = __webpack_require__(1027); } if (true) { - renderCanvas = __webpack_require__(1029); + renderCanvas = __webpack_require__(1028); } module.exports = { @@ -165260,7 +165591,7 @@ module.exports = { /***/ }), -/* 1028 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165270,7 +165601,7 @@ module.exports = { */ var FillPathWebGL = __webpack_require__(111); -var StrokePathWebGL = __webpack_require__(75); +var StrokePathWebGL = __webpack_require__(76); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -165338,7 +165669,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 1029 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165348,9 +165679,9 @@ module.exports = ArcWebGLRenderer; */ var DegToRad = __webpack_require__(40); -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -165414,7 +165745,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 1030 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165423,17 +165754,17 @@ module.exports = ArcCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1031); + renderWebGL = __webpack_require__(1030); } if (true) { - renderCanvas = __webpack_require__(1032); + renderCanvas = __webpack_require__(1031); } module.exports = { @@ -165445,7 +165776,7 @@ module.exports = { /***/ }), -/* 1031 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165455,7 +165786,7 @@ module.exports = { */ var FillPathWebGL = __webpack_require__(111); -var StrokePathWebGL = __webpack_require__(75); +var StrokePathWebGL = __webpack_require__(76); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -165523,7 +165854,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 1032 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165532,9 +165863,9 @@ module.exports = CurveWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -165611,7 +165942,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 1033 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165620,17 +165951,17 @@ module.exports = CurveCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1034); + renderWebGL = __webpack_require__(1033); } if (true) { - renderCanvas = __webpack_require__(1035); + renderCanvas = __webpack_require__(1034); } module.exports = { @@ -165642,7 +165973,7 @@ module.exports = { /***/ }), -/* 1034 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165652,7 +165983,7 @@ module.exports = { */ var FillPathWebGL = __webpack_require__(111); -var StrokePathWebGL = __webpack_require__(75); +var StrokePathWebGL = __webpack_require__(76); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -165720,7 +166051,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 1035 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165729,9 +166060,9 @@ module.exports = EllipseWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -165805,7 +166136,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 1036 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165814,17 +166145,17 @@ module.exports = EllipseCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1037); + renderWebGL = __webpack_require__(1036); } if (true) { - renderCanvas = __webpack_require__(1038); + renderCanvas = __webpack_require__(1037); } module.exports = { @@ -165836,7 +166167,7 @@ module.exports = { /***/ }), -/* 1037 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166062,7 +166393,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1038 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166071,9 +166402,9 @@ module.exports = GridWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -166251,7 +166582,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1039 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166260,17 +166591,17 @@ module.exports = GridCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1040); + renderWebGL = __webpack_require__(1039); } if (true) { - renderCanvas = __webpack_require__(1041); + renderCanvas = __webpack_require__(1040); } module.exports = { @@ -166282,7 +166613,7 @@ module.exports = { /***/ }), -/* 1040 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166440,7 +166771,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1041 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166449,8 +166780,8 @@ module.exports = IsoBoxWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); -var SetTransform = __webpack_require__(29); +var FillStyleCanvas = __webpack_require__(42); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -166541,7 +166872,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1042 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166550,17 +166881,17 @@ module.exports = IsoBoxCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1043); + renderWebGL = __webpack_require__(1042); } if (true) { - renderCanvas = __webpack_require__(1044); + renderCanvas = __webpack_require__(1043); } module.exports = { @@ -166572,7 +166903,7 @@ module.exports = { /***/ }), -/* 1043 */ +/* 1042 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166749,7 +167080,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1044 */ +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166758,8 +167089,8 @@ module.exports = IsoTriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); -var SetTransform = __webpack_require__(29); +var FillStyleCanvas = __webpack_require__(42); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -166863,7 +167194,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1045 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166872,17 +167203,17 @@ module.exports = IsoTriangleCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1046); + renderWebGL = __webpack_require__(1045); } if (true) { - renderCanvas = __webpack_require__(1047); + renderCanvas = __webpack_require__(1046); } module.exports = { @@ -166894,7 +167225,7 @@ module.exports = { /***/ }), -/* 1046 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166987,7 +167318,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1047 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166997,7 +167328,7 @@ module.exports = LineWebGLRenderer; */ var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -167044,7 +167375,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1048 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167053,17 +167384,17 @@ module.exports = LineCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1049); + renderWebGL = __webpack_require__(1048); } if (true) { - renderCanvas = __webpack_require__(1050); + renderCanvas = __webpack_require__(1049); } module.exports = { @@ -167075,7 +167406,7 @@ module.exports = { /***/ }), -/* 1049 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167085,7 +167416,7 @@ module.exports = { */ var FillPathWebGL = __webpack_require__(111); -var StrokePathWebGL = __webpack_require__(75); +var StrokePathWebGL = __webpack_require__(76); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -167153,7 +167484,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1050 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167162,9 +167493,9 @@ module.exports = PolygonWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -167238,7 +167569,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1051 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167247,17 +167578,17 @@ module.exports = PolygonCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1052); + renderWebGL = __webpack_require__(1051); } if (true) { - renderCanvas = __webpack_require__(1053); + renderCanvas = __webpack_require__(1052); } module.exports = { @@ -167269,7 +167600,7 @@ module.exports = { /***/ }), -/* 1052 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167278,7 +167609,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StrokePathWebGL = __webpack_require__(75); +var StrokePathWebGL = __webpack_require__(76); var Utils = __webpack_require__(10); /** @@ -167361,7 +167692,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1053 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167370,9 +167701,9 @@ module.exports = RectangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -167435,7 +167766,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1054 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167444,17 +167775,17 @@ module.exports = RectangleCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1055); + renderWebGL = __webpack_require__(1054); } if (true) { - renderCanvas = __webpack_require__(1056); + renderCanvas = __webpack_require__(1055); } module.exports = { @@ -167466,7 +167797,7 @@ module.exports = { /***/ }), -/* 1055 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167476,7 +167807,7 @@ module.exports = { */ var FillPathWebGL = __webpack_require__(111); -var StrokePathWebGL = __webpack_require__(75); +var StrokePathWebGL = __webpack_require__(76); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -167544,7 +167875,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1056 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167553,9 +167884,9 @@ module.exports = StarWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -167629,7 +167960,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1057 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167638,17 +167969,17 @@ module.exports = StarCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1058); + renderWebGL = __webpack_require__(1057); } if (true) { - renderCanvas = __webpack_require__(1059); + renderCanvas = __webpack_require__(1058); } module.exports = { @@ -167660,7 +167991,7 @@ module.exports = { /***/ }), -/* 1058 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167669,7 +168000,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StrokePathWebGL = __webpack_require__(75); +var StrokePathWebGL = __webpack_require__(76); var Utils = __webpack_require__(10); /** @@ -167763,7 +168094,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1059 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167772,9 +168103,9 @@ module.exports = TriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(41); +var FillStyleCanvas = __webpack_require__(42); var LineStyleCanvas = __webpack_require__(57); -var SetTransform = __webpack_require__(29); +var SetTransform = __webpack_require__(30); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -167838,7 +168169,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1060 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167880,7 +168211,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1061 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167914,7 +168245,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1062 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167923,7 +168254,7 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(418); +var DOMElement = __webpack_require__(421); var GameObjectFactory = __webpack_require__(6); /** @@ -168004,7 +168335,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1063 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168073,7 +168404,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1064 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168082,7 +168413,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(420); +var Extern = __webpack_require__(423); var GameObjectFactory = __webpack_require__(6); /** @@ -168115,7 +168446,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1065 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168154,7 +168485,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1066 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168163,7 +168494,7 @@ GameObjectFactory.register('graphics', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Group = __webpack_require__(109); +var Group = __webpack_require__(108); var GameObjectFactory = __webpack_require__(6); /** @@ -168186,7 +168517,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1067 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168195,7 +168526,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(89); +var Image = __webpack_require__(109); var GameObjectFactory = __webpack_require__(6); /** @@ -168228,7 +168559,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1068 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168274,7 +168605,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1069 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168284,7 +168615,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(6); -var PathFollower = __webpack_require__(432); +var PathFollower = __webpack_require__(435); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -168322,7 +168653,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1070 */ +/* 1069 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168361,6 +168692,60 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, }); +/***/ }), +/* 1070 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rope = __webpack_require__(210); +var GameObjectFactory = __webpack_require__(6); + +/** + * 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#rope + * @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 {boolean} [horizontal=true] - Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)? + * @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 (true) +{ + GameObjectFactory.register('rope', function (x, y, texture, frame, points, horizontal, colors, alphas) + { + var rope = new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas); + + this.displayList.add(rope); + + return this.updateList.add(rope); + }); +} + +// 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 + + /***/ }), /* 1071 */ /***/ (function(module, exports, __webpack_require__) { @@ -168372,7 +168757,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, */ var GameObjectFactory = __webpack_require__(6); -var Sprite = __webpack_require__(65); +var Sprite = __webpack_require__(74); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -168418,7 +168803,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); +var BitmapText = __webpack_require__(139); var GameObjectFactory = __webpack_require__(6); /** @@ -168482,7 +168867,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(210); +var Text = __webpack_require__(211); var GameObjectFactory = __webpack_require__(6); /** @@ -168547,7 +168932,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(211); +var TileSprite = __webpack_require__(212); var GameObjectFactory = __webpack_require__(6); /** @@ -168591,7 +168976,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Zone = __webpack_require__(118); +var Zone = __webpack_require__(117); var GameObjectFactory = __webpack_require__(6); /** @@ -168633,23 +169018,22 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(212); +var Video = __webpack_require__(213); var GameObjectFactory = __webpack_require__(6); /** - * Creates a new Image Game Object and adds it to the Scene. + * Creates a new Video 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. + * Note: This method will only be available if the Video Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectFactory#video * @since 3.20.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 {string} [key] - Optional key of the Video this Game Object will play, as stored in the Video Cache. * - * @return {Phaser.GameObjects.Image} The Game Object that was created. + * @return {Phaser.GameObjects.Video} The Game Object that was created. */ GameObjectFactory.register('video', function (x, y, key) { @@ -168680,7 +169064,7 @@ GameObjectFactory.register('video', function (x, y, key) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(433); +var Arc = __webpack_require__(436); var GameObjectFactory = __webpack_require__(6); /** @@ -168754,7 +169138,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph */ var GameObjectFactory = __webpack_require__(6); -var Curve = __webpack_require__(434); +var Curve = __webpack_require__(437); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -168803,7 +169187,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(435); +var Ellipse = __webpack_require__(438); var GameObjectFactory = __webpack_require__(6); /** @@ -168856,7 +169240,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, */ var GameObjectFactory = __webpack_require__(6); -var Grid = __webpack_require__(436); +var Grid = __webpack_require__(439); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -168911,7 +169295,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel */ var GameObjectFactory = __webpack_require__(6); -var IsoBox = __webpack_require__(437); +var IsoBox = __webpack_require__(440); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -168962,7 +169346,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill */ var GameObjectFactory = __webpack_require__(6); -var IsoTriangle = __webpack_require__(438); +var IsoTriangle = __webpack_require__(441); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -169015,7 +169399,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed */ var GameObjectFactory = __webpack_require__(6); -var Line = __webpack_require__(439); +var Line = __webpack_require__(442); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -169066,7 +169450,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, */ var GameObjectFactory = __webpack_require__(6); -var Polygon = __webpack_require__(440); +var Polygon = __webpack_require__(443); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -169119,7 +169503,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp */ var GameObjectFactory = __webpack_require__(6); -var Rectangle = __webpack_require__(445); +var Rectangle = __webpack_require__(448); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -169163,7 +169547,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(446); +var Star = __webpack_require__(449); var GameObjectFactory = __webpack_require__(6); /** @@ -169216,7 +169600,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad */ var GameObjectFactory = __webpack_require__(6); -var Triangle = __webpack_require__(447); +var Triangle = __webpack_require__(450); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -169267,7 +169651,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f */ var Blitter = __webpack_require__(201); -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -169317,7 +169701,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var Container = __webpack_require__(202); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -169366,7 +169750,7 @@ GameObjectCreator.register('container', function (config, addToScene) */ var BitmapText = __webpack_require__(203); -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); @@ -169465,7 +169849,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Group = __webpack_require__(109); +var Group = __webpack_require__(108); /** * Creates a new Group Game Object and returns it. @@ -169497,10 +169881,10 @@ GameObjectCreator.register('group', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(89); +var Image = __webpack_require__(109); /** * Creates a new Image Game Object and returns it. @@ -169549,7 +169933,7 @@ GameObjectCreator.register('image', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var ParticleEmitterManager = __webpack_require__(207); /** @@ -169604,7 +169988,7 @@ GameObjectCreator.register('particles', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var RenderTexture = __webpack_require__(208); @@ -169656,11 +170040,66 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); -var BuildGameObjectAnimation = __webpack_require__(416); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Sprite = __webpack_require__(65); +var GetValue = __webpack_require__(5); +var Rope = __webpack_require__(210); + +/** + * 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 horizontal = GetAdvancedValue(config, 'horizontal', true); + 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, horizontal, 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. + + +/***/ }), +/* 1097 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BuildGameObject = __webpack_require__(29); +var BuildGameObjectAnimation = __webpack_require__(419); +var GameObjectCreator = __webpack_require__(16); +var GetAdvancedValue = __webpack_require__(15); +var Sprite = __webpack_require__(74); /** * Creates a new Sprite Game Object and returns it. @@ -169700,7 +170139,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1097 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169709,8 +170148,8 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(138); -var BuildGameObject = __webpack_require__(30); +var BitmapText = __webpack_require__(139); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(5); @@ -169753,7 +170192,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1098 */ +/* 1099 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169762,10 +170201,10 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(210); +var Text = __webpack_require__(211); /** * Creates a new Text Game Object and returns it. @@ -169840,7 +170279,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1099 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169849,10 +170288,10 @@ GameObjectCreator.register('text', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(211); +var TileSprite = __webpack_require__(212); /** * Creates a new TileSprite Game Object and returns it. @@ -169892,7 +170331,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1100 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169903,7 +170342,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Zone = __webpack_require__(118); +var Zone = __webpack_require__(117); /** * Creates a new Zone Game Object and returns it. @@ -169931,7 +170370,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1101 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169940,10 +170379,10 @@ GameObjectCreator.register('zone', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(212); +var Video = __webpack_require__(213); /** * Creates a new Video Game Object and returns it. @@ -169980,7 +170419,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1102 */ +/* 1103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169989,17 +170428,17 @@ GameObjectCreator.register('video', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1103); + renderWebGL = __webpack_require__(1104); } if (true) { - renderCanvas = __webpack_require__(1104); + renderCanvas = __webpack_require__(1105); } module.exports = { @@ -170011,7 +170450,7 @@ module.exports = { /***/ }), -/* 1103 */ +/* 1104 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170129,7 +170568,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1104 */ +/* 1105 */ /***/ (function(module, exports) { /** @@ -170158,7 +170597,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1105 */ +/* 1106 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170167,17 +170606,17 @@ module.exports = MeshCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1106); + renderWebGL = __webpack_require__(1107); } if (true) { - renderCanvas = __webpack_require__(1107); + renderCanvas = __webpack_require__(1108); } module.exports = { @@ -170189,7 +170628,7 @@ module.exports = { /***/ }), -/* 1106 */ +/* 1107 */ /***/ (function(module, exports) { /** @@ -170273,7 +170712,7 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1107 */ +/* 1108 */ /***/ (function(module, exports) { /** @@ -170302,7 +170741,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1108 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170311,7 +170750,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(139); +var Mesh = __webpack_require__(141); var GameObjectFactory = __webpack_require__(6); /** @@ -170352,7 +170791,7 @@ if (true) /***/ }), -/* 1109 */ +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170361,7 +170800,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(215); +var Quad = __webpack_require__(216); var GameObjectFactory = __webpack_require__(6); /** @@ -170398,7 +170837,7 @@ if (true) /***/ }), -/* 1110 */ +/* 1111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170407,7 +170846,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(216); +var Shader = __webpack_require__(217); var GameObjectFactory = __webpack_require__(6); /** @@ -170439,7 +170878,7 @@ if (true) /***/ }), -/* 1111 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170448,11 +170887,11 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); var GetValue = __webpack_require__(5); -var Mesh = __webpack_require__(139); +var Mesh = __webpack_require__(141); /** * Creates a new Mesh Game Object and returns it. @@ -170494,7 +170933,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1112 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170503,10 +170942,10 @@ GameObjectCreator.register('mesh', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(215); +var Quad = __webpack_require__(216); /** * Creates a new Quad Game Object and returns it. @@ -170544,7 +170983,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1113 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170553,10 +170992,10 @@ GameObjectCreator.register('quad', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(30); +var BuildGameObject = __webpack_require__(29); var GameObjectCreator = __webpack_require__(16); var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(216); +var Shader = __webpack_require__(217); /** * Creates a new Shader Game Object and returns it. @@ -170597,7 +171036,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1114 */ +/* 1115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170607,9 +171046,9 @@ GameObjectCreator.register('shader', function (config, addToScene) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(452); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); +var LightsManager = __webpack_require__(455); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -170713,7 +171152,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1115 */ +/* 1116 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170722,29 +171161,29 @@ module.exports = LightsPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(71); +var Circle = __webpack_require__(70); -Circle.Area = __webpack_require__(1116); -Circle.Circumference = __webpack_require__(286); -Circle.CircumferencePoint = __webpack_require__(158); -Circle.Clone = __webpack_require__(1117); +Circle.Area = __webpack_require__(1117); +Circle.Circumference = __webpack_require__(285); +Circle.CircumferencePoint = __webpack_require__(159); +Circle.Clone = __webpack_require__(1118); 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); +Circle.ContainsPoint = __webpack_require__(1119); +Circle.ContainsRect = __webpack_require__(1120); +Circle.CopyFrom = __webpack_require__(1121); +Circle.Equals = __webpack_require__(1122); +Circle.GetBounds = __webpack_require__(1123); +Circle.GetPoint = __webpack_require__(283); +Circle.GetPoints = __webpack_require__(284); +Circle.Offset = __webpack_require__(1124); +Circle.OffsetPoint = __webpack_require__(1125); +Circle.Random = __webpack_require__(160); module.exports = Circle; /***/ }), -/* 1116 */ +/* 1117 */ /***/ (function(module, exports) { /** @@ -170772,7 +171211,7 @@ module.exports = Area; /***/ }), -/* 1117 */ +/* 1118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170781,7 +171220,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(71); +var Circle = __webpack_require__(70); /** * Creates a new Circle instance based on the values contained in the given source. @@ -170802,7 +171241,7 @@ module.exports = Clone; /***/ }), -/* 1118 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170833,7 +171272,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1119 */ +/* 1120 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170869,7 +171308,7 @@ module.exports = ContainsRect; /***/ }), -/* 1120 */ +/* 1121 */ /***/ (function(module, exports) { /** @@ -170901,7 +171340,7 @@ module.exports = CopyFrom; /***/ }), -/* 1121 */ +/* 1122 */ /***/ (function(module, exports) { /** @@ -170935,7 +171374,7 @@ module.exports = Equals; /***/ }), -/* 1122 */ +/* 1123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170975,7 +171414,7 @@ module.exports = GetBounds; /***/ }), -/* 1123 */ +/* 1124 */ /***/ (function(module, exports) { /** @@ -171010,7 +171449,7 @@ module.exports = Offset; /***/ }), -/* 1124 */ +/* 1125 */ /***/ (function(module, exports) { /** @@ -171044,7 +171483,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1125 */ +/* 1126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171053,29 +171492,29 @@ module.exports = OffsetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(107); +var Ellipse = __webpack_require__(106); -Ellipse.Area = __webpack_require__(1126); -Ellipse.Circumference = __webpack_require__(423); +Ellipse.Area = __webpack_require__(1127); +Ellipse.Circumference = __webpack_require__(426); 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); +Ellipse.Clone = __webpack_require__(1128); +Ellipse.Contains = __webpack_require__(107); +Ellipse.ContainsPoint = __webpack_require__(1129); +Ellipse.ContainsRect = __webpack_require__(1130); +Ellipse.CopyFrom = __webpack_require__(1131); +Ellipse.Equals = __webpack_require__(1132); +Ellipse.GetBounds = __webpack_require__(1133); +Ellipse.GetPoint = __webpack_require__(424); +Ellipse.GetPoints = __webpack_require__(425); +Ellipse.Offset = __webpack_require__(1134); +Ellipse.OffsetPoint = __webpack_require__(1135); +Ellipse.Random = __webpack_require__(168); module.exports = Ellipse; /***/ }), -/* 1126 */ +/* 1127 */ /***/ (function(module, exports) { /** @@ -171109,7 +171548,7 @@ module.exports = Area; /***/ }), -/* 1127 */ +/* 1128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171118,7 +171557,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(107); +var Ellipse = __webpack_require__(106); /** * Creates a new Ellipse instance based on the values contained in the given source. @@ -171139,7 +171578,7 @@ module.exports = Clone; /***/ }), -/* 1128 */ +/* 1129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171148,7 +171587,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(108); +var Contains = __webpack_require__(107); /** * Check to see if the Ellipse contains the given Point object. @@ -171170,7 +171609,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1129 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171179,7 +171618,7 @@ module.exports = ContainsPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(108); +var Contains = __webpack_require__(107); /** * Check to see if the Ellipse contains all four points of the given Rectangle object. @@ -171206,7 +171645,7 @@ module.exports = ContainsRect; /***/ }), -/* 1130 */ +/* 1131 */ /***/ (function(module, exports) { /** @@ -171238,7 +171677,7 @@ module.exports = CopyFrom; /***/ }), -/* 1131 */ +/* 1132 */ /***/ (function(module, exports) { /** @@ -171273,7 +171712,7 @@ module.exports = Equals; /***/ }), -/* 1132 */ +/* 1133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171313,7 +171752,7 @@ module.exports = GetBounds; /***/ }), -/* 1133 */ +/* 1134 */ /***/ (function(module, exports) { /** @@ -171348,7 +171787,7 @@ module.exports = Offset; /***/ }), -/* 1134 */ +/* 1135 */ /***/ (function(module, exports) { /** @@ -171382,7 +171821,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1135 */ +/* 1136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171393,7 +171832,7 @@ module.exports = OffsetPoint; */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(217); +var CircleToCircle = __webpack_require__(218); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -171476,7 +171915,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1136 */ +/* 1137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171486,8 +171925,8 @@ module.exports = GetCircleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(219); -var CircleToRectangle = __webpack_require__(218); +var GetLineToCircle = __webpack_require__(220); +var CircleToRectangle = __webpack_require__(219); /** * Checks for intersection between a circle and a rectangle, @@ -171526,7 +171965,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1137 */ +/* 1138 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171536,7 +171975,7 @@ module.exports = GetCircleToRectangle; */ var Rectangle = __webpack_require__(11); -var RectangleToRectangle = __webpack_require__(140); +var RectangleToRectangle = __webpack_require__(142); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -171575,7 +172014,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1138 */ +/* 1139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171585,8 +172024,8 @@ module.exports = GetRectangleIntersection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(221); -var RectangleToRectangle = __webpack_require__(140); +var GetLineToRectangle = __webpack_require__(222); +var RectangleToRectangle = __webpack_require__(142); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -171626,7 +172065,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1139 */ +/* 1140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171636,8 +172075,8 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(456); -var GetLineToRectangle = __webpack_require__(221); +var RectangleToTriangle = __webpack_require__(459); +var GetLineToRectangle = __webpack_require__(222); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -171674,7 +172113,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1140 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171684,8 +172123,8 @@ module.exports = GetRectangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(219); -var TriangleToCircle = __webpack_require__(458); +var GetLineToCircle = __webpack_require__(220); +var TriangleToCircle = __webpack_require__(461); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -171723,7 +172162,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1141 */ +/* 1142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171733,8 +172172,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(461); -var GetTriangleToLine = __webpack_require__(459); +var TriangleToTriangle = __webpack_require__(464); +var GetTriangleToLine = __webpack_require__(462); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -171772,7 +172211,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1142 */ +/* 1143 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171781,7 +172220,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(463); +var PointToLine = __webpack_require__(466); /** * Checks if a Point is located on the given line segment. @@ -171813,7 +172252,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1143 */ +/* 1144 */ /***/ (function(module, exports) { /** @@ -171853,7 +172292,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1144 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171864,40 +172303,41 @@ module.exports = RectangleToValues; var Line = __webpack_require__(61); -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.Angle = __webpack_require__(91); +Line.BresenhamPoints = __webpack_require__(306); +Line.CenterOn = __webpack_require__(1146); +Line.Clone = __webpack_require__(1147); +Line.CopyFrom = __webpack_require__(1148); +Line.Equals = __webpack_require__(1149); +Line.Extend = __webpack_require__(1150); +Line.GetEasedPoints = __webpack_require__(1151); +Line.GetMidPoint = __webpack_require__(1152); +Line.GetNearestPoint = __webpack_require__(1153); +Line.GetNormal = __webpack_require__(1154); +Line.GetPoint = __webpack_require__(293); +Line.GetPoints = __webpack_require__(163); +Line.GetShortestDistance = __webpack_require__(1155); +Line.Height = __webpack_require__(1156); 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); +Line.NormalAngle = __webpack_require__(467); +Line.NormalX = __webpack_require__(1157); +Line.NormalY = __webpack_require__(1158); +Line.Offset = __webpack_require__(1159); +Line.PerpSlope = __webpack_require__(1160); +Line.Random = __webpack_require__(164); +Line.ReflectAngle = __webpack_require__(1161); +Line.Rotate = __webpack_require__(1162); +Line.RotateAroundPoint = __webpack_require__(1163); +Line.RotateAroundXY = __webpack_require__(224); +Line.SetToAngle = __webpack_require__(1164); +Line.Slope = __webpack_require__(1165); +Line.Width = __webpack_require__(1166); module.exports = Line; /***/ }), -/* 1145 */ +/* 1146 */ /***/ (function(module, exports) { /** @@ -171937,7 +172377,7 @@ module.exports = CenterOn; /***/ }), -/* 1146 */ +/* 1147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171967,7 +172407,7 @@ module.exports = Clone; /***/ }), -/* 1147 */ +/* 1148 */ /***/ (function(module, exports) { /** @@ -171998,7 +172438,7 @@ module.exports = CopyFrom; /***/ }), -/* 1148 */ +/* 1149 */ /***/ (function(module, exports) { /** @@ -172032,7 +172472,7 @@ module.exports = Equals; /***/ }), -/* 1149 */ +/* 1150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172090,7 +172530,127 @@ module.exports = Extend; /***/ }), -/* 1150 */ +/* 1151 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DistanceBetweenPoints = __webpack_require__(337); +var GetEaseFunction = __webpack_require__(75); +var Point = __webpack_require__(4); + +/** + * Returns an array of `quantity` Points where each point is taken from the given Line, + * spaced out according to the ease function specified. + * + * ```javascript + * const line = new Phaser.Geom.Line(100, 300, 700, 300); + * const points = Phaser.Geom.Line.GetEasedPoints(line, 'sine.out', 32) + * ``` + * + * In the above example, the `points` array will contain 32 points spread-out across + * the length of `line`, where the position of each point is determined by the `Sine.out` + * ease function. + * + * You can optionally provide a collinear threshold. In this case, the resulting points + * are checked against each other, and if they are `< collinearThreshold` distance apart, + * they are dropped from the results. This can help avoid lots of clustered points at + * far ends of the line with tightly-packed eases such as Quartic. Leave the value set + * to zero to skip this check. + * + * Note that if you provide a collinear threshold, the resulting array may not always + * contain `quantity` points. + * + * @function Phaser.Geom.Line.GetEasedPoints + * @since 3.23.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line object. + * @param {(string|function)} ease - The ease to use. This can be either a string from the EaseMap, or a custom function. + * @param {integer} quantity - The number of points to return. Note that if you provide a `collinearThreshold`, the resulting array may not always contain this number of points. + * @param {number} [collinearThreshold=0] - An optional threshold. The final array is reduced so that each point is spaced out at least this distance apart. This helps reduce clustering in noisey eases. + * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. + * + * @return {Phaser.Geom.Point[]} An array of Geom.Points containing the coordinates of the points on the line. + */ +var GetEasedPoints = function (line, ease, quantity, collinearThreshold, easeParams) +{ + if (collinearThreshold === undefined) { collinearThreshold = 0; } + if (easeParams === undefined) { easeParams = []; } + + var results = []; + + var x1 = line.x1; + var y1 = line.y1; + + var spaceX = line.x2 - x1; + var spaceY = line.y2 - y1; + + var easeFunc = GetEaseFunction(ease, easeParams); + + var i; + var v; + var q = quantity - 1; + + for (i = 0; i < q; i++) + { + v = easeFunc(i / q); + + results.push(new Point(x1 + (spaceX * v), y1 + (spaceY * v))); + } + + // Always include the end of the line + v = easeFunc(1); + + results.push(new Point(x1 + (spaceX * v), y1 + (spaceY * v))); + + // Remove collinear parts + if (collinearThreshold > 0) + { + var prevPoint = results[0]; + + // Store the new results here + var sortedResults = [ prevPoint ]; + + for (i = 1; i < results.length - 1; i++) + { + var point = results[i]; + + if (DistanceBetweenPoints(prevPoint, point) >= collinearThreshold) + { + sortedResults.push(point); + prevPoint = point; + } + } + + // Top and tail + var endPoint = results[results.length - 1]; + + if (DistanceBetweenPoints(prevPoint, endPoint) < collinearThreshold) + { + sortedResults.pop(); + } + + sortedResults.push(endPoint); + + return sortedResults; + } + else + { + return results; + } +}; + +module.exports = GetEasedPoints; + + +/***/ }), +/* 1152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172128,7 +172688,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1151 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172183,7 +172743,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1152 */ +/* 1154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172192,8 +172752,8 @@ module.exports = GetNearestPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(94); +var MATH_CONST = __webpack_require__(14); +var Angle = __webpack_require__(91); var Point = __webpack_require__(4); /** @@ -172227,7 +172787,7 @@ module.exports = GetNormal; /***/ }), -/* 1153 */ +/* 1155 */ /***/ (function(module, exports) { /** @@ -172274,7 +172834,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1154 */ +/* 1156 */ /***/ (function(module, exports) { /** @@ -172302,7 +172862,7 @@ module.exports = Height; /***/ }), -/* 1155 */ +/* 1157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172311,18 +172871,18 @@ module.exports = Height; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(94); +var MATH_CONST = __webpack_require__(14); +var Angle = __webpack_require__(91); /** - * [description] + * Returns the x component of the normal vector of the given line. * * @function Phaser.Geom.Line.NormalX * @since 3.0.0 * * @param {Phaser.Geom.Line} line - The Line object to get the normal value from. * - * @return {number} [description] + * @return {number} The x component of the normal vector of the line. */ var NormalX = function (line) { @@ -172333,7 +172893,7 @@ module.exports = NormalX; /***/ }), -/* 1156 */ +/* 1158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172342,8 +172902,8 @@ module.exports = NormalX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); -var Angle = __webpack_require__(94); +var MATH_CONST = __webpack_require__(14); +var Angle = __webpack_require__(91); /** * The Y value of the normal of the given line. @@ -172365,7 +172925,7 @@ module.exports = NormalY; /***/ }), -/* 1157 */ +/* 1159 */ /***/ (function(module, exports) { /** @@ -172403,7 +172963,7 @@ module.exports = Offset; /***/ }), -/* 1158 */ +/* 1160 */ /***/ (function(module, exports) { /** @@ -172431,7 +172991,7 @@ module.exports = PerpSlope; /***/ }), -/* 1159 */ +/* 1161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172440,8 +173000,8 @@ module.exports = PerpSlope; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(94); -var NormalAngle = __webpack_require__(464); +var Angle = __webpack_require__(91); +var NormalAngle = __webpack_require__(467); /** * Calculate the reflected angle between two lines. @@ -172465,7 +173025,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1160 */ +/* 1162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172474,7 +173034,7 @@ module.exports = ReflectAngle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(223); +var RotateAroundXY = __webpack_require__(224); /** * Rotate a line around its midpoint by the given angle in radians. @@ -172501,7 +173061,7 @@ module.exports = Rotate; /***/ }), -/* 1161 */ +/* 1163 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172510,7 +173070,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(223); +var RotateAroundXY = __webpack_require__(224); /** * Rotate a line around a point by the given angle in radians. @@ -172535,7 +173095,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1162 */ +/* 1164 */ /***/ (function(module, exports) { /** @@ -172575,7 +173135,7 @@ module.exports = SetToAngle; /***/ }), -/* 1163 */ +/* 1165 */ /***/ (function(module, exports) { /** @@ -172603,7 +173163,7 @@ module.exports = Slope; /***/ }), -/* 1164 */ +/* 1166 */ /***/ (function(module, exports) { /** @@ -172631,7 +173191,7 @@ module.exports = Width; /***/ }), -/* 1165 */ +/* 1167 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172642,27 +173202,27 @@ module.exports = Width; var Point = __webpack_require__(4); -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); +Point.Ceil = __webpack_require__(1168); +Point.Clone = __webpack_require__(1169); +Point.CopyFrom = __webpack_require__(1170); +Point.Equals = __webpack_require__(1171); +Point.Floor = __webpack_require__(1172); +Point.GetCentroid = __webpack_require__(1173); +Point.GetMagnitude = __webpack_require__(468); +Point.GetMagnitudeSq = __webpack_require__(469); +Point.GetRectangleFromPoints = __webpack_require__(1174); +Point.Interpolate = __webpack_require__(1175); +Point.Invert = __webpack_require__(1176); +Point.Negative = __webpack_require__(1177); +Point.Project = __webpack_require__(1178); +Point.ProjectUnit = __webpack_require__(1179); +Point.SetMagnitude = __webpack_require__(1180); module.exports = Point; /***/ }), -/* 1166 */ +/* 1168 */ /***/ (function(module, exports) { /** @@ -172692,7 +173252,7 @@ module.exports = Ceil; /***/ }), -/* 1167 */ +/* 1169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172722,7 +173282,7 @@ module.exports = Clone; /***/ }), -/* 1168 */ +/* 1170 */ /***/ (function(module, exports) { /** @@ -172753,7 +173313,7 @@ module.exports = CopyFrom; /***/ }), -/* 1169 */ +/* 1171 */ /***/ (function(module, exports) { /** @@ -172782,7 +173342,7 @@ module.exports = Equals; /***/ }), -/* 1170 */ +/* 1172 */ /***/ (function(module, exports) { /** @@ -172812,7 +173372,7 @@ module.exports = Floor; /***/ }), -/* 1171 */ +/* 1173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172832,10 +173392,10 @@ var Point = __webpack_require__(4); * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point[]} points - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Types.Math.Vector2Like[]} points - An array of Vector2Like objects to get the geometric center of. + * @param {Phaser.Geom.Point} [out] - A Point object to store the output coordinates in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object representing the geometric center of the given points. */ var GetCentroid = function (points, out) { @@ -172876,7 +173436,7 @@ module.exports = GetCentroid; /***/ }), -/* 1172 */ +/* 1174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172895,10 +173455,10 @@ var Rectangle = __webpack_require__(11); * * @generic {Phaser.Geom.Rectangle} O - [out,$return] * - * @param {Phaser.Geom.Point[]} points - [description] - * @param {Phaser.Geom.Rectangle} [out] - [description] + * @param {Phaser.Types.Math.Vector2Like[]} points - An array of Vector2Like objects to get the AABB from. + * @param {Phaser.Geom.Rectangle} [out] - A Rectangle object to store the results in. If not given, a new Rectangle instance is created. * - * @return {Phaser.Geom.Rectangle} [description] + * @return {Phaser.Geom.Rectangle} A Rectangle object holding the AABB values for the given points. */ var GetRectangleFromPoints = function (points, out) { @@ -172946,7 +173506,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1173 */ +/* 1175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172958,7 +173518,7 @@ module.exports = GetRectangleFromPoints; var Point = __webpack_require__(4); /** - * [description] + * Returns the linear interpolation point between the two given points, based on `t`. * * @function Phaser.Geom.Point.Interpolate * @since 3.0.0 @@ -172987,7 +173547,7 @@ module.exports = Interpolate; /***/ }), -/* 1174 */ +/* 1176 */ /***/ (function(module, exports) { /** @@ -173017,7 +173577,7 @@ module.exports = Invert; /***/ }), -/* 1175 */ +/* 1177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173052,7 +173612,7 @@ module.exports = Negative; /***/ }), -/* 1176 */ +/* 1178 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173062,21 +173622,22 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(466); +var GetMagnitudeSq = __webpack_require__(469); /** - * [description] + * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the + * orthogonal projection of `pointA` onto a straight line paralle to `pointB`. * * @function Phaser.Geom.Point.Project * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point} pointA - [description] - * @param {Phaser.Geom.Point} pointB - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Point} pointA - Point A, to be projected onto Point B. + * @param {Phaser.Geom.Point} pointB - Point B, to have Point A projected upon it. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of the vector projection of `pointA` onto `pointB`. */ var Project = function (pointA, pointB, out) { @@ -173098,7 +173659,7 @@ module.exports = Project; /***/ }), -/* 1177 */ +/* 1179 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173110,18 +173671,19 @@ module.exports = Project; var Point = __webpack_require__(4); /** - * [description] + * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the + * orthogonal projection of `pointA` onto a straight line paralle to `pointB`. * * @function Phaser.Geom.Point.ProjectUnit * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point} pointA - [description] - * @param {Phaser.Geom.Point} pointB - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Point} pointA - Point A, to be projected onto Point B. Must be a normalized point with a magnitude of 1. + * @param {Phaser.Geom.Point} pointB - Point B, to have Point A projected upon it. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A unit Point object holding the coordinates of the vector projection of `pointA` onto `pointB`. */ var ProjectUnit = function (pointA, pointB, out) { @@ -173142,7 +173704,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1178 */ +/* 1180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173151,7 +173713,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(465); +var GetMagnitude = __webpack_require__(468); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -173186,7 +173748,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1179 */ +/* 1181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173195,23 +173757,23 @@ module.exports = SetMagnitude; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(213); +var Polygon = __webpack_require__(214); -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); +Polygon.Clone = __webpack_require__(1182); +Polygon.Contains = __webpack_require__(215); +Polygon.ContainsPoint = __webpack_require__(1183); +Polygon.GetAABB = __webpack_require__(444); +Polygon.GetNumberArray = __webpack_require__(1184); +Polygon.GetPoints = __webpack_require__(445); +Polygon.Perimeter = __webpack_require__(446); +Polygon.Reverse = __webpack_require__(1185); +Polygon.Smooth = __webpack_require__(447); module.exports = Polygon; /***/ }), -/* 1180 */ +/* 1182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173220,7 +173782,7 @@ module.exports = Polygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(213); +var Polygon = __webpack_require__(214); /** * Create a new polygon which is a copy of the specified polygon @@ -173241,7 +173803,7 @@ module.exports = Clone; /***/ }), -/* 1181 */ +/* 1183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173250,18 +173812,18 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(214); +var Contains = __webpack_require__(215); /** - * [description] + * Checks the given Point again the Polygon to see if the Point lays within its vertices. * * @function Phaser.Geom.Polygon.ContainsPoint * @since 3.0.0 * - * @param {Phaser.Geom.Polygon} polygon - [description] - * @param {Phaser.Geom.Point} point - [description] + * @param {Phaser.Geom.Polygon} polygon - The Polygon to check. + * @param {Phaser.Geom.Point} point - The Point to check if it's within the Polygon. * - * @return {boolean} [description] + * @return {boolean} `true` if the Point is within the Polygon, otherwise `false`. */ var ContainsPoint = function (polygon, point) { @@ -173272,7 +173834,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1182 */ +/* 1184 */ /***/ (function(module, exports) { /** @@ -173315,7 +173877,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1183 */ +/* 1185 */ /***/ (function(module, exports) { /** @@ -173347,7 +173909,7 @@ module.exports = Reverse; /***/ }), -/* 1184 */ +/* 1186 */ /***/ (function(module, exports) { /** @@ -173375,7 +173937,7 @@ module.exports = Area; /***/ }), -/* 1185 */ +/* 1187 */ /***/ (function(module, exports) { /** @@ -173408,7 +173970,7 @@ module.exports = Ceil; /***/ }), -/* 1186 */ +/* 1188 */ /***/ (function(module, exports) { /** @@ -173443,7 +174005,7 @@ module.exports = CeilAll; /***/ }), -/* 1187 */ +/* 1189 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173473,7 +174035,7 @@ module.exports = Clone; /***/ }), -/* 1188 */ +/* 1190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173482,7 +174044,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(53); +var Contains = __webpack_require__(54); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. @@ -173504,7 +174066,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1189 */ +/* 1191 */ /***/ (function(module, exports) { /** @@ -173535,7 +174097,7 @@ module.exports = CopyFrom; /***/ }), -/* 1190 */ +/* 1192 */ /***/ (function(module, exports) { /** @@ -173569,7 +174131,7 @@ module.exports = Equals; /***/ }), -/* 1191 */ +/* 1193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173578,7 +174140,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(224); +var GetAspectRatio = __webpack_require__(225); /** * Adjusts the target rectangle, changing its width, height and position, @@ -173622,7 +174184,7 @@ module.exports = FitInside; /***/ }), -/* 1192 */ +/* 1194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173631,7 +174193,7 @@ module.exports = FitInside; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(224); +var GetAspectRatio = __webpack_require__(225); /** * Adjusts the target rectangle, changing its width, height and position, @@ -173675,7 +174237,7 @@ module.exports = FitOutside; /***/ }), -/* 1193 */ +/* 1195 */ /***/ (function(module, exports) { /** @@ -173708,7 +174270,7 @@ module.exports = Floor; /***/ }), -/* 1194 */ +/* 1196 */ /***/ (function(module, exports) { /** @@ -173743,7 +174305,50 @@ module.exports = FloorAll; /***/ }), -/* 1195 */ +/* 1197 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(11); + +/** + * Create the smallest Rectangle containing two coordinate pairs. + * + * @function Phaser.Geom.Rectangle.FromXY + * @since 3.23.0 + * + * @generic {Phaser.Geom.Rectangle} O - [out,$return] + * + * @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. + * @param {Phaser.Geom.Rectangle} [out] - Optional Rectangle to adjust. + * + * @return {Phaser.Geom.Rectangle} The adjusted `out` Rectangle, or a new Rectangle if none was provided. + */ +var FromXY = function (x1, y1, x2, y2, out) +{ + if (out === undefined) { out = new Rectangle(); } + + return out.setTo( + Math.min(x1, x2), + Math.min(y1, y2), + Math.abs(x1 - x2), + Math.abs(y1 - y2) + ); +}; + +module.exports = FromXY; + + +/***/ }), +/* 1198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173781,7 +174386,7 @@ module.exports = GetCenter; /***/ }), -/* 1196 */ +/* 1199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173794,18 +174399,18 @@ var Point = __webpack_require__(4); /** - * The size of the Rectangle object, expressed as a Point object - * with the values of the width and height properties. + * Returns the size of the Rectangle, expressed as a Point object. + * With the value of the `width` as the `x` property and the `height` as the `y` property. * * @function Phaser.Geom.Rectangle.GetSize * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the size from. + * @param {(Phaser.Geom.Point|object)} [out] - The Point object to store the size in. If not given, a new Point instance is created. * - * @return {(Phaser.Geom.Point|object)} [description] + * @return {(Phaser.Geom.Point|object)} A Point object where `x` holds the width and `y` holds the height of the Rectangle. */ var GetSize = function (rect, out) { @@ -173821,7 +174426,7 @@ module.exports = GetSize; /***/ }), -/* 1197 */ +/* 1200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173830,7 +174435,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(178); +var CenterOn = __webpack_require__(179); /** @@ -173863,7 +174468,7 @@ module.exports = Inflate; /***/ }), -/* 1198 */ +/* 1201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173873,7 +174478,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(11); -var Intersects = __webpack_require__(140); +var Intersects = __webpack_require__(142); /** * Takes two Rectangles and first checks to see if they intersect. @@ -173914,7 +174519,7 @@ module.exports = Intersection; /***/ }), -/* 1199 */ +/* 1202 */ /***/ (function(module, exports) { /** @@ -173963,7 +174568,7 @@ module.exports = MergePoints; /***/ }), -/* 1200 */ +/* 1203 */ /***/ (function(module, exports) { /** @@ -174010,7 +174615,7 @@ module.exports = MergeRect; /***/ }), -/* 1201 */ +/* 1204 */ /***/ (function(module, exports) { /** @@ -174054,7 +174659,7 @@ module.exports = MergeXY; /***/ }), -/* 1202 */ +/* 1205 */ /***/ (function(module, exports) { /** @@ -174089,7 +174694,7 @@ module.exports = Offset; /***/ }), -/* 1203 */ +/* 1206 */ /***/ (function(module, exports) { /** @@ -174123,7 +174728,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1204 */ +/* 1207 */ /***/ (function(module, exports) { /** @@ -174157,7 +174762,7 @@ module.exports = Overlaps; /***/ }), -/* 1205 */ +/* 1208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174170,18 +174775,18 @@ var Point = __webpack_require__(4); var DegToRad = __webpack_require__(40); /** - * [description] + * Returns a Point from the perimeter of a Rectangle based on the given angle. * * @function Phaser.Geom.Rectangle.PerimeterPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rectangle - [description] - * @param {integer} angle - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {integer} angle - The angle of the point, in degrees. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of the Rectangle perimeter. */ var PerimeterPoint = function (rectangle, angle, out) { @@ -174214,7 +174819,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1206 */ +/* 1209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174224,7 +174829,7 @@ module.exports = PerimeterPoint; */ var Between = __webpack_require__(183); -var ContainsRect = __webpack_require__(468); +var ContainsRect = __webpack_require__(471); var Point = __webpack_require__(4); /** @@ -174285,7 +174890,7 @@ module.exports = RandomOutside; /***/ }), -/* 1207 */ +/* 1210 */ /***/ (function(module, exports) { /** @@ -174314,7 +174919,7 @@ module.exports = SameDimensions; /***/ }), -/* 1208 */ +/* 1211 */ /***/ (function(module, exports) { /** @@ -174353,7 +174958,7 @@ module.exports = Scale; /***/ }), -/* 1209 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174362,38 +174967,38 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(76); +var Triangle = __webpack_require__(77); -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); +Triangle.Area = __webpack_require__(1213); +Triangle.BuildEquilateral = __webpack_require__(1214); +Triangle.BuildFromPolygon = __webpack_require__(1215); +Triangle.BuildRight = __webpack_require__(1216); +Triangle.CenterOn = __webpack_require__(1217); +Triangle.Centroid = __webpack_require__(472); +Triangle.CircumCenter = __webpack_require__(1218); +Triangle.CircumCircle = __webpack_require__(1219); +Triangle.Clone = __webpack_require__(1220); +Triangle.Contains = __webpack_require__(89); +Triangle.ContainsArray = __webpack_require__(223); +Triangle.ContainsPoint = __webpack_require__(1221); +Triangle.CopyFrom = __webpack_require__(1222); +Triangle.Decompose = __webpack_require__(465); +Triangle.Equals = __webpack_require__(1223); +Triangle.GetPoint = __webpack_require__(451); +Triangle.GetPoints = __webpack_require__(452); +Triangle.InCenter = __webpack_require__(474); +Triangle.Perimeter = __webpack_require__(1224); +Triangle.Offset = __webpack_require__(473); +Triangle.Random = __webpack_require__(169); +Triangle.Rotate = __webpack_require__(1225); +Triangle.RotateAroundPoint = __webpack_require__(1226); +Triangle.RotateAroundXY = __webpack_require__(226); module.exports = Triangle; /***/ }), -/* 1210 */ +/* 1213 */ /***/ (function(module, exports) { /** @@ -174432,7 +175037,7 @@ module.exports = Area; /***/ }), -/* 1211 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174441,7 +175046,7 @@ module.exports = Area; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(76); +var Triangle = __webpack_require__(77); /** * 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). @@ -174476,7 +175081,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1212 */ +/* 1215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174485,11 +175090,12 @@ module.exports = BuildEquilateral; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var EarCut = __webpack_require__(72); -var Triangle = __webpack_require__(76); +var EarCut = __webpack_require__(71); +var Triangle = __webpack_require__(77); /** - * [description] + * Takes an array of vertex coordinates, and optionally an array of hole indices, then returns an array + * of Triangle instances, where the given vertices have been decomposed into a series of triangles. * * @function Phaser.Geom.Triangle.BuildFromPolygon * @since 3.0.0 @@ -174498,11 +175104,11 @@ var Triangle = __webpack_require__(76); * * @param {array} data - A flat array of vertex coordinates like [x0,y0, x1,y1, x2,y2, ...] * @param {array} [holes=null] - An array of hole indices if any (e.g. [5, 8] for a 12-vertex input would mean one hole with vertices 5–7 and another with 8–11). - * @param {number} [scaleX=1] - [description] - * @param {number} [scaleY=1] - [description] - * @param {(array|Phaser.Geom.Triangle[])} [out] - [description] + * @param {number} [scaleX=1] - Horizontal scale factor to multiply the resulting points by. + * @param {number} [scaleY=1] - Vertical scale factor to multiply the resulting points by. + * @param {(array|Phaser.Geom.Triangle[])} [out] - An array to store the resulting Triangle instances in. If not provided, a new array is created. * - * @return {(array|Phaser.Geom.Triangle[])} [description] + * @return {(array|Phaser.Geom.Triangle[])} An array of Triangle instances, where each triangle is based on the decomposed vertices data. */ var BuildFromPolygon = function (data, holes, scaleX, scaleY, out) { @@ -174551,7 +175157,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1213 */ +/* 1216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174560,7 +175166,7 @@ module.exports = BuildFromPolygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(76); +var Triangle = __webpack_require__(77); // 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) @@ -174600,7 +175206,7 @@ module.exports = BuildRight; /***/ }), -/* 1214 */ +/* 1217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174609,8 +175215,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(469); -var Offset = __webpack_require__(470); +var Centroid = __webpack_require__(472); +var Offset = __webpack_require__(473); /** * @callback CenterFunction @@ -174653,7 +175259,7 @@ module.exports = CenterOn; /***/ }), -/* 1215 */ +/* 1218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174697,10 +175303,10 @@ function det (m00, m01, m10, m11) * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Geom.Triangle} triangle - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the circumcenter of. + * @param {Phaser.Math.Vector2} [out] - The Vector2 object to store the position in. If not given, a new Vector2 instance is created. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} A Vector2 object holding the coordinates of the circumcenter of the Triangle. */ var CircumCenter = function (triangle, out) { @@ -174729,7 +175335,7 @@ module.exports = CircumCenter; /***/ }), -/* 1216 */ +/* 1219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174738,7 +175344,7 @@ module.exports = CircumCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(71); +var Circle = __webpack_require__(70); // Adapted from https://gist.github.com/mutoo/5617691 @@ -174812,7 +175418,7 @@ module.exports = CircumCircle; /***/ }), -/* 1217 */ +/* 1220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174821,7 +175427,7 @@ module.exports = CircumCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Triangle = __webpack_require__(76); +var Triangle = __webpack_require__(77); /** * Clones a Triangle object. @@ -174842,7 +175448,7 @@ module.exports = Clone; /***/ }), -/* 1218 */ +/* 1221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174851,7 +175457,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(92); +var Contains = __webpack_require__(89); /** * Tests if a triangle contains a point. @@ -174873,7 +175479,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1219 */ +/* 1222 */ /***/ (function(module, exports) { /** @@ -174904,7 +175510,7 @@ module.exports = CopyFrom; /***/ }), -/* 1220 */ +/* 1223 */ /***/ (function(module, exports) { /** @@ -174940,7 +175546,7 @@ module.exports = Equals; /***/ }), -/* 1221 */ +/* 1224 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174951,17 +175557,16 @@ module.exports = Equals; var Length = __webpack_require__(62); -// The 2D area of a triangle. The area value is always non-negative. - /** * Gets the length of the perimeter of the given triangle. + * Calculated by adding together the length of each of the three sides. * * @function Phaser.Geom.Triangle.Perimeter * @since 3.0.0 * - * @param {Phaser.Geom.Triangle} triangle - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the length from. * - * @return {number} [description] + * @return {number} The length of the Triangle. */ var Perimeter = function (triangle) { @@ -174976,7 +175581,7 @@ module.exports = Perimeter; /***/ }), -/* 1222 */ +/* 1225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174985,8 +175590,8 @@ module.exports = Perimeter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(225); -var InCenter = __webpack_require__(471); +var RotateAroundXY = __webpack_require__(226); +var InCenter = __webpack_require__(474); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -175012,7 +175617,7 @@ module.exports = Rotate; /***/ }), -/* 1223 */ +/* 1226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175021,7 +175626,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(225); +var RotateAroundXY = __webpack_require__(226); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -175046,7 +175651,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1224 */ +/* 1227 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175056,7 +175661,7 @@ module.exports = RotateAroundPoint; */ var CONST = __webpack_require__(192); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Input @@ -175064,16 +175669,16 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(472), + CreateInteractiveObject: __webpack_require__(475), 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) + Gamepad: __webpack_require__(1228), + InputManager: __webpack_require__(390), + InputPlugin: __webpack_require__(1240), + InputPluginCache: __webpack_require__(143), + Keyboard: __webpack_require__(1242), + Mouse: __webpack_require__(1259), + Pointer: __webpack_require__(393), + Touch: __webpack_require__(1260) }; @@ -175084,7 +175689,7 @@ module.exports = Input; /***/ }), -/* 1225 */ +/* 1228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175099,18 +175704,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(473), - Button: __webpack_require__(474), - Events: __webpack_require__(226), - Gamepad: __webpack_require__(475), - GamepadPlugin: __webpack_require__(1232), + Axis: __webpack_require__(476), + Button: __webpack_require__(477), + Events: __webpack_require__(227), + Gamepad: __webpack_require__(478), + GamepadPlugin: __webpack_require__(1235), - Configs: __webpack_require__(1233) + Configs: __webpack_require__(1236) }; /***/ }), -/* 1226 */ +/* 1229 */ /***/ (function(module, exports) { /** @@ -175139,7 +175744,7 @@ module.exports = 'down'; /***/ }), -/* 1227 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -175168,7 +175773,7 @@ module.exports = 'up'; /***/ }), -/* 1228 */ +/* 1231 */ /***/ (function(module, exports) { /** @@ -175199,7 +175804,7 @@ module.exports = 'connected'; /***/ }), -/* 1229 */ +/* 1232 */ /***/ (function(module, exports) { /** @@ -175225,7 +175830,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1230 */ +/* 1233 */ /***/ (function(module, exports) { /** @@ -175257,7 +175862,7 @@ module.exports = 'down'; /***/ }), -/* 1231 */ +/* 1234 */ /***/ (function(module, exports) { /** @@ -175289,7 +175894,7 @@ module.exports = 'up'; /***/ }), -/* 1232 */ +/* 1235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175300,10 +175905,10 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(226); -var Gamepad = __webpack_require__(475); +var Events = __webpack_require__(227); +var Gamepad = __webpack_require__(478); var GetValue = __webpack_require__(5); -var InputPluginCache = __webpack_require__(141); +var InputPluginCache = __webpack_require__(143); var InputEvents = __webpack_require__(56); /** @@ -175927,7 +176532,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1233 */ +/* 1236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -175942,15 +176547,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1234), - SNES_USB: __webpack_require__(1235), - XBOX_360: __webpack_require__(1236) + DUALSHOCK_4: __webpack_require__(1237), + SNES_USB: __webpack_require__(1238), + XBOX_360: __webpack_require__(1239) }; /***/ }), -/* 1234 */ +/* 1237 */ /***/ (function(module, exports) { /** @@ -176000,7 +176605,7 @@ module.exports = { /***/ }), -/* 1235 */ +/* 1238 */ /***/ (function(module, exports) { /** @@ -176039,7 +176644,7 @@ module.exports = { /***/ }), -/* 1236 */ +/* 1239 */ /***/ (function(module, exports) { /** @@ -176090,7 +176695,7 @@ module.exports = { /***/ }), -/* 1237 */ +/* 1240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176099,27 +176704,27 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circle = __webpack_require__(71); +var Circle = __webpack_require__(70); var CircleContains = __webpack_require__(60); var Class = __webpack_require__(0); 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 CreateInteractiveObject = __webpack_require__(475); +var CreatePixelPerfectHandler = __webpack_require__(1241); +var DistanceBetween = __webpack_require__(55); +var Ellipse = __webpack_require__(106); +var EllipseContains = __webpack_require__(107); var Events = __webpack_require__(56); var EventEmitter = __webpack_require__(9); -var GetFastValue = __webpack_require__(1); -var GEOM_CONST = __webpack_require__(52); -var InputPluginCache = __webpack_require__(141); +var GetFastValue = __webpack_require__(2); +var GEOM_CONST = __webpack_require__(53); +var InputPluginCache = __webpack_require__(143); var IsPlainObject = __webpack_require__(7); -var PluginCache = __webpack_require__(22); +var PluginCache = __webpack_require__(24); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(53); -var SceneEvents = __webpack_require__(18); -var Triangle = __webpack_require__(76); -var TriangleContains = __webpack_require__(92); +var RectangleContains = __webpack_require__(54); +var SceneEvents = __webpack_require__(22); +var Triangle = __webpack_require__(77); +var TriangleContains = __webpack_require__(89); /** * @classdesc @@ -176954,7 +177559,7 @@ var InputPlugin = new Class({ * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area. * @param {boolean} [dropZone=false] - Is this Game Object a drop zone or not? * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ enable: function (gameObject, shape, callback, dropZone) { @@ -178074,7 +178679,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to add. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ queueForInsertion: function (child) { @@ -178095,7 +178700,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ queueForRemoval: function (child) { @@ -178117,7 +178722,7 @@ var InputPlugin = new Class({ * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to change the draggable state on. * @param {boolean} [value=true] - Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setDraggable: function (gameObjects, value) { @@ -178211,7 +178816,7 @@ var InputPlugin = new Class({ * @param {(Phaser.Types.Input.InputConfiguration|any)} [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 {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitArea: function (gameObjects, shape, callback) { @@ -178308,7 +178913,7 @@ var InputPlugin = new Class({ * @param {number} radius - The radius of the circle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Circle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaCircle: function (gameObjects, x, y, radius, callback) { @@ -178333,7 +178938,7 @@ var InputPlugin = new Class({ * @param {number} height - The height of the ellipse. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Ellipse.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaEllipse: function (gameObjects, x, y, width, height, callback) { @@ -178354,7 +178959,7 @@ var InputPlugin = new Class({ * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaFromTexture: function (gameObjects, callback) { @@ -178416,7 +179021,7 @@ var InputPlugin = new Class({ * @param {number} height - The height of the rectangle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaRectangle: function (gameObjects, x, y, width, height, callback) { @@ -178443,7 +179048,7 @@ var InputPlugin = new Class({ * @param {number} y3 - The y coordinate of the third point of the triangle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Triangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaTriangle: function (gameObjects, x1, y1, x2, y2, x3, y3, callback) { @@ -178485,7 +179090,7 @@ var InputPlugin = new Class({ * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to create the input debug shape for. * @param {number} [color=0x00ff00] - The outline color of the debug shape. * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ enableDebug: function (gameObject, color) { @@ -178557,10 +179162,29 @@ var InputPlugin = new Class({ debug.setStrokeStyle(1 / gameObject.scale, color); debug.setDisplayOrigin(gameObject.displayOriginX, gameObject.displayOriginY); - debug.setRotation(gameObject.rotation); - debug.setScale(gameObject.scaleX, gameObject.scaleY); - debug.setPosition(gameObject.x + offsetx, gameObject.y + offsety); + + var x = gameObject.x; + var y = gameObject.y; + var rotation = gameObject.rotation; + var scaleX = gameObject.scaleX; + var scaleY = gameObject.scaleY; + + if (gameObject.parentContainer) + { + var matrix = gameObject.getWorldTransformMatrix(); + + x = matrix.tx; + y = matrix.ty; + rotation = matrix.rotation; + scaleX = matrix.scaleX; + scaleY = matrix.scaleY; + } + + debug.setRotation(rotation); + debug.setScale(scaleX, scaleY); + debug.setPosition(x + offsetx, y + offsety); debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY); + debug.setDepth(gameObject.depth); }; updateList.add(debug); @@ -178581,7 +179205,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to remove the input debug shape from. * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ removeDebug: function (gameObject) { @@ -178614,7 +179238,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#setPollAlways * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollAlways: function () { @@ -178630,7 +179254,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#setPollOnMove * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollOnMove: function () { @@ -178646,7 +179270,7 @@ var InputPlugin = new Class({ * * @param {number} value - The amount of time, in ms, that should elapsed before re-polling the pointers. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollRate: function (value) { @@ -178666,7 +179290,7 @@ var InputPlugin = new Class({ * * @param {boolean} 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. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setGlobalTopOnly: function (value) { @@ -178686,7 +179310,7 @@ var InputPlugin = new Class({ * * @param {boolean} value - `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setTopOnly: function (value) { @@ -178776,9 +179400,12 @@ var InputPlugin = new Class({ return indexB - indexA; } } + + return listB.length - listA.length; } // Technically this shouldn't happen, but ... + // eslint-disable-next-line no-unreachable return 0; }, @@ -178791,7 +179418,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#stopPropagation * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ stopPropagation: function () { @@ -178848,7 +179475,7 @@ var InputPlugin = new Class({ * * @param {string} cursor - The CSS to be used when setting the default cursor. * - * @return {Phaser.Input.InputPlugin} This Input instance. + * @return {this} This Input instance. */ setDefaultCursor: function (cursor) { @@ -179242,7 +179869,7 @@ module.exports = InputPlugin; /***/ }), -/* 1238 */ +/* 1241 */ /***/ (function(module, exports) { /** @@ -179278,7 +179905,7 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 1239 */ +/* 1242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179293,26 +179920,26 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(142), + Events: __webpack_require__(144), - KeyboardManager: __webpack_require__(390), - KeyboardPlugin: __webpack_require__(1247), + KeyboardManager: __webpack_require__(391), + KeyboardPlugin: __webpack_require__(1250), - Key: __webpack_require__(476), - KeyCodes: __webpack_require__(131), + Key: __webpack_require__(479), + KeyCodes: __webpack_require__(132), - KeyCombo: __webpack_require__(477), + KeyCombo: __webpack_require__(480), - JustDown: __webpack_require__(1252), - JustUp: __webpack_require__(1253), - DownDuration: __webpack_require__(1254), - UpDuration: __webpack_require__(1255) + JustDown: __webpack_require__(1255), + JustUp: __webpack_require__(1256), + DownDuration: __webpack_require__(1257), + UpDuration: __webpack_require__(1258) }; /***/ }), -/* 1240 */ +/* 1243 */ /***/ (function(module, exports) { /** @@ -179348,7 +179975,7 @@ module.exports = 'keydown'; /***/ }), -/* 1241 */ +/* 1244 */ /***/ (function(module, exports) { /** @@ -179377,7 +180004,7 @@ module.exports = 'keyup'; /***/ }), -/* 1242 */ +/* 1245 */ /***/ (function(module, exports) { /** @@ -179411,7 +180038,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1243 */ +/* 1246 */ /***/ (function(module, exports) { /** @@ -179445,7 +180072,7 @@ module.exports = 'down'; /***/ }), -/* 1244 */ +/* 1247 */ /***/ (function(module, exports) { /** @@ -179484,7 +180111,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1245 */ +/* 1248 */ /***/ (function(module, exports) { /** @@ -179516,7 +180143,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1246 */ +/* 1249 */ /***/ (function(module, exports) { /** @@ -179550,7 +180177,7 @@ module.exports = 'up'; /***/ }), -/* 1247 */ +/* 1250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179561,16 +180188,16 @@ module.exports = 'up'; var Class = __webpack_require__(0); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(142); +var Events = __webpack_require__(144); var GameEvents = __webpack_require__(21); var GetValue = __webpack_require__(5); 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); +var InputPluginCache = __webpack_require__(143); +var Key = __webpack_require__(479); +var KeyCodes = __webpack_require__(132); +var KeyCombo = __webpack_require__(480); +var KeyMap = __webpack_require__(1254); +var SnapFloor = __webpack_require__(103); /** * @classdesc @@ -179804,7 +180431,7 @@ var KeyboardPlugin = new Class({ * * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable event capture for. * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ addCapture: function (keycode) { @@ -179846,7 +180473,7 @@ var KeyboardPlugin = new Class({ * * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable event capture for. * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ removeCapture: function (keycode) { @@ -179875,7 +180502,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#enableGlobalCapture * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ enableGlobalCapture: function () { @@ -179891,7 +180518,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#disableGlobalCapture * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ disableGlobalCapture: function () { @@ -179908,7 +180535,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#clearCaptures * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ clearCaptures: function () { @@ -180076,7 +180703,7 @@ var KeyboardPlugin = new Class({ * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value. * @param {boolean} [destroy=false] - Call `Key.destroy` on the removed Key object? * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ removeKey: function (key, destroy) { @@ -180322,7 +180949,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#resetKeys * @since 3.15.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ resetKeys: function () { @@ -180436,7 +181063,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1248 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180445,7 +181072,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1249); +var AdvanceKeyCombo = __webpack_require__(1252); /** * Used internally by the KeyCombo class. @@ -180517,7 +181144,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1249 */ +/* 1252 */ /***/ (function(module, exports) { /** @@ -180559,7 +181186,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1250 */ +/* 1253 */ /***/ (function(module, exports) { /** @@ -180594,7 +181221,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1251 */ +/* 1254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180603,7 +181230,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(131); +var KeyCodes = __webpack_require__(132); var KeyMap = {}; @@ -180616,7 +181243,7 @@ module.exports = KeyMap; /***/ }), -/* 1252 */ +/* 1255 */ /***/ (function(module, exports) { /** @@ -180658,7 +181285,7 @@ module.exports = JustDown; /***/ }), -/* 1253 */ +/* 1256 */ /***/ (function(module, exports) { /** @@ -180700,7 +181327,7 @@ module.exports = JustUp; /***/ }), -/* 1254 */ +/* 1257 */ /***/ (function(module, exports) { /** @@ -180734,7 +181361,7 @@ module.exports = DownDuration; /***/ }), -/* 1255 */ +/* 1258 */ /***/ (function(module, exports) { /** @@ -180768,7 +181395,7 @@ module.exports = UpDuration; /***/ }), -/* 1256 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180784,14 +181411,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(391) + MouseManager: __webpack_require__(392) }; /* eslint-enable */ /***/ }), -/* 1257 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180807,14 +181434,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(393) + TouchManager: __webpack_require__(394) }; /* eslint-enable */ /***/ }), -/* 1258 */ +/* 1261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180823,8 +181450,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(23); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Loader @@ -180832,18 +181459,18 @@ var Extend = __webpack_require__(17); var Loader = { - Events: __webpack_require__(87), + Events: __webpack_require__(88), - FileTypes: __webpack_require__(1259), + FileTypes: __webpack_require__(1262), - File: __webpack_require__(24), + File: __webpack_require__(23), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(143), - LoaderPlugin: __webpack_require__(1283), - MergeXHRSettings: __webpack_require__(227), - MultiFile: __webpack_require__(67), - XHRLoader: __webpack_require__(478), - XHRSettings: __webpack_require__(144) + GetURL: __webpack_require__(145), + LoaderPlugin: __webpack_require__(1286), + MergeXHRSettings: __webpack_require__(228), + MultiFile: __webpack_require__(66), + XHRLoader: __webpack_require__(481), + XHRSettings: __webpack_require__(146) }; @@ -180854,7 +181481,7 @@ module.exports = Loader; /***/ }), -/* 1259 */ +/* 1262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180869,42 +181496,42 @@ module.exports = Loader; module.exports = { - 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__(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) + AnimationJSONFile: __webpack_require__(1263), + AtlasJSONFile: __webpack_require__(1264), + AtlasXMLFile: __webpack_require__(1265), + AudioFile: __webpack_require__(482), + AudioSpriteFile: __webpack_require__(1266), + BinaryFile: __webpack_require__(1267), + BitmapFontFile: __webpack_require__(1268), + CSSFile: __webpack_require__(1269), + GLSLFile: __webpack_require__(1270), + HTML5AudioFile: __webpack_require__(483), + HTMLFile: __webpack_require__(1271), + HTMLTextureFile: __webpack_require__(1272), + ImageFile: __webpack_require__(78), + JSONFile: __webpack_require__(65), + MultiAtlasFile: __webpack_require__(1273), + MultiScriptFile: __webpack_require__(1274), + PackFile: __webpack_require__(1275), + PluginFile: __webpack_require__(1276), + SceneFile: __webpack_require__(1277), + ScenePluginFile: __webpack_require__(1278), + ScriptFile: __webpack_require__(484), + SpriteSheetFile: __webpack_require__(1279), + SVGFile: __webpack_require__(1280), + TextFile: __webpack_require__(485), + TilemapCSVFile: __webpack_require__(1281), + TilemapImpactFile: __webpack_require__(1282), + TilemapJSONFile: __webpack_require__(1283), + UnityAtlasFile: __webpack_require__(1284), + VideoFile: __webpack_require__(1285), + XMLFile: __webpack_require__(229) }; /***/ }), -/* 1260 */ +/* 1263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180915,15 +181542,15 @@ module.exports = { var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(66); -var LoaderEvents = __webpack_require__(87); +var JSONFile = __webpack_require__(65); +var LoaderEvents = __webpack_require__(88); /** * @classdesc * 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 @@ -180979,8 +181606,6 @@ var AnimationJSONFile = new Class({ onLoadComplete: function () { this.loader.systems.anims.fromJSON(this.data); - - this.pendingDestroy(); } }); @@ -180989,7 +181614,7 @@ var AnimationJSONFile = new Class({ * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -181004,17 +181629,17 @@ var AnimationJSONFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.animation({ * key: 'baddieAnims', @@ -181031,9 +181656,9 @@ var AnimationJSONFile = new Class({ * * Once the animation data has been parsed you will be able to play animations using that data. * Please see the Animation Manager `fromJSON` method for more details about the format and playback. - * + * * You can also access the raw animation data from its Cache using its key: - * + * * ```javascript * this.load.animation('baddieAnims', 'files/BaddieAnims.json'); * // and later in your game ... @@ -181052,7 +181677,7 @@ var AnimationJSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -181072,7 +181697,7 @@ var AnimationJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#animation - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -181080,7 +181705,7 @@ var AnimationJSONFile = new Class({ * @param {string} [dataKey] - When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('animation', function (key, url, dataKey, xhrSettings) { @@ -181107,7 +181732,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1261 */ +/* 1264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181118,20 +181743,20 @@ module.exports = AnimationJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(77); +var GetFastValue = __webpack_require__(2); +var ImageFile = __webpack_require__(78); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(66); -var MultiFile = __webpack_require__(67); +var JSONFile = __webpack_require__(65); +var MultiFile = __webpack_require__(66); /** * @classdesc * 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 @@ -181224,7 +181849,7 @@ var AtlasJSONFile = new Class({ * Adds a JSON based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -181239,7 +181864,7 @@ var AtlasJSONFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -181247,7 +181872,7 @@ var AtlasJSONFile = new Class({ * These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate. * If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader * instead of this one. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -181256,7 +181881,7 @@ var AtlasJSONFile = new Class({ * 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.atlas({ * key: 'mainmenu', @@ -181270,7 +181895,7 @@ var AtlasJSONFile = new Class({ * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); * // and later in your game ... @@ -181291,13 +181916,13 @@ var AtlasJSONFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.atlas({ * key: 'mainmenu', @@ -181314,7 +181939,7 @@ var AtlasJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#atlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -181323,7 +181948,7 @@ var AtlasJSONFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('atlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -181356,7 +181981,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1262 */ +/* 1265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181367,18 +181992,18 @@ module.exports = AtlasJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(77); +var GetFastValue = __webpack_require__(2); +var ImageFile = __webpack_require__(78); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(67); -var XMLFile = __webpack_require__(228); +var MultiFile = __webpack_require__(66); +var XMLFile = __webpack_require__(229); /** * @classdesc * 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 @@ -181471,7 +182096,7 @@ var AtlasXMLFile = new Class({ * Adds an XML based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -181486,13 +182111,13 @@ var AtlasXMLFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the atlas data to be provided in an XML file format. * These files are created by software such as Shoebox and Adobe Flash / Animate. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -181501,7 +182126,7 @@ var AtlasXMLFile = new Class({ * 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.atlasXML({ * key: 'mainmenu', @@ -181513,7 +182138,7 @@ var AtlasXMLFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig` for more details. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml'); * // and later in your game ... @@ -181534,13 +182159,13 @@ var AtlasXMLFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.atlasXML({ * key: 'mainmenu', @@ -181557,7 +182182,7 @@ var AtlasXMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#atlasXML - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -181566,7 +182191,7 @@ var AtlasXMLFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('atlasXML', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -181599,7 +182224,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1263 */ +/* 1266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181608,20 +182233,20 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(479); +var AudioFile = __webpack_require__(482); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(66); -var MultiFile = __webpack_require__(67); +var JSONFile = __webpack_require__(65); +var MultiFile = __webpack_require__(66); /** * @classdesc * 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 @@ -181664,7 +182289,7 @@ var AudioSpriteFile = new Class({ if (!audioURL) { data = new JSONFile(loader, key, jsonURL, jsonXhrSettings); - + MultiFile.call(this, loader, 'audiosprite', key, [ data ]); this.config.resourceLoad = true; @@ -181748,7 +182373,7 @@ var AudioSpriteFile = new Class({ * Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -181759,13 +182384,13 @@ var AudioSpriteFile = new Class({ * ]); * } * ``` - * + * * Audio Sprites are a combination of audio files and a JSON configuration. * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite * * If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio * files automatically based on its content. To do this exclude the audio URLs from the load: - * + * * ```javascript * function preload () * { @@ -181780,7 +182405,7 @@ var AudioSpriteFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -181790,7 +182415,7 @@ var AudioSpriteFile = new Class({ * then remove it from the Audio Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.audioSprite({ * key: 'kyobi', @@ -181808,7 +182433,7 @@ var AudioSpriteFile = new Class({ * Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead. * * Once the audio has finished loading you can use it create an Audio Sprite by referencing its key: - * + * * ```javascript * this.load.audioSprite('kyobi', 'kyobi.json'); * // and later in your game ... @@ -181827,12 +182452,12 @@ var AudioSpriteFile = new Class({ * browser support. * * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded. - * + * * Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser. * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#audioSprite - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig[])} key - The key to use for this file, or a file configuration object, or an array of objects. @@ -181842,7 +182467,7 @@ var AudioSpriteFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader. + * @return {this} The Loader. */ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings) { @@ -181889,7 +182514,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1264 */ +/* 1267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181899,10 +182524,10 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -181910,7 +182535,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -181984,7 +182609,7 @@ var BinaryFile = new Class({ * Adds a Binary file, or array of Binary files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -181999,14 +182624,14 @@ var BinaryFile = new Class({ * 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 Binary Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Binary Cache. * 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 Binary Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.binary({ * key: 'doom', @@ -182018,7 +182643,7 @@ var BinaryFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.BinaryFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.binary('doom', 'files/Doom.wad'); * // and later in your game ... @@ -182039,7 +182664,7 @@ var BinaryFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#binary - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig|Phaser.Types.Loader.FileTypes.BinaryFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -182047,7 +182672,7 @@ var BinaryFile = new Class({ * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('binary', function (key, url, dataType, xhrSettings) { @@ -182071,7 +182696,7 @@ module.exports = BinaryFile; /***/ }), -/* 1265 */ +/* 1268 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182082,19 +182707,19 @@ module.exports = BinaryFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(77); +var GetFastValue = __webpack_require__(2); +var ImageFile = __webpack_require__(78); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(67); +var MultiFile = __webpack_require__(66); var ParseXMLBitmapFont = __webpack_require__(200); -var XMLFile = __webpack_require__(228); +var XMLFile = __webpack_require__(229); /** * @classdesc * 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 @@ -182202,14 +182827,14 @@ var BitmapFontFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the font data to be provided in an XML file format. * These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/), * [Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner) - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -182218,7 +182843,7 @@ var BitmapFontFile = new Class({ * 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.bitmapFont({ * key: 'goldenFont', @@ -182230,7 +182855,7 @@ var BitmapFontFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.BitmapFontFileConfig` for more details. * * Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object: - * + * * ```javascript * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml'); * // and later in your game ... @@ -182249,13 +182874,13 @@ var BitmapFontFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.bitmapFont({ * key: 'goldenFont', @@ -182272,7 +182897,7 @@ var BitmapFontFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#bitmapFont - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -182281,7 +182906,7 @@ var BitmapFontFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('bitmapFont', function (key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings) { @@ -182314,7 +182939,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1266 */ +/* 1269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182324,10 +182949,10 @@ module.exports = BitmapFontFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -182335,7 +182960,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -182408,7 +183033,7 @@ var CSSFile = new Class({ * Adds a CSS file, or array of CSS files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -182423,11 +183048,11 @@ var CSSFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.css({ * key: 'headers', @@ -182451,14 +183076,14 @@ var CSSFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#css - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.17.0 * * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig|Phaser.Types.Loader.FileTypes.CSSFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.css`, i.e. if `key` was "alien" then the URL will be "alien.css". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('css', function (key, url, xhrSettings) { @@ -182482,7 +183107,7 @@ module.exports = CSSFile; /***/ }), -/* 1267 */ +/* 1270 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182492,19 +183117,19 @@ module.exports = CSSFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(377); +var Shader = __webpack_require__(378); /** * @classdesc * 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 @@ -182646,9 +183271,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderName * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {string} The shader name. */ getShaderName: function (headerSource) @@ -182671,9 +183296,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderType * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {string} The shader type. Either 'fragment' or 'vertex'. */ getShaderType: function (headerSource) @@ -182696,9 +183321,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderUniforms * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {any} The shader uniforms object. */ getShaderUniforms: function (headerSource) @@ -182738,10 +183363,10 @@ var GLSLFile = new Class({ * @method Phaser.Loader.FileTypes.GLSLFile#extractBlock * @private * @since 3.17.0 - * + * * @param {string[]} data - The array of shader data to process. * @param {integer} offset - The offset to start processing from. - * + * * @return {any} The processed shader block, or null. */ extractBlock: function (data, offset) @@ -182806,7 +183431,7 @@ var GLSLFile = new Class({ * In Phaser 3 GLSL files are just plain Text files at the current moment in time. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -182821,14 +183446,14 @@ var GLSLFile = new Class({ * 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 Shader Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Shader Cache. * 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 Shader Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.glsl({ * key: 'plasma', @@ -182840,7 +183465,7 @@ var GLSLFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.GLSLFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.glsl('plasma', 'shaders/Plasma.glsl'); * // and later in your game ... @@ -182861,7 +183486,7 @@ var GLSLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#glsl - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig|Phaser.Types.Loader.FileTypes.GLSLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -182869,7 +183494,7 @@ var GLSLFile = new Class({ * @param {string} [shaderType='fragment'] - 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. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('glsl', function (key, url, shaderType, xhrSettings) { @@ -182893,7 +183518,7 @@ module.exports = GLSLFile; /***/ }), -/* 1268 */ +/* 1271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182903,10 +183528,10 @@ module.exports = GLSLFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -183037,14 +183662,14 @@ var HTMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#html - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.12.0 * * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig|Phaser.Types.Loader.FileTypes.HTMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was "alien" then the URL will be "alien.html". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('html', function (key, url, xhrSettings) { @@ -183068,7 +183693,7 @@ module.exports = HTMLFile; /***/ }), -/* 1269 */ +/* 1272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183078,10 +183703,10 @@ module.exports = HTMLFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -183089,7 +183714,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -183228,7 +183853,7 @@ var HTMLTextureFile = new Class({ * will be rendered to 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 () * { @@ -183250,7 +183875,7 @@ var HTMLTextureFile = new Class({ * 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.htmlTexture({ * key: 'instructions', @@ -183263,7 +183888,7 @@ var HTMLTextureFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig` 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.htmlTexture('instructions', 'content/intro.html', 256, 512); * // and later in your game ... @@ -183293,7 +183918,7 @@ var HTMLTextureFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#htmlTexture - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.12.0 * * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -183302,7 +183927,7 @@ var HTMLTextureFile = new Class({ * @param {integer} [height=512] - The height of the texture the HTML will be rendered to. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('htmlTexture', function (key, url, width, height, xhrSettings) { @@ -183326,7 +183951,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1270 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183337,18 +183962,18 @@ module.exports = HTMLTextureFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(77); +var GetFastValue = __webpack_require__(2); +var ImageFile = __webpack_require__(78); var IsPlainObject = __webpack_require__(7); -var JSONFile = __webpack_require__(66); -var MultiFile = __webpack_require__(67); +var JSONFile = __webpack_require__(65); +var MultiFile = __webpack_require__(66); /** * @classdesc * 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 @@ -183514,7 +184139,7 @@ var MultiAtlasFile = new Class({ if (item.image === key) { images.push(image); - + data.push(item); if (file.linkFile) @@ -183549,7 +184174,7 @@ var MultiAtlasFile = new Class({ * Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -183564,7 +184189,7 @@ var MultiAtlasFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -183574,14 +184199,14 @@ var MultiAtlasFile = new Class({ * The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and * extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps, * Phaser will load those as well. - * + * * 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.multiatlas({ * key: 'level1', @@ -183594,7 +184219,7 @@ var MultiAtlasFile = new Class({ * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.multiatlas('level1', 'images/Level1.json'); * // and later in your game ... @@ -183617,7 +184242,7 @@ var MultiAtlasFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#multiatlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -183626,7 +184251,7 @@ var MultiAtlasFile = new Class({ * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('multiatlas', function (key, atlasURL, path, baseURL, atlasXhrSettings) { @@ -183659,7 +184284,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1271 */ +/* 1274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183670,17 +184295,17 @@ module.exports = MultiAtlasFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(67); -var ScriptFile = __webpack_require__(481); +var MultiFile = __webpack_require__(66); +var ScriptFile = __webpack_require__(484); /** * @classdesc * 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 @@ -183760,7 +184385,7 @@ var MultiScriptFile = new Class({ file.data.type = 'text/javascript'; file.data.defer = false; file.data.text = file.xhrLoader.responseText; - + document.head.appendChild(file.data); } @@ -183772,13 +184397,13 @@ var MultiScriptFile = new Class({ /** * Adds an array of Script files to the current load queue. - * + * * The difference between this and the `ScriptFile` file type is that you give an array of scripts to this method, * and the scripts are then processed _exactly_ in that order. This allows you to load a bunch of scripts that * may have dependencies on each other without worrying about the async nature of traditional script loading. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -183792,7 +184417,7 @@ var MultiScriptFile = new Class({ * ]); * } * ``` - * + * * In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact * order given in the array. * @@ -183803,11 +184428,11 @@ var MultiScriptFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.scripts({ * key: 'PostProcess', @@ -183835,7 +184460,7 @@ var MultiScriptFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#scripts - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.17.0 * * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -183843,7 +184468,7 @@ var MultiScriptFile = new Class({ * @param {string} [extension='js'] - The default file extension to use if no url is provided. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for these files. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('scripts', function (key, url, xhrSettings) { @@ -183876,7 +184501,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1272 */ +/* 1275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183886,16 +184511,16 @@ module.exports = MultiScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); +var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(66); +var JSONFile = __webpack_require__(65); /** * @classdesc * 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 @@ -183954,7 +184579,7 @@ var PackFile = new Class({ * Adds a JSON File Pack, or array of packs, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -183966,7 +184591,7 @@ var PackFile = new Class({ * Here is a small example: * * ```json - * { + * { * "test1": { * "files": [ * { @@ -184007,17 +184632,17 @@ var PackFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.pack({ * key: 'level1', @@ -184039,7 +184664,7 @@ var PackFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -184059,7 +184684,7 @@ var PackFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#pack - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig|Phaser.Types.Loader.FileTypes.PackFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -184067,7 +184692,7 @@ var PackFile = new Class({ * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('pack', function (key, url, packKey, xhrSettings) { @@ -184094,7 +184719,7 @@ module.exports = PackFile; /***/ }), -/* 1273 */ +/* 1276 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184104,10 +184729,10 @@ module.exports = PackFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -184115,7 +184740,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -184229,7 +184854,7 @@ var PluginFile = new Class({ * Adds a Plugin Script file, or array of plugin files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -184244,11 +184869,11 @@ var PluginFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.plugin({ * key: 'modplayer', @@ -184273,7 +184898,7 @@ var PluginFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#plugin - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig|Phaser.Types.Loader.FileTypes.PluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -184282,7 +184907,7 @@ var PluginFile = new Class({ * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('plugin', function (key, url, start, mapping, xhrSettings) { @@ -184306,7 +184931,7 @@ module.exports = PluginFile; /***/ }), -/* 1274 */ +/* 1277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184316,10 +184941,10 @@ module.exports = PluginFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -184431,34 +185056,34 @@ var SceneFile = new Class({ * loaded. * * The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load. - * + * * For a Scene File it's vitally important that the key matches the class name in the JavaScript file. - * + * * For example here is the source file: - * + * * ```javascript * class ExternalScene extends Phaser.Scene { - * + * * constructor () * { * super('myScene'); * } - * + * * } * ``` - * + * * Because the class is called `ExternalScene` that is the exact same key you must use when loading it: - * + * * ```javascript * function preload () * { * this.load.sceneFile('ExternalScene', 'src/yourScene.js'); * } * ``` - * + * * The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene * constructor, as we've done in the example above, where the Scene key was changed to `myScene`. - * + * * The key should be unique both in terms of files being loaded and Scenes already present in the Scene 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 Scene Manager first, before loading a new one. @@ -184496,14 +185121,14 @@ var SceneFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#sceneFile - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.16.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig|Phaser.Types.Loader.FileTypes.SceneFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('sceneFile', function (key, url, xhrSettings) { @@ -184527,7 +185152,7 @@ module.exports = SceneFile; /***/ }), -/* 1275 */ +/* 1278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184537,10 +185162,10 @@ module.exports = SceneFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -184548,7 +185173,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -184656,7 +185281,7 @@ var ScenePluginFile = new Class({ * Adds a Scene Plugin Script file, or array of plugin files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -184671,11 +185296,11 @@ var ScenePluginFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.scenePlugin({ * key: 'modplayer', @@ -184700,7 +185325,7 @@ var ScenePluginFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#scenePlugin - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.8.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -184709,7 +185334,7 @@ var ScenePluginFile = new Class({ * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('scenePlugin', function (key, url, systemKey, sceneKey, xhrSettings) { @@ -184733,7 +185358,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1276 */ +/* 1279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184744,7 +185369,7 @@ module.exports = ScenePluginFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var ImageFile = __webpack_require__(77); +var ImageFile = __webpack_require__(78); /** * @classdesc @@ -184892,7 +185517,7 @@ var SpriteSheetFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#spritesheet - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -184900,7 +185525,7 @@ var SpriteSheetFile = new Class({ * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. At a minimum it should have a `frameWidth` property. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('spritesheet', function (key, url, frameConfig, xhrSettings) { @@ -184924,7 +185549,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1277 */ +/* 1280 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184934,10 +185559,10 @@ module.exports = SpriteSheetFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -185177,21 +185802,21 @@ var SVGFile = new Class({ * 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', @@ -185202,18 +185827,18 @@ var SVGFile = new Class({ * } * }); * ``` - * + * * 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', @@ -185223,14 +185848,14 @@ var SVGFile = new Class({ * } * }); * ``` - * + * * 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. * * @method Phaser.Loader.LoaderPlugin#svg - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig|Phaser.Types.Loader.FileTypes.SVGFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -185238,7 +185863,7 @@ var SVGFile = new Class({ * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('svg', function (key, url, svgConfig, xhrSettings) { @@ -185263,7 +185888,7 @@ module.exports = SVGFile; /***/ }), -/* 1278 */ +/* 1281 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185273,12 +185898,12 @@ module.exports = SVGFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(34); +var TILEMAP_FORMATS = __webpack_require__(35); /** * @classdesc @@ -185427,14 +186052,14 @@ var TilemapCSVFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapCSV - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapCSV', function (key, url, xhrSettings) { @@ -185458,7 +186083,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1279 */ +/* 1282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185469,8 +186094,8 @@ module.exports = TilemapCSVFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(66); -var TILEMAP_FORMATS = __webpack_require__(34); +var JSONFile = __webpack_require__(65); +var TILEMAP_FORMATS = __webpack_require__(35); /** * @classdesc @@ -185583,14 +186208,14 @@ var TilemapImpactFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapImpact - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapImpact', function (key, url, xhrSettings) { @@ -185614,7 +186239,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1280 */ +/* 1283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185625,8 +186250,8 @@ module.exports = TilemapImpactFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var JSONFile = __webpack_require__(66); -var TILEMAP_FORMATS = __webpack_require__(34); +var JSONFile = __webpack_require__(65); +var TILEMAP_FORMATS = __webpack_require__(35); /** * @classdesc @@ -185739,14 +186364,14 @@ var TilemapJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapTiledJSON - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapTiledJSON', function (key, url, xhrSettings) { @@ -185770,7 +186395,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1281 */ +/* 1284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185781,18 +186406,18 @@ module.exports = TilemapJSONFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); -var ImageFile = __webpack_require__(77); +var GetFastValue = __webpack_require__(2); +var ImageFile = __webpack_require__(78); var IsPlainObject = __webpack_require__(7); -var MultiFile = __webpack_require__(67); -var TextFile = __webpack_require__(482); +var MultiFile = __webpack_require__(66); +var TextFile = __webpack_require__(485); /** * @classdesc * 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 @@ -185885,7 +186510,7 @@ var UnityAtlasFile = new Class({ * Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -185900,12 +186525,12 @@ var UnityAtlasFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -185914,7 +186539,7 @@ var UnityAtlasFile = new Class({ * 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.unityAtlas({ * key: 'mainmenu', @@ -185926,7 +186551,7 @@ var UnityAtlasFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig` for more details. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); * // and later in your game ... @@ -185947,13 +186572,13 @@ var UnityAtlasFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.unityAtlas({ * key: 'mainmenu', @@ -185970,7 +186595,7 @@ var UnityAtlasFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#unityAtlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -185979,7 +186604,7 @@ var UnityAtlasFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('unityAtlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -186012,7 +186637,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1282 */ +/* 1285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186022,11 +186647,11 @@ module.exports = UnityAtlasFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(32); -var File = __webpack_require__(24); +var CONST = __webpack_require__(17); +var File = __webpack_require__(23); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(143); -var GetFastValue = __webpack_require__(1); +var GetURL = __webpack_require__(145); +var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); /** @@ -186034,7 +186659,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -186139,13 +186764,13 @@ var VideoFile = new Class({ * @method Phaser.Loader.FileTypes.VideoFile#createVideoElement * @private * @since 3.20.0 - * + * * @return {HTMLVideoElement} The newly created Video element. */ createVideoElement: function () { var video = document.createElement('video'); - + video.controls = false; video.crossOrigin = this.loader.crossOrigin; @@ -186278,7 +186903,10 @@ VideoFile.getVideoURL = function (game, urls) if (url.indexOf('blob:') === 0) { - return url; + return { + url: url, + type: '' + }; } var videoType; @@ -186310,7 +186938,7 @@ VideoFile.getVideoURL = function (game, urls) * Adds a Video file, or array of video files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -186325,14 +186953,14 @@ VideoFile.getVideoURL = function (game, urls) * 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 Video Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Video Cache. * 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 Video Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.video({ * key: 'intro', @@ -186349,7 +186977,7 @@ VideoFile.getVideoURL = function (game, urls) * Due to different browsers supporting different video file types you should usually provide your video files in a variety of formats. * mp4, mov and webm are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on * browser support, starting with the first in the array and progressing to the end. - * + * * Unlike most asset-types, videos do not _need_ to be preloaded. You can create a Video Game Object and then call its `loadURL` method, * to load a video at run-time, rather than in advance. * @@ -186357,7 +186985,7 @@ VideoFile.getVideoURL = function (game, urls) * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#video - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.20.0 * * @param {(string|Phaser.Types.Loader.FileTypes.VideoFileConfig|Phaser.Types.Loader.FileTypes.VideoFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -186367,7 +186995,7 @@ VideoFile.getVideoURL = function (game, urls) * @param {boolean} [noAudio=false] - Does the video have an audio track? If not you can enable auto-playing on it. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('video', function (key, urls, loadEvent, asBlob, noAudio, xhrSettings) { @@ -186403,7 +187031,7 @@ module.exports = VideoFile; /***/ }), -/* 1283 */ +/* 1286 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -186413,15 +187041,15 @@ module.exports = VideoFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(23); -var CustomSet = __webpack_require__(110); +var CONST = __webpack_require__(17); +var CustomSet = __webpack_require__(140); var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(87); +var Events = __webpack_require__(88); var FileTypesManager = __webpack_require__(8); -var GetFastValue = __webpack_require__(1); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); -var XHRSettings = __webpack_require__(144); +var GetFastValue = __webpack_require__(2); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); +var XHRSettings = __webpack_require__(146); /** * @classdesc @@ -186559,9 +187187,9 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#baseURL @@ -186602,7 +187230,8 @@ var LoaderPlugin = new Class({ GetFastValue(sceneConfig, 'async', gameConfig.loaderAsync), GetFastValue(sceneConfig, 'user', gameConfig.loaderUser), GetFastValue(sceneConfig, 'password', gameConfig.loaderPassword), - GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout) + GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout), + GetFastValue(sceneConfig, 'withCredentials', gameConfig.loaderWithCredentials) ); /** @@ -186639,7 +187268,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -186653,9 +187282,9 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#inflight @@ -186666,10 +187295,10 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#queue @@ -186764,9 +187393,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -186775,7 +187404,7 @@ var LoaderPlugin = new Class({ * * @param {string} [url] - The URL to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setBaseURL: function (url) { @@ -186806,7 +187435,7 @@ var LoaderPlugin = new Class({ * 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. * @@ -186815,7 +187444,7 @@ var LoaderPlugin = new Class({ * * @param {string} [path] - The path to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setPath: function (path) { @@ -186833,9 +187462,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -186844,7 +187473,7 @@ var LoaderPlugin = new Class({ * * @param {string} [prefix] - The prefix to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setPrefix: function (prefix) { @@ -186857,9 +187486,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -186870,7 +187499,7 @@ var LoaderPlugin = new Class({ * * @param {string} [crossOrigin] - The value to use for the `crossOrigin` property in the load request. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setCORS: function (crossOrigin) { @@ -186993,7 +187622,7 @@ var LoaderPlugin = new Class({ * @method Phaser.Loader.LoaderPlugin#addPack * @since 3.7.0 * - * @param {any} data - The Pack File data to be parsed and each entry of it to added to the load queue. + * @param {any} pack - The Pack File data to be parsed and each entry of it to added to the load queue. * @param {string} [packKey] - An optional key to use from the pack file data. * * @return {boolean} `true` if any files were added to the queue, otherwise `false`. @@ -187016,6 +187645,11 @@ var LoaderPlugin = new Class({ // Here we go ... for (var key in pack) { + if (!Object.prototype.hasOwnProperty.call(pack, key)) + { + continue; + } + var config = pack[key]; // Any meta data to process? @@ -187160,10 +187794,10 @@ var LoaderPlugin = new Class({ /** * An internal method called by the Loader. - * + * * It will check to see if there are any more files in the pending list that need loading, and if so it will move * them from the list Set into the inflight Set, set their CORs flag and start them loading. - * + * * It will carrying on doing this for each file in the pending list until it runs out, or hits the max allowed parallel downloads. * * @method Phaser.Loader.LoaderPlugin#checkLoadQueue @@ -187200,7 +187834,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -187340,7 +187974,7 @@ var LoaderPlugin = new Class({ * * @method Phaser.Loader.LoaderPlugin#flagForRemoval * @since 3.7.0 - * + * * @param {Phaser.Loader.File} file - The File to be queued for deletion when the Loader completes. */ flagForRemoval: function (file) @@ -187359,7 +187993,7 @@ var LoaderPlugin = new Class({ * @param {*} data - The JSON data, ready parsed. * @param {string} [filename=file.json] - The name to save the JSON file as. * - * @return {Phaser.Loader.LoaderPlugin} This Loader plugin. + * @return {this} This Loader plugin. */ saveJSON: function (data, filename) { @@ -187368,7 +188002,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -187379,7 +188013,7 @@ var LoaderPlugin = new Class({ * @param {string} [filename=file.json] - The filename to save the file as. * @param {string} [filetype=application/json] - The file type to use when saving the file. Defaults to JSON. * - * @return {Phaser.Loader.LoaderPlugin} This Loader plugin. + * @return {this} This Loader plugin. */ save: function (data, filename, filetype) { @@ -187480,7 +188114,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1284 */ +/* 1287 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187499,15 +188133,14 @@ module.exports = LoaderPlugin; module.exports = { - Arcade: __webpack_require__(1285), - Impact: __webpack_require__(1316), - Matter: __webpack_require__(1339) + Arcade: __webpack_require__(1288), + Matter: __webpack_require__(1319) }; /***/ }), -/* 1285 */ +/* 1288 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187517,13 +188150,19 @@ module.exports = { */ var CONST = __webpack_require__(58); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @callback ArcadePhysicsCallback * - * @param {Phaser.GameObjects.GameObject} object1 - The first Body to separate. - * @param {Phaser.GameObjects.GameObject} object2 - The second Body to separate. + * A callback receiving two Game Objects. + * + * When colliding a single sprite with a Group or TilemapLayer, `object1` is always the sprite. + * + * For all other cases, `object1` and `object2` match the same arguments in `collide()` or `overlap()`. + * + * @param {Phaser.GameObjects.GameObject} object1 - The first Game Object. + * @param {Phaser.GameObjects.GameObject} object2 - The second Game Object. */ /** @@ -187532,18 +188171,18 @@ var Extend = __webpack_require__(17); var Arcade = { - 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) + ArcadePhysics: __webpack_require__(1289), + Body: __webpack_require__(492), + Collider: __webpack_require__(493), + Components: __webpack_require__(230), + Events: __webpack_require__(231), + Factory: __webpack_require__(486), + Group: __webpack_require__(488), + Image: __webpack_require__(487), + Sprite: __webpack_require__(147), + StaticBody: __webpack_require__(498), + StaticGroup: __webpack_require__(489), + World: __webpack_require__(491) }; @@ -187554,7 +188193,7 @@ module.exports = Arcade; /***/ }), -/* 1286 */ +/* 1289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -187565,17 +188204,17 @@ module.exports = Arcade; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(40); -var DistanceBetween = __webpack_require__(54); +var DistanceBetween = __webpack_require__(55); var DistanceSquared = __webpack_require__(338); -var Factory = __webpack_require__(483); -var GetFastValue = __webpack_require__(1); -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 Factory = __webpack_require__(486); +var GetFastValue = __webpack_require__(2); +var Merge = __webpack_require__(104); +var OverlapCirc = __webpack_require__(1302); +var OverlapRect = __webpack_require__(490); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(488); +var World = __webpack_require__(491); /** * @classdesc @@ -188243,7 +188882,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1287 */ +/* 1290 */ /***/ (function(module, exports) { /** @@ -188318,7 +188957,7 @@ module.exports = Acceleration; /***/ }), -/* 1288 */ +/* 1291 */ /***/ (function(module, exports) { /** @@ -188400,7 +189039,7 @@ module.exports = Angular; /***/ }), -/* 1289 */ +/* 1292 */ /***/ (function(module, exports) { /** @@ -188499,7 +189138,7 @@ module.exports = Bounce; /***/ }), -/* 1290 */ +/* 1293 */ /***/ (function(module, exports) { /** @@ -188626,7 +189265,7 @@ module.exports = Debug; /***/ }), -/* 1291 */ +/* 1294 */ /***/ (function(module, exports) { /** @@ -188759,7 +189398,7 @@ module.exports = Drag; /***/ }), -/* 1292 */ +/* 1295 */ /***/ (function(module, exports) { /** @@ -188883,7 +189522,7 @@ module.exports = Enable; /***/ }), -/* 1293 */ +/* 1296 */ /***/ (function(module, exports) { /** @@ -188893,24 +189532,30 @@ module.exports = Enable; */ /** - * 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. + * Methods for setting the friction of an Arcade Physics Body. + * + * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body. * * @namespace Phaser.Physics.Arcade.Components.Friction * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#friction */ var 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. + * Sets the friction of this game object's physics body. + * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body. * * @method Phaser.Physics.Arcade.Components.Friction#setFriction * @since 3.0.0 * - * @param {number} x - The amount of horizontal friction to apply. - * @param {number} [y=x] - The amount of vertical friction to apply. + * @param {number} x - The amount of horizontal friction to apply, [0, 1]. + * @param {number} [y=x] - The amount of vertical friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFriction: function (x, y) { @@ -188920,15 +189565,17 @@ var Friction = { }, /** - * 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. + * Sets the horizontal friction of this game object's physics body. + * This can move a riding body horizontally when it collides with this one on the vertical axis. * * @method Phaser.Physics.Arcade.Components.Friction#setFrictionX * @since 3.0.0 * - * @param {number} x - The amount of friction to apply. + * @param {number} x - The amount of friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFrictionX: function (x) { @@ -188938,15 +189585,17 @@ var Friction = { }, /** - * 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. + * Sets the vertical friction of this game object's physics body. + * This can move a riding body vertically when it collides with this one on the horizontal axis. * * @method Phaser.Physics.Arcade.Components.Friction#setFrictionY * @since 3.0.0 * - * @param {number} x - The amount of friction to apply. + * @param {number} y - The amount of friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFrictionY: function (y) { @@ -188961,7 +189610,7 @@ module.exports = Friction; /***/ }), -/* 1294 */ +/* 1297 */ /***/ (function(module, exports) { /** @@ -189039,7 +189688,7 @@ module.exports = Gravity; /***/ }), -/* 1295 */ +/* 1298 */ /***/ (function(module, exports) { /** @@ -189081,7 +189730,7 @@ module.exports = Immovable; /***/ }), -/* 1296 */ +/* 1299 */ /***/ (function(module, exports) { /** @@ -189121,7 +189770,7 @@ module.exports = Mass; /***/ }), -/* 1297 */ +/* 1300 */ /***/ (function(module, exports) { /** @@ -189203,7 +189852,7 @@ module.exports = Size; /***/ }), -/* 1298 */ +/* 1301 */ /***/ (function(module, exports) { /** @@ -189302,13 +189951,13 @@ module.exports = Velocity; /***/ }), -/* 1299 */ +/* 1302 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(487); -var Circle = __webpack_require__(71); -var CircleToCircle = __webpack_require__(217); -var CircleToRectangle = __webpack_require__(218); +var OverlapRect = __webpack_require__(490); +var Circle = __webpack_require__(70); +var CircleToCircle = __webpack_require__(218); +var CircleToRectangle = __webpack_require__(219); /** * This method will search the given circular area and return an array of all physics bodies that @@ -189370,7 +190019,7 @@ module.exports = OverlapCirc; /***/ }), -/* 1300 */ +/* 1303 */ /***/ (function(module, exports) { /** @@ -189403,7 +190052,7 @@ module.exports = 'collide'; /***/ }), -/* 1301 */ +/* 1304 */ /***/ (function(module, exports) { /** @@ -189436,7 +190085,7 @@ module.exports = 'overlap'; /***/ }), -/* 1302 */ +/* 1305 */ /***/ (function(module, exports) { /** @@ -189459,7 +190108,7 @@ module.exports = 'pause'; /***/ }), -/* 1303 */ +/* 1306 */ /***/ (function(module, exports) { /** @@ -189482,7 +190131,7 @@ module.exports = 'resume'; /***/ }), -/* 1304 */ +/* 1307 */ /***/ (function(module, exports) { /** @@ -189514,7 +190163,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1305 */ +/* 1308 */ /***/ (function(module, exports) { /** @@ -189546,7 +190195,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1306 */ +/* 1309 */ /***/ (function(module, exports) { /** @@ -189578,7 +190227,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1307 */ +/* 1310 */ /***/ (function(module, exports) { /** @@ -189604,7 +190253,7 @@ module.exports = 'worldstep'; /***/ }), -/* 1308 */ +/* 1311 */ /***/ (function(module, exports) { /** @@ -189645,7 +190294,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 1309 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189654,9 +190303,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(1310); -var TileCheckY = __webpack_require__(1312); -var TileIntersectsBody = __webpack_require__(494); +var TileCheckX = __webpack_require__(1313); +var TileCheckY = __webpack_require__(1315); +var TileIntersectsBody = __webpack_require__(497); /** * The core separation function to separate a physics body and a tile. @@ -189765,7 +190414,7 @@ module.exports = SeparateTile; /***/ }), -/* 1310 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189774,7 +190423,7 @@ module.exports = SeparateTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(1311); +var ProcessTileSeparationX = __webpack_require__(1314); /** * Check the body against the given tile on the X axis. @@ -189855,7 +190504,7 @@ module.exports = TileCheckX; /***/ }), -/* 1311 */ +/* 1314 */ /***/ (function(module, exports) { /** @@ -189902,7 +190551,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 1312 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -189911,7 +190560,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(1313); +var ProcessTileSeparationY = __webpack_require__(1316); /** * Check the body against the given tile on the Y axis. @@ -189992,7 +190641,7 @@ module.exports = TileCheckY; /***/ }), -/* 1313 */ +/* 1316 */ /***/ (function(module, exports) { /** @@ -190039,7 +190688,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 1314 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190048,7 +190697,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(491); +var GetOverlapX = __webpack_require__(494); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -190130,7 +190779,7 @@ module.exports = SeparateX; /***/ }), -/* 1315 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190139,7 +190788,7 @@ module.exports = SeparateX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(492); +var GetOverlapY = __webpack_require__(495); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -190220,1862 +190869,8 @@ var SeparateY = function (body1, body2, overlapOnly, bias) module.exports = SeparateY; -/***/ }), -/* 1316 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * An Impact.js compatible physics world, body and solver, for those who are used - * to the Impact way of defining and controlling physics bodies. Also works with - * the new Loader support for Weltmeister map data. - * - * World updated to run off the Phaser main loop. - * Body extended to support additional setter functions. - * - * To create the map data you'll need Weltmeister, which comes with Impact - * and can be purchased from http://impactjs.com - * - * My thanks to Dominic Szablewski for his permission to support Impact in Phaser. - * - * @namespace Phaser.Physics.Impact - */ -module.exports = { - - 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) - -}; - - -/***/ }), -/* 1317 */ -/***/ (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); - -/** - * [description] - * - * @function Phaser.Physics.Impact.GetVelocity - * @since 3.0.0 - * - * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - * @param {number} vel - [description] - * @param {number} accel - [description] - * @param {number} friction - [description] - * @param {number} max - [description] - * - * @return {number} [description] - */ -var GetVelocity = function (delta, vel, accel, friction, max) -{ - if (accel) - { - return Clamp(vel + accel * delta, -max, max); - } - else if (friction) - { - var frictionDelta = friction * delta; - - if (vel - frictionDelta > 0) - { - return vel - frictionDelta; - } - else if (vel + frictionDelta < 0) - { - return vel + frictionDelta; - } - else - { - return 0; - } - } - - return Clamp(vel, -max, max); -}; - -module.exports = GetVelocity; - - -/***/ }), -/* 1318 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Set up the trace-result - * var res = { - * collision: {x: false, y: false, slope: false}, - * pos: {x: x, y: y}, - * tile: {x: 0, y: 0} - * }; - * - * @function Phaser.Physics.Impact.UpdateMotion - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} body - [description] - * @param {object} res - [description] - */ -var UpdateMotion = function (body, res) -{ - body.standing = false; - - // Y - if (res.collision.y) - { - if (body.bounciness > 0 && Math.abs(body.vel.y) > body.minBounceVelocity) - { - body.vel.y *= -body.bounciness; - } - else - { - if (body.vel.y > 0) - { - body.standing = true; - } - - body.vel.y = 0; - } - } - - // X - if (res.collision.x) - { - if (body.bounciness > 0 && Math.abs(body.vel.x) > body.minBounceVelocity) - { - body.vel.x *= -body.bounciness; - } - else - { - body.vel.x = 0; - } - } - - // SLOPE - if (res.collision.slope) - { - var s = res.collision.slope; - - if (body.bounciness > 0) - { - var proj = body.vel.x * s.nx + body.vel.y * s.ny; - - body.vel.x = (body.vel.x - s.nx * proj * 2) * body.bounciness; - body.vel.y = (body.vel.y - s.ny * proj * 2) * body.bounciness; - } - else - { - var lengthSquared = s.x * s.x + s.y * s.y; - var dot = (body.vel.x * s.x + body.vel.y * s.y) / lengthSquared; - - body.vel.x = s.x * dot; - body.vel.y = s.y * dot; - - var angle = Math.atan2(s.x, s.y); - - if (angle > body.slopeStanding.min && angle < body.slopeStanding.max) - { - body.standing = true; - } - } - } - - body.pos.x = res.pos.x; - body.pos.y = res.pos.y; -}; - -module.exports = UpdateMotion; - - /***/ }), /* 1319 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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)`. - * - * @event Phaser.Physics.Impact.Events#COLLIDE - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} bodyA - The first body involved in the collision. - * @param {Phaser.Physics.Impact.Body} bodyB - The second body involved in the collision. - * @param {string} axis - The collision axis. Either `x` or `y`. - */ -module.exports = 'collide'; - - -/***/ }), -/* 1320 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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)`. - * - * @event Phaser.Physics.Impact.Events#PAUSE - * @since 3.0.0 - */ -module.exports = 'pause'; - - -/***/ }), -/* 1321 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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)`. - * - * @event Phaser.Physics.Impact.Events#RESUME - * @since 3.0.0 - */ -module.exports = 'resume'; - - -/***/ }), -/* 1322 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var H = 0.5; -var N = 1 / 3; -var M = 2 / 3; - -// Tile ID to Slope defs. -// First 4 elements = line data, final = solid or non-solid behind the line - -module.exports = { - - 2: [ 0, 1, 1, 0, true ], - 3: [ 0, 1, 1, H, true ], - 4: [ 0, H, 1, 0, true ], - 5: [ 0, 1, 1, M, true ], - 6: [ 0, M, 1, N, true ], - 7: [ 0, N, 1, 0, true ], - 8: [ H, 1, 0, 0, true ], - 9: [ 1, 0, H, 1, true ], - 10: [ H, 1, 1, 0, true ], - 11: [ 0, 0, H, 1, true ], - 12: [ 0, 0, 1, 0, false ], - 13: [ 1, 1, 0, 0, true ], - 14: [ 1, H, 0, 0, true ], - 15: [ 1, 1, 0, H, true ], - 16: [ 1, N, 0, 0, true ], - 17: [ 1, M, 0, N, true ], - 18: [ 1, 1, 0, M, true ], - 19: [ 1, 1, H, 0, true ], - 20: [ H, 0, 0, 1, true ], - 21: [ 0, 1, H, 0, true ], - 22: [ H, 0, 1, 1, true ], - 23: [ 1, 1, 0, 1, false ], - 24: [ 0, 0, 1, 1, true ], - 25: [ 0, 0, 1, H, true ], - 26: [ 0, H, 1, 1, true ], - 27: [ 0, 0, 1, N, true ], - 28: [ 0, N, 1, M, true ], - 29: [ 0, M, 1, 1, true ], - 30: [ N, 1, 0, 0, true ], - 31: [ 1, 0, M, 1, true ], - 32: [ M, 1, 1, 0, true ], - 33: [ 0, 0, N, 1, true ], - 34: [ 1, 0, 1, 1, false ], - 35: [ 1, 0, 0, 1, true ], - 36: [ 1, H, 0, 1, true ], - 37: [ 1, 0, 0, H, true ], - 38: [ 1, M, 0, 1, true ], - 39: [ 1, N, 0, M, true ], - 40: [ 1, 0, 0, N, true ], - 41: [ M, 1, N, 0, true ], - 42: [ M, 0, N, 1, true ], - 43: [ N, 1, M, 0, true ], - 44: [ N, 0, M, 1, true ], - 45: [ 0, 1, 0, 0, false ], - 52: [ 1, 1, M, 0, true ], - 53: [ N, 0, 0, 1, true ], - 54: [ 0, 1, N, 0, true ], - 55: [ M, 0, 1, 1, true ] - -}; - - -/***/ }), -/* 1323 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Acceleration component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Acceleration - * @since 3.0.0 - */ -var Acceleration = { - - /** - * Sets the horizontal acceleration of this body. - * - * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationX - * @since 3.0.0 - * - * @param {number} x - The amount of acceleration to apply. - * - * @return {this} This Game Object. - */ - setAccelerationX: function (x) - { - this.accel.x = x; - - return this; - }, - - /** - * Sets the vertical acceleration of this body. - * - * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationY - * @since 3.0.0 - * - * @param {number} y - The amount of acceleration to apply. - * - * @return {this} This Game Object. - */ - setAccelerationY: function (y) - { - this.accel.y = y; - - return this; - }, - - /** - * Sets the horizontal and vertical acceleration of this body. - * - * @method Phaser.Physics.Impact.Components.Acceleration#setAcceleration - * @since 3.0.0 - * - * @param {number} x - The amount of horizontal acceleration to apply. - * @param {number} y - The amount of vertical acceleration to apply. - * - * @return {this} This Game Object. - */ - setAcceleration: function (x, y) - { - this.accel.x = x; - this.accel.y = y; - - return this; - } - -}; - -module.exports = Acceleration; - - -/***/ }), -/* 1324 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Body Scale component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.BodyScale - * @since 3.0.0 - */ -var BodyScale = { - - /** - * Sets the size of the physics body. - * - * @method Phaser.Physics.Impact.Components.BodyScale#setBodySize - * @since 3.0.0 - * - * @param {number} width - The width of the body in pixels. - * @param {number} [height=width] - The height of the body in pixels. - * - * @return {this} This Game Object. - */ - setBodySize: function (width, height) - { - if (height === undefined) { height = width; } - - this.body.size.x = Math.round(width); - this.body.size.y = Math.round(height); - - return this; - }, - - /** - * Sets the scale of the physics body. - * - * @method Phaser.Physics.Impact.Components.BodyScale#setBodyScale - * @since 3.0.0 - * - * @param {number} scaleX - The horizontal scale of the body. - * @param {number} [scaleY] - The vertical scale of the body. If not given, will use the horizontal scale value. - * - * @return {this} This Game Object. - */ - setBodyScale: function (scaleX, scaleY) - { - if (scaleY === undefined) { scaleY = scaleX; } - - var gameObject = this.body.gameObject; - - if (gameObject) - { - gameObject.setScale(scaleX, scaleY); - - return this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY); - } - else - { - return this.setBodySize(this.body.size.x * scaleX, this.body.size.y * scaleY); - } - } - -}; - -module.exports = BodyScale; - - -/***/ }), -/* 1325 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var TYPE = __webpack_require__(113); - -/** - * The Impact Body Type component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.BodyType - * @since 3.0.0 - */ -var BodyType = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.BodyType#getBodyType - * @since 3.0.0 - * - * @return {number} [description] - */ - getBodyType: function () - { - return this.body.type; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.BodyType#setTypeNone - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setTypeNone: function () - { - this.body.type = TYPE.NONE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.BodyType#setTypeA - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setTypeA: function () - { - this.body.type = TYPE.A; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.BodyType#setTypeB - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setTypeB: function () - { - this.body.type = TYPE.B; - - return this; - } - -}; - -module.exports = BodyType; - - -/***/ }), -/* 1326 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Bounce component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Bounce - * @since 3.0.0 - */ -var Bounce = { - - /** - * Sets the impact physics bounce, or restitution, value. - * - * @method Phaser.Physics.Impact.Components.Bounce#setBounce - * @since 3.0.0 - * - * @param {number} value - A value between 0 (no rebound) and 1 (full rebound) - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setBounce: function (value) - { - this.body.bounciness = value; - - return this; - }, - - /** - * Sets the minimum velocity the body is allowed to be moving to be considered for rebound. - * - * @method Phaser.Physics.Impact.Components.Bounce#setMinBounceVelocity - * @since 3.0.0 - * - * @param {number} value - The minimum allowed velocity. - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setMinBounceVelocity: function (value) - { - this.body.minBounceVelocity = value; - - return this; - }, - - /** - * The bounce, or restitution, value of this body. - * A value between 0 (no rebound) and 1 (full rebound) - * - * @name Phaser.Physics.Impact.Components.Bounce#bounce - * @type {number} - * @since 3.0.0 - */ - bounce: { - - get: function () - { - return this.body.bounciness; - }, - - set: function (value) - { - this.body.bounciness = value; - } - - } - -}; - -module.exports = Bounce; - - -/***/ }), -/* 1327 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var TYPE = __webpack_require__(113); - -/** - * The Impact Check Against component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.CheckAgainst - * @since 3.0.0 - */ -var CheckAgainst = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setAvsB - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setAvsB: function () - { - this.setTypeA(); - - return this.setCheckAgainstB(); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setBvsA - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setBvsA: function () - { - this.setTypeB(); - - return this.setCheckAgainstA(); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstNone - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCheckAgainstNone: function () - { - this.body.checkAgainst = TYPE.NONE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstA - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCheckAgainstA: function () - { - this.body.checkAgainst = TYPE.A; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstB - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCheckAgainstB: function () - { - this.body.checkAgainst = TYPE.B; - - return this; - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.CheckAgainst#checkAgainst - * @type {number} - * @since 3.0.0 - */ - checkAgainst: { - - get: function () - { - return this.body.checkAgainst; - }, - - set: function (value) - { - this.body.checkAgainst = value; - } - - } - -}; - -module.exports = CheckAgainst; - - -/***/ }), -/* 1328 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var COLLIDES = __webpack_require__(112); - -/** - * @callback CollideCallback - * - * @param {Phaser.Physics.Impact.Body} body - [description] - * @param {Phaser.Physics.Impact.Body} other - [description] - * @param {string} axis - [description] - */ - -/** - * The Impact Collides component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Collides - * @since 3.0.0 - */ -var Collides = { - - _collideCallback: null, - _callbackScope: null, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setCollideCallback - * @since 3.0.0 - * - * @param {CollideCallback} callback - [description] - * @param {*} scope - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCollideCallback: function (callback, scope) - { - this._collideCallback = callback; - - if (scope) - { - this._callbackScope = scope; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setCollidesNever - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCollidesNever: function () - { - this.body.collides = COLLIDES.NEVER; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setLiteCollision - * @since 3.6.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setLiteCollision: function () - { - this.body.collides = COLLIDES.LITE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setPassiveCollision - * @since 3.6.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setPassiveCollision: function () - { - this.body.collides = COLLIDES.PASSIVE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setActiveCollision - * @since 3.6.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setActiveCollision: function () - { - this.body.collides = COLLIDES.ACTIVE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setFixedCollision - * @since 3.6.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setFixedCollision: function () - { - this.body.collides = COLLIDES.FIXED; - - return this; - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Collides#collides - * @type {number} - * @since 3.0.0 - */ - collides: { - - get: function () - { - return this.body.collides; - }, - - set: function (value) - { - this.body.collides = value; - } - - } - -}; - -module.exports = Collides; - - -/***/ }), -/* 1329 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Debug component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Debug - * @since 3.0.0 - */ -var Debug = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Debug#setDebug - * @since 3.0.0 - * - * @param {boolean} showBody - [description] - * @param {boolean} showVelocity - [description] - * @param {number} bodyColor - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setDebug: function (showBody, showVelocity, bodyColor) - { - this.debugShowBody = showBody; - this.debugShowVelocity = showVelocity; - this.debugBodyColor = bodyColor; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Debug#setDebugBodyColor - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setDebugBodyColor: function (value) - { - this.body.debugBodyColor = value; - - return this; - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Debug#debugShowBody - * @type {boolean} - * @since 3.0.0 - */ - debugShowBody: { - - get: function () - { - return this.body.debugShowBody; - }, - - set: function (value) - { - this.body.debugShowBody = value; - } - - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Debug#debugShowVelocity - * @type {boolean} - * @since 3.0.0 - */ - debugShowVelocity: { - - get: function () - { - return this.body.debugShowVelocity; - }, - - set: function (value) - { - this.body.debugShowVelocity = value; - } - - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Debug#debugBodyColor - * @type {number} - * @since 3.0.0 - */ - debugBodyColor: { - - get: function () - { - return this.body.debugBodyColor; - }, - - set: function (value) - { - this.body.debugBodyColor = value; - } - - } - -}; - -module.exports = Debug; - - -/***/ }), -/* 1330 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Friction component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Friction - * @since 3.0.0 - */ -var Friction = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Friction#setFrictionX - * @since 3.0.0 - * - * @param {number} x - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setFrictionX: function (x) - { - this.friction.x = x; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Friction#setFrictionY - * @since 3.0.0 - * - * @param {number} y - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setFrictionY: function (y) - { - this.friction.y = y; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Friction#setFriction - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setFriction: function (x, y) - { - this.friction.x = x; - this.friction.y = y; - - return this; - } - -}; - -module.exports = Friction; - - -/***/ }), -/* 1331 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Gravity component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Gravity - * @since 3.0.0 - */ -var Gravity = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Gravity#setGravity - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setGravity: function (value) - { - this.body.gravityFactor = value; - - return this; - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Gravity#gravity - * @type {number} - * @since 3.0.0 - */ - gravity: { - - get: function () - { - return this.body.gravityFactor; - }, - - set: function (value) - { - this.body.gravityFactor = value; - } - - } - -}; - -module.exports = Gravity; - - -/***/ }), -/* 1332 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Offset component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Offset - * @since 3.0.0 - */ -var Offset = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Offset#setOffset - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} [width] - [description] - * @param {number} [height] - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setOffset: function (x, y, width, height) - { - this.body.offset.x = x; - this.body.offset.y = y; - - if (width) - { - this.setBodySize(width, height); - } - - return this; - } - -}; - -module.exports = Offset; - - -/***/ }), -/* 1333 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Set Game Object component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.SetGameObject - * @since 3.0.0 - */ -var SetGameObject = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.SetGameObject#setGameObject - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {boolean} [sync=true] - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setGameObject: function (gameObject, sync) - { - if (sync === undefined) { sync = true; } - - if (gameObject) - { - this.body.gameObject = gameObject; - - if (sync) - { - this.syncGameObject(); - } - } - else - { - this.body.gameObject = null; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.SetGameObject#syncGameObject - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - syncGameObject: function () - { - var gameObject = this.body.gameObject; - - if (gameObject) - { - this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY); - } - - return this; - } - -}; - -module.exports = SetGameObject; - - -/***/ }), -/* 1334 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Velocity component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Velocity - * @since 3.0.0 - */ -var Velocity = { - - /** - * Sets the horizontal velocity of the physics body. - * - * @method Phaser.Physics.Impact.Components.Velocity#setVelocityX - * @since 3.0.0 - * - * @param {number} x - The horizontal velocity value. - * - * @return {this} This Game Object. - */ - setVelocityX: function (x) - { - this.vel.x = x; - - return this; - }, - - /** - * Sets the vertical velocity of the physics body. - * - * @method Phaser.Physics.Impact.Components.Velocity#setVelocityY - * @since 3.0.0 - * - * @param {number} y - The vertical velocity value. - * - * @return {this} This Game Object. - */ - setVelocityY: function (y) - { - this.vel.y = y; - - return this; - }, - - /** - * Sets the horizontal and vertical velocities of the physics body. - * - * @method Phaser.Physics.Impact.Components.Velocity#setVelocity - * @since 3.0.0 - * - * @param {number} x - The horizontal velocity value. - * @param {number} [y=x] - The vertical velocity value. If not given, defaults to the horizontal value. - * - * @return {this} This Game Object. - */ - setVelocity: function (x, y) - { - if (y === undefined) { y = x; } - - this.vel.x = x; - this.vel.y = y; - - return this; - }, - - /** - * Sets the maximum velocity this body can travel at. - * - * @method Phaser.Physics.Impact.Components.Velocity#setMaxVelocity - * @since 3.0.0 - * - * @param {number} x - The maximum allowed horizontal velocity. - * @param {number} [y=x] - The maximum allowed vertical velocity. If not given, defaults to the horizontal value. - * - * @return {this} This Game Object. - */ - setMaxVelocity: function (x, y) - { - if (y === undefined) { y = x; } - - this.maxVel.x = x; - this.maxVel.y = y; - - return this; - } - -}; - -module.exports = Velocity; - - -/***/ }), -/* 1335 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Factory = __webpack_require__(498); -var GetFastValue = __webpack_require__(1); -var Merge = __webpack_require__(88); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); -var World = __webpack_require__(502); - -/** - * @classdesc - * [description] - * - * @class ImpactPhysics - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - */ -var ImpactPhysics = new Class({ - - initialize: - - function ImpactPhysics (scene) - { - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#systems - * @type {Phaser.Scenes.Systems} - * @since 3.0.0 - */ - this.systems = scene.sys; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#config - * @type {object} - * @since 3.0.0 - */ - this.config = this.getConfig(); - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#world - * @type {Phaser.Physics.Impact.World} - * @since 3.0.0 - */ - this.world; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#add - * @type {Phaser.Physics.Impact.Factory} - * @since 3.0.0 - */ - this.add; - - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); - }, - - /** - * This method is called automatically, only once, when the Scene is first created. - * Do not invoke it directly. - * - * @method Phaser.Physics.Impact.ImpactPhysics#boot - * @private - * @since 3.5.1 - */ - boot: function () - { - this.world = new World(this.scene, this.config); - this.add = new Factory(this.world); - - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); - }, - - /** - * This method is called automatically by the Scene when it is starting up. - * It is responsible for creating local systems, properties and listening for Scene events. - * Do not invoke it directly. - * - * @method Phaser.Physics.Impact.ImpactPhysics#start - * @private - * @since 3.5.0 - */ - start: function () - { - if (!this.world) - { - this.world = new World(this.scene, this.config); - this.add = new Factory(this.world); - } - - var eventEmitter = this.systems.events; - - eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world); - eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.ImpactPhysics#getConfig - * @since 3.0.0 - * - * @return {object} [description] - */ - getConfig: function () - { - var gameConfig = this.systems.game.config.physics; - var sceneConfig = this.systems.settings.physics; - - var config = Merge( - GetFastValue(sceneConfig, 'impact', {}), - GetFastValue(gameConfig, 'impact', {}) - ); - - return config; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.ImpactPhysics#pause - * @since 3.0.0 - * - * @return {Phaser.Physics.Impact.World} The Impact World object. - */ - pause: function () - { - return this.world.pause(); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.ImpactPhysics#resume - * @since 3.0.0 - * - * @return {Phaser.Physics.Impact.World} The Impact World object. - */ - resume: function () - { - return this.world.resume(); - }, - - /** - * 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. - * - * @method Phaser.Physics.Impact.ImpactPhysics#shutdown - * @private - * @since 3.0.0 - */ - shutdown: function () - { - var eventEmitter = this.systems.events; - - eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world); - eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this); - - this.add.destroy(); - this.world.destroy(); - - this.add = null; - this.world = null; - }, - - /** - * The Scene that owns this plugin is being destroyed. - * We need to shutdown and then kill off all external references. - * - * @method Phaser.Physics.Impact.ImpactPhysics#destroy - * @private - * @since 3.0.0 - */ - destroy: function () - { - this.shutdown(); - - this.scene.sys.events.off(SceneEvents.START, this.start, this); - - this.scene = null; - this.systems = null; - } - -}); - -PluginCache.register('ImpactPhysics', ImpactPhysics, 'impactPhysics'); - -module.exports = ImpactPhysics; - - -/***/ }), -/* 1336 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var COLLIDES = __webpack_require__(112); -var Events = __webpack_require__(231); -var SeparateX = __webpack_require__(1337); -var SeparateY = __webpack_require__(1338); - -/** - * Impact Physics Solver - * - * @function Phaser.Physics.Impact.Solver - * @fires Phaser.Physics.Impact.Events#COLLIDE - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - The Impact simulation to run the solver in. - * @param {Phaser.Physics.Impact.Body} bodyA - The first body in the collision. - * @param {Phaser.Physics.Impact.Body} bodyB - The second body in the collision. - */ -var Solver = function (world, bodyA, bodyB) -{ - var weak = null; - - if (bodyA.collides === COLLIDES.LITE || bodyB.collides === COLLIDES.FIXED) - { - weak = bodyA; - } - else if (bodyB.collides === COLLIDES.LITE || bodyA.collides === COLLIDES.FIXED) - { - weak = bodyB; - } - - if (bodyA.last.x + bodyA.size.x > bodyB.last.x && bodyA.last.x < bodyB.last.x + bodyB.size.x) - { - if (bodyA.last.y < bodyB.last.y) - { - SeparateY(world, bodyA, bodyB, weak); - } - else - { - SeparateY(world, bodyB, bodyA, weak); - } - - bodyA.collideWith(bodyB, 'y'); - bodyB.collideWith(bodyA, 'y'); - - world.emit(Events.COLLIDE, bodyA, bodyB, 'y'); - } - else if (bodyA.last.y + bodyA.size.y > bodyB.last.y && bodyA.last.y < bodyB.last.y + bodyB.size.y) - { - if (bodyA.last.x < bodyB.last.x) - { - SeparateX(world, bodyA, bodyB, weak); - } - else - { - SeparateX(world, bodyB, bodyA, weak); - } - - bodyA.collideWith(bodyB, 'x'); - bodyB.collideWith(bodyA, 'x'); - - world.emit(Events.COLLIDE, bodyA, bodyB, 'x'); - } -}; - -module.exports = Solver; - - -/***/ }), -/* 1337 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Physics.Impact.SeparateX - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @param {Phaser.Physics.Impact.Body} left - [description] - * @param {Phaser.Physics.Impact.Body} right - [description] - * @param {Phaser.Physics.Impact.Body} [weak] - [description] - */ -var SeparateX = function (world, left, right, weak) -{ - var nudge = left.pos.x + left.size.x - right.pos.x; - - // We have a weak entity, so just move this one - if (weak) - { - var strong = (left === weak) ? right : left; - - weak.vel.x = -weak.vel.x * weak.bounciness + strong.vel.x; - - var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, weak === left ? -nudge : nudge, 0, weak.size.x, weak.size.y); - - weak.pos.x = resWeak.pos.x; - } - else - { - var v2 = (left.vel.x - right.vel.x) / 2; - - left.vel.x = -v2; - right.vel.x = v2; - - var resLeft = world.collisionMap.trace(left.pos.x, left.pos.y, -nudge / 2, 0, left.size.x, left.size.y); - - left.pos.x = Math.floor(resLeft.pos.x); - - var resRight = world.collisionMap.trace(right.pos.x, right.pos.y, nudge / 2, 0, right.size.x, right.size.y); - - right.pos.x = Math.ceil(resRight.pos.x); - } -}; - -module.exports = SeparateX; - - -/***/ }), -/* 1338 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Physics.Impact.SeparateY - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @param {Phaser.Physics.Impact.Body} top - [description] - * @param {Phaser.Physics.Impact.Body} bottom - [description] - * @param {Phaser.Physics.Impact.Body} [weak] - [description] - */ -var SeparateY = function (world, top, bottom, weak) -{ - var nudge = (top.pos.y + top.size.y - bottom.pos.y); - var nudgeX; - var resTop; - - if (weak) - { - var strong = (top === weak) ? bottom : top; - - weak.vel.y = -weak.vel.y * weak.bounciness + strong.vel.y; - - // Riding on a platform? - nudgeX = 0; - - if (weak === top && Math.abs(weak.vel.y - strong.vel.y) < weak.minBounceVelocity) - { - weak.standing = true; - nudgeX = strong.vel.x * world.delta; - } - - var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, nudgeX, weak === top ? -nudge : nudge, weak.size.x, weak.size.y); - - weak.pos.y = resWeak.pos.y; - weak.pos.x = resWeak.pos.x; - } - else if (world.gravity && (bottom.standing || top.vel.y > 0)) - { - resTop = world.collisionMap.trace(top.pos.x, top.pos.y, 0, -(top.pos.y + top.size.y - bottom.pos.y), top.size.x, top.size.y); - - top.pos.y = resTop.pos.y; - - if (top.bounciness > 0 && top.vel.y > top.minBounceVelocity) - { - top.vel.y *= -top.bounciness; - } - else - { - top.standing = true; - top.vel.y = 0; - } - } - else - { - var v2 = (top.vel.y - bottom.vel.y) / 2; - - top.vel.y = -v2; - bottom.vel.y = v2; - - nudgeX = bottom.vel.x * world.delta; - - resTop = world.collisionMap.trace(top.pos.x, top.pos.y, nudgeX, -nudge / 2, top.size.x, top.size.y); - - top.pos.y = resTop.pos.y; - - var resBottom = world.collisionMap.trace(bottom.pos.x, bottom.pos.y, 0, nudge / 2, bottom.size.x, bottom.size.y); - - bottom.pos.y = resBottom.pos.y; - } -}; - -module.exports = SeparateY; - - -/***/ }), -/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192090,23 +190885,23 @@ module.exports = SeparateY; module.exports = { - 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) + BodyBounds: __webpack_require__(499), + Factory: __webpack_require__(500), + Image: __webpack_require__(502), + Matter: __webpack_require__(238), + MatterPhysics: __webpack_require__(1351), + PolyDecomp: __webpack_require__(501), + Sprite: __webpack_require__(503), + TileBody: __webpack_require__(237), + PhysicsEditorParser: __webpack_require__(234), + PhysicsJSONParser: __webpack_require__(235), + World: __webpack_require__(507) }; /***/ }), -/* 1340 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192115,8 +190910,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Components = __webpack_require__(147); -var GetFastValue = __webpack_require__(1); +var Components = __webpack_require__(149); +var GetFastValue = __webpack_require__(2); var Vector2 = __webpack_require__(3); /** @@ -192232,7 +191027,7 @@ module.exports = MatterGameObject; /***/ }), -/* 1341 */ +/* 1321 */ /***/ (function(module, exports) { /** @@ -192272,7 +191067,7 @@ module.exports = Bounce; /***/ }), -/* 1342 */ +/* 1322 */ /***/ (function(module, exports) { /** @@ -192458,7 +191253,7 @@ module.exports = Collision; /***/ }), -/* 1343 */ +/* 1323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192614,7 +191409,7 @@ module.exports = Force; /***/ }), -/* 1344 */ +/* 1324 */ /***/ (function(module, exports) { /** @@ -192704,7 +191499,7 @@ module.exports = Friction; /***/ }), -/* 1345 */ +/* 1325 */ /***/ (function(module, exports) { /** @@ -192744,7 +191539,7 @@ module.exports = Gravity; /***/ }), -/* 1346 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192826,7 +191621,7 @@ module.exports = Mass; /***/ }), -/* 1347 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192881,7 +191676,7 @@ module.exports = Static; /***/ }), -/* 1348 */ +/* 1328 */ /***/ (function(module, exports) { /** @@ -192935,7 +191730,7 @@ module.exports = Sensor; /***/ }), -/* 1349 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -192944,12 +191739,12 @@ module.exports = Sensor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bodies = __webpack_require__(42); +var Bodies = __webpack_require__(43); var Body = __webpack_require__(25); -var FuzzyEquals = __webpack_require__(126); -var GetFastValue = __webpack_require__(1); -var PhysicsEditorParser = __webpack_require__(235); -var PhysicsJSONParser = __webpack_require__(236); +var FuzzyEquals = __webpack_require__(96); +var GetFastValue = __webpack_require__(2); +var PhysicsEditorParser = __webpack_require__(234); +var PhysicsJSONParser = __webpack_require__(235); var Vertices = __webpack_require__(31); /** @@ -193225,7 +192020,7 @@ module.exports = SetBody; /***/ }), -/* 1350 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193234,9 +192029,9 @@ module.exports = SetBody; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(237); -var Sleeping = __webpack_require__(95); -var MatterEvents = __webpack_require__(96); +var Events = __webpack_require__(236); +var Sleeping = __webpack_require__(92); +var MatterEvents = __webpack_require__(93); /** * Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly. @@ -193379,7 +192174,7 @@ module.exports = Sleep; /***/ }), -/* 1351 */ +/* 1331 */ /***/ (function(module, exports) { /** @@ -193413,7 +192208,7 @@ module.exports = 'afteradd'; /***/ }), -/* 1352 */ +/* 1332 */ /***/ (function(module, exports) { /** @@ -193447,7 +192242,7 @@ module.exports = 'afterremove'; /***/ }), -/* 1353 */ +/* 1333 */ /***/ (function(module, exports) { /** @@ -193480,7 +192275,7 @@ module.exports = 'afterupdate'; /***/ }), -/* 1354 */ +/* 1334 */ /***/ (function(module, exports) { /** @@ -193514,7 +192309,7 @@ module.exports = 'beforeadd'; /***/ }), -/* 1355 */ +/* 1335 */ /***/ (function(module, exports) { /** @@ -193548,7 +192343,7 @@ module.exports = 'beforeremove'; /***/ }), -/* 1356 */ +/* 1336 */ /***/ (function(module, exports) { /** @@ -193581,7 +192376,7 @@ module.exports = 'beforeupdate'; /***/ }), -/* 1357 */ +/* 1337 */ /***/ (function(module, exports) { /** @@ -193618,7 +192413,7 @@ module.exports = 'collisionactive'; /***/ }), -/* 1358 */ +/* 1338 */ /***/ (function(module, exports) { /** @@ -193655,7 +192450,7 @@ module.exports = 'collisionend'; /***/ }), -/* 1359 */ +/* 1339 */ /***/ (function(module, exports) { /** @@ -193692,7 +192487,7 @@ module.exports = 'collisionstart'; /***/ }), -/* 1360 */ +/* 1340 */ /***/ (function(module, exports) { /** @@ -193719,7 +192514,7 @@ module.exports = 'dragend'; /***/ }), -/* 1361 */ +/* 1341 */ /***/ (function(module, exports) { /** @@ -193746,7 +192541,7 @@ module.exports = 'drag'; /***/ }), -/* 1362 */ +/* 1342 */ /***/ (function(module, exports) { /** @@ -193774,7 +192569,7 @@ module.exports = 'dragstart'; /***/ }), -/* 1363 */ +/* 1343 */ /***/ (function(module, exports) { /** @@ -193797,7 +192592,7 @@ module.exports = 'pause'; /***/ }), -/* 1364 */ +/* 1344 */ /***/ (function(module, exports) { /** @@ -193820,7 +192615,7 @@ module.exports = 'resume'; /***/ }), -/* 1365 */ +/* 1345 */ /***/ (function(module, exports) { /** @@ -193853,7 +192648,7 @@ module.exports = 'sleepend'; /***/ }), -/* 1366 */ +/* 1346 */ /***/ (function(module, exports) { /** @@ -193886,7 +192681,7 @@ module.exports = 'sleepstart'; /***/ }), -/* 1367 */ +/* 1347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193896,9 +192691,9 @@ module.exports = 'sleepstart'; */ var Body = __webpack_require__(25); -var MATH_CONST = __webpack_require__(13); -var WrapAngle = __webpack_require__(165); -var WrapAngleDegrees = __webpack_require__(166); +var MATH_CONST = __webpack_require__(14); +var WrapAngle = __webpack_require__(166); +var WrapAngleDegrees = __webpack_require__(167); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -194201,7 +192996,7 @@ module.exports = Transform; /***/ }), -/* 1368 */ +/* 1348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -194302,7 +193097,7 @@ module.exports = Velocity; /***/ }), -/* 1369 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -194311,15 +193106,15 @@ module.exports = Velocity; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bounds = __webpack_require__(38); +var Bounds = __webpack_require__(37); var Class = __webpack_require__(0); -var Composite = __webpack_require__(68); -var Constraint = __webpack_require__(78); -var Detector = __webpack_require__(148); -var Events = __webpack_require__(237); +var Composite = __webpack_require__(67); +var Constraint = __webpack_require__(79); +var Detector = __webpack_require__(150); +var Events = __webpack_require__(236); var InputEvents = __webpack_require__(56); -var Merge = __webpack_require__(88); -var Sleeping = __webpack_require__(95); +var Merge = __webpack_require__(104); +var Sleeping = __webpack_require__(92); var Vector2 = __webpack_require__(3); var Vertices = __webpack_require__(31); @@ -194690,7 +193485,7 @@ module.exports = PointerConstraint; /***/ }), -/* 1370 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -194703,8 +193498,8 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(68); -var Common = __webpack_require__(19); +var Composite = __webpack_require__(67); +var Common = __webpack_require__(20); (function() { @@ -194789,7 +193584,7 @@ var Common = __webpack_require__(19); /***/ }), -/* 1371 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -194798,39 +193593,39 @@ var Common = __webpack_require__(19); * @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 ALIGN_CONST = __webpack_require__(94); +var Axes = __webpack_require__(148); +var Bodies = __webpack_require__(43); var Body = __webpack_require__(25); -var BodyBounds = __webpack_require__(503); -var Bounds = __webpack_require__(38); +var BodyBounds = __webpack_require__(499); +var Bounds = __webpack_require__(37); var Class = __webpack_require__(0); -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 Composite = __webpack_require__(67); +var Composites = __webpack_require__(232); +var Constraint = __webpack_require__(79); +var Detector = __webpack_require__(150); +var DistanceBetween = __webpack_require__(55); +var Factory = __webpack_require__(500); +var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(5); -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 Grid = __webpack_require__(241); +var MatterAttractors = __webpack_require__(1352); +var MatterCollisionEvents = __webpack_require__(1353); +var MatterLib = __webpack_require__(504); +var MatterWrap = __webpack_require__(1354); +var Merge = __webpack_require__(104); +var Pair = __webpack_require__(112); +var Pairs = __webpack_require__(242); +var Plugin = __webpack_require__(239); +var PluginCache = __webpack_require__(24); +var Query = __webpack_require__(505); +var Resolver = __webpack_require__(243); +var SAT = __webpack_require__(151); +var SceneEvents = __webpack_require__(22); +var Svg = __webpack_require__(233); +var Vector = __webpack_require__(36); var Vertices = __webpack_require__(31); -var World = __webpack_require__(511); +var World = __webpack_require__(507); /** * @classdesc @@ -196258,10 +195053,10 @@ module.exports = MatterPhysics; /***/ }), -/* 1372 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(239); +var Matter = __webpack_require__(238); /** * An attractors plugin for matter.js. @@ -196400,7 +195195,7 @@ module.exports = MatterAttractors; /***/ }), -/* 1373 */ +/* 1353 */ /***/ (function(module, exports) { /** @@ -196533,10 +195328,10 @@ module.exports = MatterCollisionEvents; /***/ }), -/* 1374 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(239); +var Matter = __webpack_require__(238); /** * A coordinate wrapping plugin for matter.js. @@ -196715,7 +195510,7 @@ module.exports = MatterWrap; */ /***/ }), -/* 1375 */ +/* 1355 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196730,17 +195525,17 @@ module.exports = MatterWrap; module.exports = { - BasePlugin: __webpack_require__(512), + BasePlugin: __webpack_require__(508), DefaultPlugins: __webpack_require__(186), - PluginCache: __webpack_require__(22), - PluginManager: __webpack_require__(394), - ScenePlugin: __webpack_require__(1376) + PluginCache: __webpack_require__(24), + PluginManager: __webpack_require__(395), + ScenePlugin: __webpack_require__(1356) }; /***/ }), -/* 1376 */ +/* 1356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196749,9 +195544,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(512); +var BasePlugin = __webpack_require__(508); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(18); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -196868,7 +195663,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1377 */ +/* 1357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196887,15 +195682,15 @@ module.exports = ScenePlugin; module.exports = { - Canvas: __webpack_require__(1378), - Snapshot: __webpack_require__(1379), - WebGL: __webpack_require__(1380) + Canvas: __webpack_require__(1358), + Snapshot: __webpack_require__(1359), + WebGL: __webpack_require__(1360) }; /***/ }), -/* 1378 */ +/* 1358 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196910,15 +195705,15 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(358), - GetBlendModes: __webpack_require__(360), - SetTransform: __webpack_require__(29) + CanvasRenderer: __webpack_require__(357), + GetBlendModes: __webpack_require__(359), + SetTransform: __webpack_require__(30) }; /***/ }), -/* 1379 */ +/* 1359 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196933,14 +195728,14 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(359), - WebGL: __webpack_require__(362) + Canvas: __webpack_require__(358), + WebGL: __webpack_require__(361) }; /***/ }), -/* 1380 */ +/* 1360 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196956,9 +195751,9 @@ module.exports = { module.exports = { Utils: __webpack_require__(10), - WebGLPipeline: __webpack_require__(187), - WebGLRenderer: __webpack_require__(361), - Pipelines: __webpack_require__(1381), + WebGLPipeline: __webpack_require__(129), + WebGLRenderer: __webpack_require__(360), + Pipelines: __webpack_require__(1361), // Constants BYTE: 0, @@ -196971,7 +195766,7 @@ module.exports = { /***/ }), -/* 1381 */ +/* 1361 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196986,16 +195781,17 @@ module.exports = { module.exports = { - BitmapMaskPipeline: __webpack_require__(363), - ForwardDiffuseLightPipeline: __webpack_require__(364), - TextureTintPipeline: __webpack_require__(188), - ModelViewProjection: __webpack_require__(365) + BitmapMaskPipeline: __webpack_require__(362), + ForwardDiffuseLightPipeline: __webpack_require__(363), + TextureTintPipeline: __webpack_require__(187), + TextureTintStripPipeline: __webpack_require__(366), + ModelViewProjection: __webpack_require__(188) }; /***/ }), -/* 1382 */ +/* 1362 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197004,7 +195800,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); var CONST = __webpack_require__(190); /** @@ -197033,12 +195829,12 @@ var CONST = __webpack_require__(190); var Scale = { - Center: __webpack_require__(383), - Events: __webpack_require__(104), - Orientation: __webpack_require__(384), - ScaleManager: __webpack_require__(395), - ScaleModes: __webpack_require__(385), - Zoom: __webpack_require__(386) + Center: __webpack_require__(384), + Events: __webpack_require__(102), + Orientation: __webpack_require__(385), + ScaleManager: __webpack_require__(396), + ScaleModes: __webpack_require__(386), + Zoom: __webpack_require__(387) }; @@ -197051,7 +195847,7 @@ module.exports = Scale; /***/ }), -/* 1383 */ +/* 1363 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197060,8 +195856,8 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(132); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(133); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Scenes @@ -197069,10 +195865,10 @@ var Extend = __webpack_require__(17); var Scene = { - Events: __webpack_require__(18), - SceneManager: __webpack_require__(397), - ScenePlugin: __webpack_require__(1384), - Settings: __webpack_require__(399), + Events: __webpack_require__(22), + SceneManager: __webpack_require__(398), + ScenePlugin: __webpack_require__(1364), + Settings: __webpack_require__(400), Systems: __webpack_require__(193) }; @@ -197084,7 +195880,7 @@ module.exports = Scene; /***/ }), -/* 1384 */ +/* 1364 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197093,11 +195889,11 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(18); -var GetFastValue = __webpack_require__(1); -var PluginCache = __webpack_require__(22); +var Events = __webpack_require__(22); +var GetFastValue = __webpack_require__(2); +var PluginCache = __webpack_require__(24); /** * @classdesc @@ -197408,7 +196204,7 @@ var ScenePlugin = new Class({ if (target.sys.isSleeping()) { - target.sys.wake(); + target.sys.wake(GetFastValue(config, 'data')); } else { @@ -198094,7 +196890,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1385 */ +/* 1365 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198109,18 +196905,18 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(135), - Map: __webpack_require__(172), + List: __webpack_require__(136), + Map: __webpack_require__(173), ProcessQueue: __webpack_require__(199), - RTree: __webpack_require__(493), - Set: __webpack_require__(110), - Size: __webpack_require__(396) + RTree: __webpack_require__(496), + Set: __webpack_require__(140), + Size: __webpack_require__(397) }; /***/ }), -/* 1386 */ +/* 1366 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198129,8 +196925,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); -var FilterMode = __webpack_require__(1387); +var Extend = __webpack_require__(18); +var FilterMode = __webpack_require__(1367); /** * @namespace Phaser.Textures @@ -198156,14 +196952,14 @@ var FilterMode = __webpack_require__(1387); var Textures = { - CanvasTexture: __webpack_require__(401), + CanvasTexture: __webpack_require__(402), Events: __webpack_require__(128), FilterMode: FilterMode, - Frame: __webpack_require__(106), - Parsers: __webpack_require__(403), + Frame: __webpack_require__(105), + Parsers: __webpack_require__(404), Texture: __webpack_require__(195), - TextureManager: __webpack_require__(400), - TextureSource: __webpack_require__(402) + TextureManager: __webpack_require__(401), + TextureSource: __webpack_require__(403) }; @@ -198173,7 +196969,7 @@ module.exports = Textures; /***/ }), -/* 1387 */ +/* 1367 */ /***/ (function(module, exports) { /** @@ -198217,7 +197013,7 @@ module.exports = CONST; /***/ }), -/* 1388 */ +/* 1368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198232,30 +197028,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(150), - Parsers: __webpack_require__(1418), + Components: __webpack_require__(152), + Parsers: __webpack_require__(1398), - Formats: __webpack_require__(34), - 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), + Formats: __webpack_require__(35), + ImageCollection: __webpack_require__(519), + ParseToTilemap: __webpack_require__(251), + Tile: __webpack_require__(81), + Tilemap: __webpack_require__(528), + TilemapCreator: __webpack_require__(1407), + TilemapFactory: __webpack_require__(1408), + Tileset: __webpack_require__(116), - LayerData: __webpack_require__(116), - MapData: __webpack_require__(117), - ObjectLayer: __webpack_require__(526), + LayerData: __webpack_require__(114), + MapData: __webpack_require__(115), + ObjectLayer: __webpack_require__(522), - DynamicTilemapLayer: __webpack_require__(533), - StaticTilemapLayer: __webpack_require__(534) + DynamicTilemapLayer: __webpack_require__(529), + StaticTilemapLayer: __webpack_require__(530) }; /***/ }), -/* 1389 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198320,7 +197116,7 @@ module.exports = Copy; /***/ }), -/* 1390 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198329,10 +197125,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(152); -var TileToWorldY = __webpack_require__(153); +var TileToWorldX = __webpack_require__(154); +var TileToWorldY = __webpack_require__(155); var GetTilesWithin = __webpack_require__(26); -var ReplaceByIndex = __webpack_require__(513); +var ReplaceByIndex = __webpack_require__(509); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -198405,7 +197201,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1391 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198414,7 +197210,7 @@ module.exports = CreateFromTiles; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SnapFloor = __webpack_require__(105); +var SnapFloor = __webpack_require__(103); var SnapCeil = __webpack_require__(347); /** @@ -198562,7 +197358,7 @@ module.exports = CullTiles; /***/ }), -/* 1392 */ +/* 1372 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198573,7 +197369,7 @@ module.exports = CullTiles; var GetTilesWithin = __webpack_require__(26); var CalculateFacesWithin = __webpack_require__(59); -var SetTileCollision = __webpack_require__(79); +var SetTileCollision = __webpack_require__(80); /** * Sets the tiles in the given rectangular area (in tile coordinates) of the layer with the @@ -198616,7 +197412,7 @@ module.exports = Fill; /***/ }), -/* 1393 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198664,7 +197460,7 @@ module.exports = FilterTiles; /***/ }), -/* 1394 */ +/* 1374 */ /***/ (function(module, exports) { /** @@ -198752,7 +197548,7 @@ module.exports = FindByIndex; /***/ }), -/* 1395 */ +/* 1375 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198806,7 +197602,7 @@ module.exports = FindTile; /***/ }), -/* 1396 */ +/* 1376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198856,7 +197652,7 @@ module.exports = ForEachTile; /***/ }), -/* 1397 */ +/* 1377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198865,9 +197661,9 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(151); -var WorldToTileX = __webpack_require__(69); -var WorldToTileY = __webpack_require__(70); +var GetTileAt = __webpack_require__(153); +var WorldToTileX = __webpack_require__(68); +var WorldToTileY = __webpack_require__(69); /** * Gets a tile at the given world coordinates from the given layer. @@ -198897,7 +197693,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1398 */ +/* 1378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198906,14 +197702,14 @@ module.exports = GetTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(453); +var Geom = __webpack_require__(456); var GetTilesWithin = __webpack_require__(26); -var Intersects = __webpack_require__(454); -var NOOP = __webpack_require__(2); -var TileToWorldX = __webpack_require__(152); -var TileToWorldY = __webpack_require__(153); -var WorldToTileX = __webpack_require__(69); -var WorldToTileY = __webpack_require__(70); +var Intersects = __webpack_require__(457); +var NOOP = __webpack_require__(1); +var TileToWorldX = __webpack_require__(154); +var TileToWorldY = __webpack_require__(155); +var WorldToTileX = __webpack_require__(68); +var WorldToTileY = __webpack_require__(69); var TriangleToRectangle = function (triangle, rect) { @@ -198994,7 +197790,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1399 */ +/* 1379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199004,8 +197800,8 @@ module.exports = GetTilesWithinShape; */ var GetTilesWithin = __webpack_require__(26); -var WorldToTileX = __webpack_require__(69); -var WorldToTileY = __webpack_require__(70); +var WorldToTileX = __webpack_require__(68); +var WorldToTileY = __webpack_require__(69); /** * Gets the tiles in the given rectangular area (in world coordinates) of the layer. @@ -199044,7 +197840,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1400 */ +/* 1380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199053,9 +197849,9 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(514); -var WorldToTileX = __webpack_require__(69); -var WorldToTileY = __webpack_require__(70); +var HasTileAt = __webpack_require__(510); +var WorldToTileX = __webpack_require__(68); +var WorldToTileY = __webpack_require__(69); /** * Checks if there is a tile at the given location (in world coordinates) in the given layer. Returns @@ -199084,7 +197880,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1401 */ +/* 1381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199093,9 +197889,9 @@ module.exports = HasTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(246); -var WorldToTileX = __webpack_require__(69); -var WorldToTileY = __webpack_require__(70); +var PutTileAt = __webpack_require__(245); +var WorldToTileX = __webpack_require__(68); +var WorldToTileY = __webpack_require__(69); /** * Puts a tile at the given world coordinates (pixels) in the specified layer. You can pass in either @@ -199127,7 +197923,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1402 */ +/* 1382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199137,7 +197933,7 @@ module.exports = PutTileAtWorldXY; */ var CalculateFacesWithin = __webpack_require__(59); -var PutTileAt = __webpack_require__(246); +var PutTileAt = __webpack_require__(245); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -199191,7 +197987,7 @@ module.exports = PutTilesAt; /***/ }), -/* 1403 */ +/* 1383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199249,7 +198045,7 @@ module.exports = Randomize; /***/ }), -/* 1404 */ +/* 1384 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199258,9 +198054,9 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(515); -var WorldToTileX = __webpack_require__(69); -var WorldToTileY = __webpack_require__(70); +var RemoveTileAt = __webpack_require__(511); +var WorldToTileX = __webpack_require__(68); +var WorldToTileY = __webpack_require__(69); /** * Removes the tile at the given world coordinates in the specified layer and updates the layer's @@ -199290,7 +198086,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1405 */ +/* 1385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199300,7 +198096,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(26); -var Color = __webpack_require__(378); +var Color = __webpack_require__(379); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -199379,7 +198175,7 @@ module.exports = RenderDebug; /***/ }), -/* 1406 */ +/* 1386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199388,9 +198184,9 @@ module.exports = RenderDebug; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(79); +var SetTileCollision = __webpack_require__(80); var CalculateFacesWithin = __webpack_require__(59); -var SetLayerCollisionIndex = __webpack_require__(247); +var SetLayerCollisionIndex = __webpack_require__(246); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -199448,7 +198244,7 @@ module.exports = SetCollision; /***/ }), -/* 1407 */ +/* 1387 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199457,9 +198253,9 @@ module.exports = SetCollision; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(79); +var SetTileCollision = __webpack_require__(80); var CalculateFacesWithin = __webpack_require__(59); -var SetLayerCollisionIndex = __webpack_require__(247); +var SetLayerCollisionIndex = __webpack_require__(246); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -199523,7 +198319,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1408 */ +/* 1388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199532,9 +198328,9 @@ module.exports = SetCollisionBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(79); +var SetTileCollision = __webpack_require__(80); var CalculateFacesWithin = __webpack_require__(59); -var SetLayerCollisionIndex = __webpack_require__(247); +var SetLayerCollisionIndex = __webpack_require__(246); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -199580,7 +198376,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1409 */ +/* 1389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199589,9 +198385,9 @@ module.exports = SetCollisionByExclusion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(79); +var SetTileCollision = __webpack_require__(80); var CalculateFacesWithin = __webpack_require__(59); -var HasValue = __webpack_require__(91); +var HasValue = __webpack_require__(110); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -199655,7 +198451,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1410 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199664,7 +198460,7 @@ module.exports = SetCollisionByProperty; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTileCollision = __webpack_require__(79); +var SetTileCollision = __webpack_require__(80); var CalculateFacesWithin = __webpack_require__(59); /** @@ -199715,7 +198511,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1411 */ +/* 1391 */ /***/ (function(module, exports) { /** @@ -199762,7 +198558,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1412 */ +/* 1392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199805,7 +198601,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1413 */ +/* 1393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199815,7 +198611,7 @@ module.exports = SetTileLocationCallback; */ var GetTilesWithin = __webpack_require__(26); -var ShuffleArray = __webpack_require__(122); +var ShuffleArray = __webpack_require__(121); /** * Shuffles the tiles in a rectangular region (specified in tile coordinates) within the given @@ -199850,7 +198646,7 @@ module.exports = Shuffle; /***/ }), -/* 1414 */ +/* 1394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199901,7 +198697,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1415 */ +/* 1395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -199910,8 +198706,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(152); -var TileToWorldY = __webpack_require__(153); +var TileToWorldX = __webpack_require__(154); +var TileToWorldY = __webpack_require__(155); var Vector2 = __webpack_require__(3); /** @@ -199945,7 +198741,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1416 */ +/* 1396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200025,7 +198821,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1417 */ +/* 1397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200034,8 +198830,8 @@ module.exports = WeightedRandomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var WorldToTileX = __webpack_require__(69); -var WorldToTileY = __webpack_require__(70); +var WorldToTileX = __webpack_require__(68); +var WorldToTileY = __webpack_require__(69); var Vector2 = __webpack_require__(3); /** @@ -200070,7 +198866,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1418 */ +/* 1398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200085,18 +198881,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(516), - Parse2DArray: __webpack_require__(248), - ParseCSV: __webpack_require__(517), + Parse: __webpack_require__(512), + Parse2DArray: __webpack_require__(247), + ParseCSV: __webpack_require__(513), - Impact: __webpack_require__(1419), - Tiled: __webpack_require__(1420) + Impact: __webpack_require__(1399), + Tiled: __webpack_require__(1400) }; /***/ }), -/* 1419 */ +/* 1399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200111,15 +198907,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(530), - ParseTilesets: __webpack_require__(531), - ParseWeltmeister: __webpack_require__(529) + ParseTileLayers: __webpack_require__(526), + ParseTilesets: __webpack_require__(527), + ParseWeltmeister: __webpack_require__(525) }; /***/ }), -/* 1420 */ +/* 1400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200134,22 +198930,22 @@ module.exports = { module.exports = { - 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) + AssignTileProperties: __webpack_require__(524), + Base64Decode: __webpack_require__(516), + BuildTilesetIndex: __webpack_require__(523), + ParseGID: __webpack_require__(248), + ParseImageLayers: __webpack_require__(517), + ParseJSONTiled: __webpack_require__(514), + ParseObject: __webpack_require__(250), + ParseObjectLayers: __webpack_require__(521), + ParseTileLayers: __webpack_require__(515), + ParseTilesets: __webpack_require__(518) }; /***/ }), -/* 1421 */ +/* 1401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200158,17 +198954,17 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1422); + renderWebGL = __webpack_require__(1402); } if (true) { - renderCanvas = __webpack_require__(1423); + renderCanvas = __webpack_require__(1403); } module.exports = { @@ -200180,7 +198976,7 @@ module.exports = { /***/ }), -/* 1422 */ +/* 1402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200297,7 +199093,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1423 */ +/* 1403 */ /***/ (function(module, exports) { /** @@ -200429,7 +199225,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1424 */ +/* 1404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200438,17 +199234,17 @@ module.exports = DynamicTilemapLayerCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var renderWebGL = __webpack_require__(2); -var renderCanvas = __webpack_require__(2); +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1425); + renderWebGL = __webpack_require__(1405); } if (true) { - renderCanvas = __webpack_require__(1426); + renderCanvas = __webpack_require__(1406); } module.exports = { @@ -200460,7 +199256,7 @@ module.exports = { /***/ }), -/* 1425 */ +/* 1405 */ /***/ (function(module, exports) { /** @@ -200532,7 +199328,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1426 */ +/* 1406 */ /***/ (function(module, exports) { /** @@ -200666,7 +199462,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1427 */ +/* 1407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200676,7 +199472,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(252); +var ParseToTilemap = __webpack_require__(251); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -200710,7 +199506,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1428 */ +/* 1408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200720,7 +199516,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(6); -var ParseToTilemap = __webpack_require__(252); +var ParseToTilemap = __webpack_require__(251); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -200776,7 +199572,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1429 */ +/* 1409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200791,14 +199587,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1430), - TimerEvent: __webpack_require__(535) + Clock: __webpack_require__(1410), + TimerEvent: __webpack_require__(531) }; /***/ }), -/* 1430 */ +/* 1410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200808,9 +199604,9 @@ module.exports = { */ var Class = __webpack_require__(0); -var PluginCache = __webpack_require__(22); -var SceneEvents = __webpack_require__(18); -var TimerEvent = __webpack_require__(535); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); +var TimerEvent = __webpack_require__(531); /** * @classdesc @@ -201204,7 +200000,7 @@ module.exports = Clock; /***/ }), -/* 1431 */ +/* 1411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -201213,8 +200009,8 @@ module.exports = Clock; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(100); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(98); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Tweens @@ -201222,13 +200018,13 @@ var Extend = __webpack_require__(17); var Tweens = { - Builders: __webpack_require__(1432), - Events: __webpack_require__(257), + Builders: __webpack_require__(1412), + Events: __webpack_require__(256), - TweenManager: __webpack_require__(1447), - Tween: __webpack_require__(256), - TweenData: __webpack_require__(258), - Timeline: __webpack_require__(541) + TweenManager: __webpack_require__(1427), + Tween: __webpack_require__(255), + TweenData: __webpack_require__(257), + Timeline: __webpack_require__(537) }; @@ -201239,7 +200035,7 @@ module.exports = Tweens; /***/ }), -/* 1432 */ +/* 1412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -201254,23 +200050,23 @@ module.exports = Tweens; module.exports = { - 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) + GetBoolean: __webpack_require__(97), + GetEaseFunction: __webpack_require__(75), + GetNewValue: __webpack_require__(156), + GetProps: __webpack_require__(532), + GetTargets: __webpack_require__(252), + GetTweens: __webpack_require__(533), + GetValueOp: __webpack_require__(253), + NumberTweenBuilder: __webpack_require__(534), + StaggerBuilder: __webpack_require__(535), + TimelineBuilder: __webpack_require__(536), + TweenBuilder: __webpack_require__(157) }; /***/ }), -/* 1433 */ +/* 1413 */ /***/ (function(module, exports) { /** @@ -201345,7 +200141,7 @@ module.exports = [ /***/ }), -/* 1434 */ +/* 1414 */ /***/ (function(module, exports) { /** @@ -201381,7 +200177,7 @@ module.exports = 'complete'; /***/ }), -/* 1435 */ +/* 1415 */ /***/ (function(module, exports) { /** @@ -201418,7 +200214,7 @@ module.exports = 'loop'; /***/ }), -/* 1436 */ +/* 1416 */ /***/ (function(module, exports) { /** @@ -201455,7 +200251,7 @@ module.exports = 'pause'; /***/ }), -/* 1437 */ +/* 1417 */ /***/ (function(module, exports) { /** @@ -201492,7 +200288,7 @@ module.exports = 'resume'; /***/ }), -/* 1438 */ +/* 1418 */ /***/ (function(module, exports) { /** @@ -201528,7 +200324,7 @@ module.exports = 'start'; /***/ }), -/* 1439 */ +/* 1419 */ /***/ (function(module, exports) { /** @@ -201565,7 +200361,7 @@ module.exports = 'update'; /***/ }), -/* 1440 */ +/* 1420 */ /***/ (function(module, exports) { /** @@ -201605,7 +200401,7 @@ module.exports = 'active'; /***/ }), -/* 1441 */ +/* 1421 */ /***/ (function(module, exports) { /** @@ -201646,7 +200442,7 @@ module.exports = 'complete'; /***/ }), -/* 1442 */ +/* 1422 */ /***/ (function(module, exports) { /** @@ -201690,7 +200486,7 @@ module.exports = 'loop'; /***/ }), -/* 1443 */ +/* 1423 */ /***/ (function(module, exports) { /** @@ -201735,7 +200531,7 @@ module.exports = 'repeat'; /***/ }), -/* 1444 */ +/* 1424 */ /***/ (function(module, exports) { /** @@ -201775,7 +200571,7 @@ module.exports = 'start'; /***/ }), -/* 1445 */ +/* 1425 */ /***/ (function(module, exports) { /** @@ -201818,7 +200614,7 @@ module.exports = 'update'; /***/ }), -/* 1446 */ +/* 1426 */ /***/ (function(module, exports) { /** @@ -201864,7 +200660,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1447 */ +/* 1427 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -201873,15 +200669,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(130); +var ArrayRemove = __webpack_require__(131); var Class = __webpack_require__(0); -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); +var NumberTweenBuilder = __webpack_require__(534); +var PluginCache = __webpack_require__(24); +var SceneEvents = __webpack_require__(22); +var StaggerBuilder = __webpack_require__(535); +var TimelineBuilder = __webpack_require__(536); +var TWEEN_CONST = __webpack_require__(98); +var TweenBuilder = __webpack_require__(157); /** * @classdesc @@ -202636,7 +201432,7 @@ module.exports = TweenManager; /***/ }), -/* 1448 */ +/* 1428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202652,15 +201448,15 @@ module.exports = TweenManager; module.exports = { Array: __webpack_require__(196), - Base64: __webpack_require__(1449), - Objects: __webpack_require__(1451), - String: __webpack_require__(1455) + Base64: __webpack_require__(1429), + Objects: __webpack_require__(1431), + String: __webpack_require__(1435) }; /***/ }), -/* 1449 */ +/* 1429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202675,14 +201471,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1450), - Base64ToArrayBuffer: __webpack_require__(410) + ArrayBufferToBase64: __webpack_require__(1430), + Base64ToArrayBuffer: __webpack_require__(413) }; /***/ }), -/* 1450 */ +/* 1430 */ /***/ (function(module, exports) { /** @@ -202740,7 +201536,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1451 */ +/* 1431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202755,26 +201551,26 @@ module.exports = ArrayBufferToBase64; module.exports = { - Clone: __webpack_require__(73), - Extend: __webpack_require__(17), + Clone: __webpack_require__(72), + Extend: __webpack_require__(18), GetAdvancedValue: __webpack_require__(15), - GetFastValue: __webpack_require__(1), - GetMinMaxValue: __webpack_require__(1452), + GetFastValue: __webpack_require__(2), + GetMinMaxValue: __webpack_require__(1432), GetValue: __webpack_require__(5), - HasAll: __webpack_require__(1453), - HasAny: __webpack_require__(430), - HasValue: __webpack_require__(91), + HasAll: __webpack_require__(1433), + HasAny: __webpack_require__(433), + HasValue: __webpack_require__(110), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(88), - MergeRight: __webpack_require__(1454), - Pick: __webpack_require__(524), - SetValue: __webpack_require__(450) + Merge: __webpack_require__(104), + MergeRight: __webpack_require__(1434), + Pick: __webpack_require__(520), + SetValue: __webpack_require__(453) }; /***/ }), -/* 1452 */ +/* 1432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202784,7 +201580,7 @@ module.exports = { */ var GetValue = __webpack_require__(5); -var Clamp = __webpack_require__(20); +var Clamp = __webpack_require__(19); /** * Retrieves and clamps a numerical value from an object. @@ -202813,7 +201609,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1453 */ +/* 1433 */ /***/ (function(module, exports) { /** @@ -202850,7 +201646,7 @@ module.exports = HasAll; /***/ }), -/* 1454 */ +/* 1434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202859,7 +201655,7 @@ module.exports = HasAll; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(73); +var Clone = __webpack_require__(72); /** * Creates a new Object using all values from obj1. @@ -202893,7 +201689,7 @@ module.exports = MergeRight; /***/ }), -/* 1455 */ +/* 1435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202908,9 +201704,9 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1456), - Pad: __webpack_require__(173), - Reverse: __webpack_require__(1457), + Format: __webpack_require__(1436), + Pad: __webpack_require__(174), + Reverse: __webpack_require__(1437), UppercaseFirst: __webpack_require__(194), UUID: __webpack_require__(209) @@ -202918,7 +201714,7 @@ module.exports = { /***/ }), -/* 1456 */ +/* 1436 */ /***/ (function(module, exports) { /** @@ -202953,7 +201749,7 @@ module.exports = Format; /***/ }), -/* 1457 */ +/* 1437 */ /***/ (function(module, exports) { /** @@ -202982,7 +201778,7 @@ module.exports = Reverse; /***/ }), -/* 1458 */ +/* 1438 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -202998,21 +201794,21 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(404), + SoundManagerCreator: __webpack_require__(405), Events: __webpack_require__(64), - BaseSound: __webpack_require__(134), - BaseSoundManager: __webpack_require__(133), + BaseSound: __webpack_require__(135), + BaseSoundManager: __webpack_require__(134), - WebAudioSound: __webpack_require__(411), - WebAudioSoundManager: __webpack_require__(409), + WebAudioSound: __webpack_require__(414), + WebAudioSoundManager: __webpack_require__(412), - HTML5AudioSound: __webpack_require__(406), - HTML5AudioSoundManager: __webpack_require__(405), + HTML5AudioSound: __webpack_require__(409), + HTML5AudioSoundManager: __webpack_require__(406), - NoAudioSound: __webpack_require__(408), - NoAudioSoundManager: __webpack_require__(407) + NoAudioSound: __webpack_require__(411), + NoAudioSoundManager: __webpack_require__(410) }; diff --git a/dist/phaser-facebook-instant-games.min.js b/dist/phaser-facebook-instant-games.min.js index 1c170e033..2f7b4db9b 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=542)}([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(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;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},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*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},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},function(t,e,i){var n=i(0),s=i(53),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(555),AlphaSingle:i(286),Animation:i(287),BlendMode:i(290),ComputedSize:i(574),Crop:i(575),Depth:i(291),Flip:i(576),GetBounds:i(577),Mask:i(295),Origin:i(594),PathFollower:i(595),Pipeline:i(120),ScrollFactor:i(298),Size:i(596),Texture:i(597),TextureCrop:i(598),Tint:i(599),ToJSON:i(299),Transform:i(300),TransformMatrix:i(32),Visible:i(301)}},function(t,e,i){var n=i(0),s=i(299),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},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),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){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(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(24),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){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},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]"===Object.prototype.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){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={};t.exports=n;var s=i(31),r=i(36),o=i(92),a=i(20),h=i(37),l=i(148);!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(38),a=i(178),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=i(0),s=i(14),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(12),r=i(13),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,i){var n=i(0),s=i(176),r=i(313),o=i(177),a=i(314),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={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},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,i){var n={VERSION:"3.23.0",BlendModes:i(44),ScaleModes:i(158),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){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(14);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(669),FADE_IN_COMPLETE:i(670),FADE_IN_START:i(671),FADE_OUT_COMPLETE:i(672),FADE_OUT_START:i(673),FLASH_COMPLETE:i(674),FLASH_START:i(675),PAN_COMPLETE:i(676),PAN_START:i(677),POST_RENDER:i(678),PRE_RENDER:i(679),ROTATE_COMPLETE:i(680),ROTATE_START:i(681),SHAKE_COMPLETE:i(682),SHAKE_START:i(683),ZOOM_COMPLETE:i(684),ZOOM_START:i(685)}},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(20),o=i(25),a=i(37),h=i(36),l=i(501);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={BOOT:i(844),DESTROY:i(845),DRAG_END:i(846),DRAG_ENTER:i(847),DRAG:i(848),DRAG_LEAVE:i(849),DRAG_OVER:i(850),DRAG_START:i(851),DROP:i(852),GAME_OUT:i(853),GAME_OVER:i(854),GAMEOBJECT_DOWN:i(855),GAMEOBJECT_DRAG_END:i(856),GAMEOBJECT_DRAG_ENTER:i(857),GAMEOBJECT_DRAG:i(858),GAMEOBJECT_DRAG_LEAVE:i(859),GAMEOBJECT_DRAG_OVER:i(860),GAMEOBJECT_DRAG_START:i(861),GAMEOBJECT_DROP:i(862),GAMEOBJECT_MOVE:i(863),GAMEOBJECT_OUT:i(864),GAMEOBJECT_OVER:i(865),GAMEOBJECT_POINTER_DOWN:i(866),GAMEOBJECT_POINTER_MOVE:i(867),GAMEOBJECT_POINTER_OUT:i(868),GAMEOBJECT_POINTER_OVER:i(869),GAMEOBJECT_POINTER_UP:i(870),GAMEOBJECT_POINTER_WHEEL:i(871),GAMEOBJECT_UP:i(872),GAMEOBJECT_WHEEL:i(873),MANAGER_BOOT:i(874),MANAGER_PROCESS:i(875),MANAGER_UPDATE:i(876),POINTER_DOWN:i(877),POINTER_DOWN_OUTSIDE:i(878),POINTER_MOVE:i(879),POINTER_OUT:i(880),POINTER_OVER:i(881),POINTER_UP:i(882),POINTER_UP_OUTSIDE:i(883),POINTER_WHEEL:i(884),POINTERLOCK_CHANGE:i(885),PRE_UPDATE:i(886),SHUTDOWN:i(887),START:i(888),UPDATE:i(889)}},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(153),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(293),r=i(163),o=i(53),a=i(164),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(912),DECODED:i(913),DECODED_ALL:i(914),DESTROY:i(915),DETUNE:i(916),GLOBAL_DETUNE:i(917),GLOBAL_MUTE:i(918),GLOBAL_RATE:i(919),GLOBAL_VOLUME:i(920),LOOP:i(921),LOOPED:i(922),MUTE:i(923),PAUSE_ALL:i(924),PAUSE:i(925),PLAY:i(926),RATE:i(927),RESUME_ALL:i(928),RESUME:i(929),SEEK:i(930),STOP_ALL:i(931),STOP:i(932),UNLOCKED:i(933),VOLUME:i(934)}},function(t,e,i){var n=i(0),s=i(17),r=i(23),o=i(8),a=i(2),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)&&(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(13),o=i(993),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(122),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,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(17),r=i(23),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;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(470),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(891),COMPLETE:i(892),FILE_COMPLETE:i(893),FILE_KEY_COMPLETE:i(894),FILE_LOAD_ERROR:i(895),FILE_LOAD:i(896),FILE_PROGRESS:i(897),POST_PROCESS:i(898),PROGRESS:i(899),START:i(900)}},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(93);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(20);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,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(725),FULLSCREEN_FAILED:i(726),FULLSCREEN_UNSUPPORTED:i(727),LEAVE_FULLSCREEN:i(728),ORIENTATION_CHANGE:i(729),RESIZE:i(730)}},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(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(19),r=i(18),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(107),r=i(424),o=i(425),a=i(53),h=i(168),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(258),s=i(0),r=i(100),o=i(2),a=i(5),h=i(7),l=i(418),u=i(140),c=i(74),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=this.firstgid&&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,i){var n=i(320),s=i(321),r=i(322),o=i(323),a=i(324),h=i(325),l=i(326),u=i(327),c=i(328),d=i(329),f=i(330),p=i(331);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},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(751))},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){return Math.random()*(e-t)+t}},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(803),ERROR:i(804),LOAD:i(805),READY:i(806),REMOVE:i(807)}},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){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(86);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(21),h=i(1),l=i(407),u=i(408),c=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,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,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},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return l(this.sounds,"key",t)},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)},removeAll:function(){this.sounds.forEach(function(t){t.destroy()}),this.sounds.length=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)},stopByKey:function(t){var e=0;return this.getAll(t).forEach(function(t){t.stop()&&e++}),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},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.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),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=c},function(t,e,i){var n=i(0),s=i(9),r=i(64),o=i(18),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(196),s=i(0),r=i(1),o=i(138),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(416);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(a-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&&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(1243),ANY_KEY_UP:i(1244),COMBO_MATCH:i(1245),DOWN:i(1246),KEY_DOWN:i(1247),KEY_UP:i(1248),UP:i(1249)}},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,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(230),r=i(74),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(36),r=i(20);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(36);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))1?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(19),s=i(0),r=i(9),o=i(118),a=i(288),h=i(289),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._repeatDelay&&!t.pendingRepeat||(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&&i>0&&(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(312),s=i(315),r=i(317),o=i(318);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(176);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(71),r=i(2),o=i(188),a=i(364),h=i(365),l=i(32),u=i(10),c=i(129),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),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),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),F=Math.round(F)),this.setTexture2D(a,0);var Y=t._isTinted&&t.tintFill;this.batchQuad(C,M,P,O,R,L,D,F,h,l,c,d,k,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,F=m/i+_,k=y/n+C,I=(m+x)/i+_,B=(y+T)/n+C,N=o,Y=a,X=-g,U=-v;if(t.isCropped){var z=t._crop;N=z.width,Y=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+_,k=W/n+C,I=(G+z.width)/i+_,B=(W+z.height)/n+C,X=-g+m,U=-v+y}d^=!O&&e.isRenderTexture?1:0,c&&(N*=-1,X+=o),d&&(Y*=-1,U+=a);var V=X+N,H=U+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,U),q=D.getY(X,U),K=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),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,F,k,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,F,P,O,H[0],H[1],H[2],H[3],z,G,W,V,B,N,Y,X,I):(j[0]=D,j[1]=F,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],z,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){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(11),s=i(14);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(44),r=i(0),o=i(12),a=i(100),h=i(13),l=i(11),u=i(980),c=i(420),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.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,s=i[0].getBounds();t.setTo(s.x,s.y,s.width,s.height);for(var r=1;r-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(139),s=i(0),r=i(985),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(205),o=i(286),a=i(290),h=i(291),l=i(295),u=i(120),c=i(300),d=i(301),f=i(298),p=i(32),g=i(106),v=i(13),m=i(2),y=i(5),x=i(14),T=i(991),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(13),o=i(428),a=i(136),h=i(430),l=i(1001),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;rr&&(o=t[r]),s[r]=o,t.length>r+1&&(o=t[r+1]),s[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,n=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var s=0;if(t.length===e)for(i=0;is&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;nl){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&&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(13),h=i(346),l=i(178),u=i(1020),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(19),r=i(12),o=i(100),a=i(21),h=i(13),l=i(64),u=i(209),c=i(1023),d=i(14),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(215),r=i(445),o=i(53),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(221);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(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(90),r=i(458);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(1229),BUTTON_UP:i(1230),CONNECTED:i(1231),DISCONNECTED:i(1232),GAMEPAD_BUTTON_DOWN:i(1233),GAMEPAD_BUTTON_UP:i(1234)}},function(t,e,i){var n=i(18),s=i(146);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(17),r=i(23),o=i(8),a=i(2),h=i(7),l=i(389),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=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={}),l(t,"isStatic")||(t.isStatic=!0),l(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={}),l(t,"isStatic")||(t.isStatic=!0),l(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(),a=this.tile.getCollisionGroup(),c=h(a,"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,this.removeAllListeners()}});t.exports=c},function(t,e,i){var n=i(504);n.Body=i(25),n.Composite=i(67),n.World=i(240),n.Detector=i(150),n.Grid=i(241),n.Pairs=i(242),n.Pair=i(112),n.Query=i(505),n.Resolver=i(243),n.SAT=i(151),n.Constraint=i(79),n.Common=i(20),n.Engine=i(506),n.Events=i(93),n.Sleeping=i(92),n.Plugin=i(239),n.Bodies=i(43),n.Composites=i(232),n.Axes=i(148),n.Bounds=i(37),n.Svg=i(233),n.Vector=i(36),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(20);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(67),r=(i(79),i(20));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(112),r=i(150),o=i(20);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(112),r=i(20);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*F*i&&(I=R,k=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,k*=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 U=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+k,-I,I),k=b.tangentImpulse-U}s.x=m.x*D+y.x*k,s.y=m.y*D+y.y*k,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(153);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(81),s=i(113),r=i(244),o=i(80);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(35),s=i(114),r=i(115),o=i(81);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(1414),TIMELINE_LOOP:i(1415),TIMELINE_PAUSE:i(1416),TIMELINE_RESUME:i(1417),TIMELINE_START:i(1418),TIMELINE_UPDATE:i(1419),TWEEN_ACTIVE:i(1420),TWEEN_COMPLETE:i(1421),TWEEN_LOOP:i(1422),TWEEN_REPEAT:i(1423),TWEEN_START:i(1424),TWEEN_UPDATE:i(1425),TWEEN_YOYO:i(1426)}},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(549),Angle:i(550),Call:i(551),GetFirst:i(552),GetLast:i(553),GridAlign:i(554),IncAlpha:i(615),IncX:i(616),IncXY:i(617),IncY:i(618),PlaceOnCircle:i(619),PlaceOnEllipse:i(620),PlaceOnLine:i(621),PlaceOnRectangle:i(622),PlaceOnTriangle:i(623),PlayAnimation:i(624),PropertyValueInc:i(39),PropertyValueSet:i(27),RandomCircle:i(625),RandomEllipse:i(626),RandomLine:i(627),RandomRectangle:i(628),RandomTriangle:i(629),Rotate:i(630),RotateAround:i(631),RotateAroundDistance:i(632),ScaleX:i(633),ScaleXY:i(634),ScaleY:i(635),SetAlpha:i(636),SetBlendMode:i(637),SetDepth:i(638),SetHitArea:i(639),SetOrigin:i(640),SetRotation:i(641),SetScale:i(642),SetScaleX:i(643),SetScaleY:i(644),SetScrollFactor:i(645),SetScrollFactorX:i(646),SetScrollFactorY:i(647),SetTint:i(648),SetVisible:i(649),SetX:i(650),SetXY:i(651),SetY:i(652),ShiftPosition:i(653),Shuffle:i(654),SmootherStep:i(655),SmoothStep:i(656),Spread:i(657),ToggleVisible:i(658),WrapInRectangle:i(659)}},function(t,e,i){var n=i(94),s=[];s[n.BOTTOM_CENTER]=i(260),s[n.BOTTOM_LEFT]=i(261),s[n.BOTTOM_RIGHT]=i(262),s[n.LEFT_BOTTOM]=i(263),s[n.LEFT_CENTER]=i(264),s[n.LEFT_TOP]=i(265),s[n.RIGHT_BOTTOM]=i(266),s[n.RIGHT_CENTER]=i(267),s[n.RIGHT_TOP]=i(268),s[n.TOP_CENTER]=i(269),s[n.TOP_LEFT]=i(270),s[n.TOP_RIGHT]=i(271);t.exports=function(t,e,i,n,r){return s[i](t,e,n,r)}},function(t,e,i){var n=i(45),s=i(82),r=i(83),o=i(46);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(45),s=i(47),r=i(48),o=i(46);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(45),s=i(49),r=i(50),o=i(46);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(45),s=i(47),r=i(51),o=i(50);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(84),s=i(47),r=i(85),o=i(50);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(47),s=i(52),r=i(50),o=i(46);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(51),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(84),s=i(49),r=i(85),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(49),s=i(52),r=i(48),o=i(46);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(82),s=i(52),r=i(51),o=i(83);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(47),s=i(52),r=i(51),o=i(48);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(49),s=i(52),r=i(51),o=i(50);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(94),s=[];s[n.BOTTOM_CENTER]=i(273),s[n.BOTTOM_LEFT]=i(274),s[n.BOTTOM_RIGHT]=i(275),s[n.CENTER]=i(276),s[n.LEFT_CENTER]=i(278),s[n.RIGHT_CENTER]=i(279),s[n.TOP_CENTER]=i(280),s[n.TOP_LEFT]=i(281),s[n.TOP_RIGHT]=i(282),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(45),s=i(82),r=i(51),o=i(83);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(45),s=i(47),r=i(51),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(45),s=i(49),r=i(51),o=i(50);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(277),s=i(82),r=i(84);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(83),s=i(85);t.exports=function(t,e,i){return n(t,e),s(t,i)}},function(t,e,i){var n=i(84),s=i(47),r=i(85),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(84),s=i(49),r=i(85),o=i(50);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(82),s=i(52),r=i(83),o=i(46);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(52),r=i(48),o=i(46);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(49),s=i(52),r=i(50),o=i(46);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(159),s=i(95),r=i(14),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(285),s=i(159),r=i(95),o=i(14);t.exports=function(t,e,i,a){void 0===a&&(a=[]),!e&&i>0&&(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(),e._originComponent&&(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(44),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(162),s=i(119);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(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.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),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(34);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(34);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(34);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(686),Flash:i(687),Pan:i(688),Shake:i(721),RotateTo:i(722),Zoom:i(723)}},function(t,e,i){t.exports={In:i(689),Out:i(690),InOut:i(691)}},function(t,e,i){t.exports={In:i(692),Out:i(693),InOut:i(694)}},function(t,e,i){t.exports={In:i(695),Out:i(696),InOut:i(697)}},function(t,e,i){t.exports={In:i(698),Out:i(699),InOut:i(700)}},function(t,e,i){t.exports={In:i(701),Out:i(702),InOut:i(703)}},function(t,e,i){t.exports={In:i(704),Out:i(705),InOut:i(706)}},function(t,e,i){t.exports=i(707)},function(t,e,i){t.exports={In:i(708),Out:i(709),InOut:i(710)}},function(t,e,i){t.exports={In:i(711),Out:i(712),InOut:i(713)}},function(t,e,i){t.exports={In:i(714),Out:i(715),InOut:i(716)}},function(t,e,i){t.exports={In:i(717),Out:i(718),InOut:i(719)}},function(t,e,i){t.exports=i(720)},function(t,e,i){var n=i(0),s=i(38),r=i(333),o=i(2),a=i(5),h=i(7),l=i(181),u=i(1),c=i(186),d=i(175),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.loaderWithCredentials=a(t,"loader.withCredentials",!1),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(752),audio:i(753),video:i(754),fullscreen:i(755),canvasFeatures:i(334)}},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){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},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(185),r=i(352),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(356),s=i(28),r=i(38),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(357),h=i(360),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(358),s=i(41),r=i(0),o=i(38),a=i(359),h=i(102),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(28),s=i(34),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(44),s=i(334);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(41),r=i(0),o=i(38),a=i(21),h=i(127),l=i(1),u=i(102),c=i(86),d=i(128),f=i(32),p=i(10),g=i(361),v=i(362),m=i(363),y=i(187),x=i(366),T=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){this.setPipeline(this.pipelines.TextureTintPipeline);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){if(e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),t.renderToGame){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){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){var n=i(0),s=i(2),r=i(188),o=i(364),a=i(365),h=i(32),l=i(129),u=new n({Extends:l,Mixins:[r],initialize:function(t){var e=t.renderer.config;l.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.renderer.gl.TRIANGLE_STRIP,vertShader:s(t,"vertShader",a),fragShader:s(t,"fragShader",o),vertexCapacity:s(t,"vertexCapacity",6*e.batchSize),vertexSize:s(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 h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.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}});t.exports=u},function(t,e,i){var n=i(38);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(1),o=i(369),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(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(372),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(391),l=i(392),u=i(393),c=i(394),d=i(32),f=i(350),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(335),s=i(0),r=i(55),o=i(96),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.call(screen,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.setAspectRatio(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(19),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(133),r=i(22),o=i(21),a=i(5),h=i(88),l=i(1),u=i(399),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;i.sceneUpdate=l,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=o(this.currentConfig.volume*this.manager.volume,0,1))},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=a},function(t,e,i){var n=i(134),s=i(0),r=i(9),o=i(411),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(135),s=i(0),r=i(9),o=i(18),a=function(){return!1},h=function(){return this},l=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:a,updateMarker:a,removeMarker:function(){return null},play:a,pause:a,resume:a,stop:a,destroy:function(){n.prototype.destroy.call(this)},setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h});t.exports=l},function(t,e,i){var n=i(413),s=i(134),r=i(0),o=i(64),a=i(414),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(135),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,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(121),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(983),o=i(13),a=i(7),h=i(191),l=i(22),u=i(351),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;e0&&(e=n(t)/i);for(var h=0;h>>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(44),s=i(0),r=i(12),o=i(431),a=i(432),h=i(1e3),l=i(2),u=i(198),c=i(433),d=i(110),f=i(429),p=i(434),g=i(11),v=i(138),m=i(3),y=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 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(1029),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;s0&&(e=h/i);for(var l=0;lc+v)){var m=g.getPoint((u-c)/v);o.push(m);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(1050),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(1053),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(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&&i>0&&(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(53),s=i(18),r={Circle:i(1116),Ellipse:i(1126),Intersects:i(457),Line:i(1145),Point:i(1167),Polygon:i(1181),Rectangle:i(470),Triangle:i(1212)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(218),CircleToRectangle:i(219),GetCircleToCircle:i(1136),GetCircleToRectangle:i(1137),GetLineToCircle:i(220),GetLineToRectangle:i(222),GetRectangleIntersection:i(1138),GetRectangleToRectangle:i(1139),GetRectangleToTriangle:i(1140),GetTriangleToCircle:i(1141),GetTriangleToLine:i(462),GetTriangleToTriangle:i(1142),LineToCircle:i(221),LineToLine:i(90),LineToRectangle:i(458),PointToLine:i(466),PointToLineSegment:i(1143),RectangleToRectangle:i(142),RectangleToTriangle:i(459),RectangleToValues:i(1144),TriangleToCircle:i(461),TriangleToLine:i(463),TriangleToTriangle:i(464)}},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(90),s=i(54),r=i(223),o=i(460);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(221),s=i(89);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(14),s=i(63),r=i(91);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(1186),n.Ceil=i(1187),n.CeilAll=i(1188),n.CenterOn=i(179),n.Clone=i(1189),n.Contains=i(54),n.ContainsPoint=i(1190),n.ContainsRect=i(471),n.CopyFrom=i(1191),n.Decompose=i(460),n.Equals=i(1192),n.FitInside=i(1193),n.FitOutside=i(1194),n.Floor=i(1195),n.FloorAll=i(1196),n.FromPoints=i(189),n.FromXY=i(1197),n.GetAspectRatio=i(225),n.GetCenter=i(1198),n.GetPoint=i(162),n.GetPoints=i(292),n.GetSize=i(1199),n.Inflate=i(1200),n.Intersection=i(1201),n.MarchingAnts=i(303),n.MergePoints=i(1202),n.MergeRect=i(1203),n.MergeXY=i(1204),n.Offset=i(1205),n.OffsetPoint=i(1206),n.Overlaps=i(1207),n.Perimeter=i(119),n.PerimeterPoint=i(1208),n.Random=i(165),n.RandomOutside=i(1209),n.SameDimensions=i(1210),n.Scale=i(1211),n.Union=i(420),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(476),s=i(477),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(this.fixedStep||(s=.001*e,a=!0,this._elapsed=0),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&&!u.checkCollision.none)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.width-t)/2,r=(n.height-e)/2;this.offset.set(s,r)}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(417);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(60),s=i(0),r=i(58),o=i(54),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight: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(this.position.x+this.halfWidth,this.position.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(3),r=new n({initialize:function(){this.boundsCenter=new s,this.centerDiff=new s},parseBody:function(t){if(!(t=t.hasOwnProperty("body")?t.body:t).hasOwnProperty("bounds")||!t.hasOwnProperty("centerOfMass"))return!1;var e=this.boundsCenter,i=this.centerDiff,n=t.bounds.max.x-t.bounds.min.x,s=t.bounds.max.y-t.bounds.min.y,r=n*t.centerOfMass.x,o=s*t.centerOfMass.y;return e.set(n/2,s/2),i.set(r-e.x,o-e.y),!0},getTopLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+n.y+r.y)}return!1},getTopCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i+n.y+r.y)}return!1},getTopRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+n.y+r.y)}return!1},getLeftCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i+r.y)}return!1},getCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.centerDiff;return new s(e+n.x,i+n.y)}return!1},getRightCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i+r.y)}return!1},getBottomLeft:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+n.x+r.x,i-(n.y-r.y))}return!1},getBottomCenter:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e+r.x,i-(n.y-r.y))}return!1},getBottomRight:function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),this.parseBody(t)){var n=this.boundsCenter,r=this.centerDiff;return new s(e-(n.x-r.x),i-(n.y-r.y))}return!1}});t.exports=r},function(t,e,i){var n=i(43),s=i(0),r=i(232),o=i(79),a=i(233),h=i(1320),l=i(502),u=i(503),c=i(237),d=i(234),f=i(235),p=i(1349),g=i(31),v=new s({initialize:function(t){this.world=t,this.scene=t.scene,this.sys=t.scene.sys},rectangle:function(t,e,i,s,r){var o=n.rectangle(t,e,i,s,r);return this.world.add(o),o},trapezoid:function(t,e,i,s,r,o){var a=n.trapezoid(t,e,i,s,r,o);return this.world.add(a),a},circle:function(t,e,i,s,r){var o=n.circle(t,e,i,s,r);return this.world.add(o),o},polygon:function(t,e,i,s,r){var o=n.polygon(t,e,i,s,r);return this.world.add(o),o},fromVertices:function(t,e,i,s,r,o,a){"string"==typeof i&&(i=g.fromPath(i));var h=n.fromVertices(t,e,i,s,r,o,a);return this.world.add(h),h},fromPhysicsEditor:function(t,e,i,n,s){void 0===s&&(s=!0);var r=d.parseBody(t,e,i,n);return s&&!this.world.has(r)&&this.world.add(r),r},fromSVG:function(t,e,i,s,r,o){void 0===s&&(s=1),void 0===r&&(r={}),void 0===o&&(o=!0);for(var h=i.getElementsByTagName("path"),l=[],u=0;u=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(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){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(81),s=i(113),r=i(244);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(35),s=i(247),r=i(513),o=i(514),a=i(525);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(35),s=i(247);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(35),s=i(115),r=i(515),o=i(517),a=i(518),h=i(521),l=i(523),u=i(524);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(516),s=i(2),r=i(114),o=i(248),a=i(81),h=i(249);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,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(249);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(116),s=i(519),r=i(250);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(81);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(116);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(13),a=i(1404),h=i(152),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(1413);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(254),s=i(15),r=i(97),o=i(75),a=i(156),h=i(5),l=i(253),u=i(255),c=i(257);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;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%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>>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(311),BaseCamera:i(101),CameraManager:i(724),Effects:i(319),Events:i(41)}},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="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},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(19),s=i(0),r=i(41),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(19),s=i(0),r=i(41),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._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(f=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>f&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?s.rotation+o*r:s.rotation-o*r,s.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,u)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},function(t,e,i){var n=i(19),s=i(0),r=i(122),o=i(41),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===n&&(n=!1),void 0===s&&(s=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning?h:(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t),h)},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),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(126);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(126);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(336);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(14);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(171);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(103),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(353),r=i(354),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,i){t.exports={GenerateTexture:i(371),Palettes:i(812)}},function(t,e,i){t.exports={ARNE16:i(372),C64:i(813),CGA:i(814),JMP:i(815),MSX:i(816)}},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(818),CubicBezier:i(373),Curve:i(87),Ellipse:i(374),Line:i(375),QuadraticBezier:i(376),Spline:i(377)}},function(t,e,i){var n=i(0),s=i(373),r=i(374),o=i(6),a=i(375),h=i(819),l=i(376),u=i(11),c=i(377),d=i(3),f=i(14),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)},getTangent: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.getTangentAt(h,e)}s++}return null},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(34),s=i(381);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(177);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(34);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(380);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(296),GeometryMask:i(297)}},function(t,e,i){var n={AddToDOM:i(130),DOMContentLoaded:i(382),GetScreenOrientation:i(383),GetTarget:i(388),ParseXML:i(389),RemoveFromDOM:i(191),RequestAnimationFrame:i(369)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(841)}},function(t,e,i){var n=i(0),s=i(9),r=i(24),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(130),s=i(307),r=i(310),o=i(28),a=i(0),h=i(332),l=i(843),u=i(355),c=i(99),d=i(367),f=i(333),p=i(382),g=i(9),v=i(21),m=i(390),y=i(24),x=i(395),T=i(396),w=i(398),b=i(128),E=i(401),S=i(368),A=i(370),_=i(405),C=i(415),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 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.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.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(130);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(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(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){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(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(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){for(n=0;nl||z-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,F=[],k=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=U.wrappedText).length);var z=e._bounds.lines;1===N?X=(z.longest-z.lengths[0])/2:2===N&&(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===P?R=(D.longest-D.lengths[0])/2:2===P&&(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(981),s=i(982),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,P=0,O=0,R=e.letterSpacing,L=0,D=0,F=0,k=0,I=e.scrollX,B=e.scrollY,N=e.fontData,Y=N.chars,X=N.lineHeight,U=e.fontSize/N.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,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(k+Math.cos(N)*B,I+Math.sin(N)*B,v),E.push(_),F+=.01);F<1+U;)w=Y*F+N,x=k+Math.cos(w)*B,T=I+Math.sin(w)*B,_.points.push(new r(x,T,v)),F+=.01;w=Y+N,x=k+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:k=p[++P],I=p[++P],f.translate(k,I);break;case n.SCALE:k=p[++P],I=p[++P],f.scale(k,I);break;case n.ROTATE:f.rotate(p[++P]);break;case n.SET_TEXTURE:var z=p[++P],G=p[++P];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(994),s=i(995),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(997),s=i(998),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(428),Particle:i(429),ParticleEmitter:i(430),ParticleEmitterManager:i(207),Zones:i(1004)}},function(t,e,i){var n=i(0),s=i(126),r=i(75),o=i(2),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(1),s=i(1);n=i(1002),s=i(1003),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(1),s=i(1);n=i(1016),s=i(1017),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(1019),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(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(106);n.Area=i(1127),n.Circumference=i(426),n.CircumferencePoint=i(206),n.Clone=i(1128),n.Contains=i(107),n.ContainsPoint=i(1129),n.ContainsRect=i(1130),n.CopyFrom=i(1131),n.Equals=i(1132),n.GetBounds=i(1133),n.GetPoint=i(424),n.GetPoints=i(425),n.Offset=i(1134),n.OffsetPoint=i(1135),n.Random=i(168),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(106);t.exports=function(t){return new n(t.x,t.y,t.width,t.height)}},function(t,e,i){var n=i(107);t.exports=function(t,e){return n(t,e.x,e.y)}},function(t,e,i){var n=i(107);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(218);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(220),s=i(219);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(142);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(222),s=i(142);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(459),s=i(222);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(220),s=i(461);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(464),s=i(462);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(466);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||s0){var m=u[0],y=[m];for(h=1;h=o&&(y.push(x),m=x)}var T=u[u.length-1];return n(m,T)i&&(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(11);t.exports=function(t,e,i,s,r){return void 0===r&&(r=new n),r.setTo(Math.min(t,i),Math.min(e,s),Math.abs(t-i),Math.abs(e-s))}},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(179);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(142);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(144),KeyboardManager:i(391),KeyboardPlugin:i(1250),Key:i(479),KeyCodes:i(132),KeyCombo:i(480),JustDown:i(1255),JustUp:i(1256),DownDuration:i(1257),UpDuration:i(1258)}},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(144),o=i(21),a=i(5),h=i(56),l=i(143),u=i(479),c=i(132),d=i(480),f=i(1254),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(132),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(490),s=i(70),r=i(218),o=i(219);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(1316);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(494);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(495);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={BodyBounds:i(499),Factory:i(500),Image:i(502),Matter:i(238),MatterPhysics:i(1351),PolyDecomp:i(501),Sprite:i(503),TileBody:i(237),PhysicsEditorParser:i(234),PhysicsJSONParser:i(235),World:i(507)}},function(t,e,i){var n=i(149),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=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(136),Map:i(173),ProcessQueue:i(199),RTree:i(496),Set:i(140),Size:i(397)}},function(t,e,i){var n=i(18),s=i(1367),r={CanvasTexture:i(402),Events:i(128),FilterMode:s,Frame:i(105),Parsers:i(404),Texture:i(195),TextureManager:i(401),TextureSource:i(403)};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(152),Parsers:i(1398),Formats:i(35),ImageCollection:i(519),ParseToTilemap:i(251),Tile:i(81),Tilemap:i(528),TilemapCreator:i(1407),TilemapFactory:i(1408),Tileset:i(116),LayerData:i(114),MapData:i(115),ObjectLayer:i(522),DynamicTilemapLayer:i(529),StaticTilemapLayer:i(530)}},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>=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(59),r=i(80);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(80),s=i(59),r=i(246);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(72),Extend:i(18),GetAdvancedValue:i(15),GetFastValue:i(2),GetMinMaxValue:i(1432),GetValue:i(5),HasAll:i(1433),HasAny:i(433),HasValue:i(110),IsPlainObject:i(7),Merge:i(104),MergeRight:i(1434),Pick:i(520),SetValue:i(453)}},function(t,e,i){var n=i(5),s=i(19);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 max) + { + this.scale(max / len); + } + + return this; + }, + + /** + * Reflect this Vector off a line defined by a normal. + * + * @method Phaser.Math.Vector2#reflect + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} normal - A vector perpendicular to the line. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + reflect: function (normal) + { + normal = normal.clone().normalize(); + + return this.subtract(normal.scale(2 * this.dot(normal))); + }, + + /** + * Reflect this Vector across another. + * + * @method Phaser.Math.Vector2#mirror + * @since 3.23.0 + * + * @param {Phaser.Math.Vector2} axis - A vector to reflect across. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + mirror: function (axis) + { + return this.reflect(axis).negate(); + }, + + /** + * Rotate this Vector by an angle amount. + * + * @method Phaser.Math.Vector2#rotate + * @since 3.23.0 + * + * @param {number} delta - The angle to rotate by, in radians. + * + * @return {Phaser.Math.Vector2} This Vector2. + */ + rotate: function (delta) + { + var cos = Math.cos(delta); + var sin = Math.sin(delta); + + return this.set(cos * this.x - sin * this.y, sin * this.x + cos * this.y); } }); /** * A static zero Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -996,7 +1133,7 @@ Vector2.ZERO = new Vector2(); /** * A static right Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1008,7 +1145,7 @@ Vector2.RIGHT = new Vector2(1, 0); /** * A static left Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1020,7 +1157,7 @@ Vector2.LEFT = new Vector2(-1, 0); /** * A static up Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1032,7 +1169,7 @@ Vector2.UP = new Vector2(0, -1); /** * A static down Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1044,7 +1181,7 @@ Vector2.DOWN = new Vector2(0, 1); /** * A static one Vector2 for use by reference. - * + * * This constant is meant for comparison operations and should not be modified directly. * * @constant @@ -1068,7 +1205,7 @@ module.exports = Vector2; */ var Class = __webpack_require__(0); -var GEOM_CONST = __webpack_require__(46); +var GEOM_CONST = __webpack_require__(47); /** * @classdesc @@ -1132,7 +1269,7 @@ var Point = new Class({ * @param {number} [x=0] - The x coordinate of this Point. * @param {number} [y=x] - The y coordinate of this Point. * - * @return {Phaser.Geom.Point} This Point object. + * @return {this} This Point object. */ setTo: function (x, y) { @@ -1162,7 +1299,7 @@ module.exports = Point; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -1566,6 +1703,141 @@ module.exports = FileTypesManager; /***/ }), /* 9 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Renderer.WebGL.Utils + * @since 3.0.0 + */ +module.exports = { + + /** + * Packs four floats on a range from 0.0 to 1.0 into a single Uint32 + * + * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats + * @since 3.0.0 + * + * @param {number} r - Red component in a range from 0.0 to 1.0 + * @param {number} g - Green component in a range from 0.0 to 1.0 + * @param {number} b - Blue component in a range from 0.0 to 1.0 + * @param {number} a - Alpha component in a range from 0.0 to 1.0 + * + * @return {number} The packed RGBA values as a Uint32. + */ + getTintFromFloats: function (r, g, b, a) + { + var ur = ((r * 255.0)|0) & 0xFF; + var ug = ((g * 255.0)|0) & 0xFF; + var ub = ((b * 255.0)|0) & 0xFF; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; + }, + + /** + * Packs a Uint24, representing RGB components, with a Float32, representing + * the alpha component, with a range between 0.0 and 1.0 and return a Uint32 + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha + * @since 3.0.0 + * + * @param {number} rgb - Uint24 representing RGB components + * @param {number} a - Float32 representing Alpha component + * + * @return {number} Packed RGBA as Uint32 + */ + getTintAppendFloatAlpha: function (rgb, a) + { + var ua = ((a * 255.0)|0) & 0xFF; + return ((ua << 24) | rgb) >>> 0; + }, + + /** + * Packs a Uint24, representing RGB components, with a Float32, representing + * the alpha component, with a range between 0.0 and 1.0 and return a + * swizzled Uint32 + * + * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap + * @since 3.0.0 + * + * @param {number} rgb - Uint24 representing RGB components + * @param {number} a - Float32 representing Alpha component + * + * @return {number} Packed RGBA as Uint32 + */ + getTintAppendFloatAlphaAndSwap: function (rgb, a) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + var ua = ((a * 255.0)|0) & 0xFF; + + return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; + }, + + /** + * Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0 + * + * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB + * @since 3.0.0 + * + * @param {number} rgb - RGB packed as a Uint24 + * + * @return {array} Array of floats representing each component as a float + */ + getFloatsFromUintRGB: function (rgb) + { + var ur = ((rgb >> 16)|0) & 0xff; + var ug = ((rgb >> 8)|0) & 0xff; + var ub = (rgb|0) & 0xff; + + return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; + }, + + /** + * Counts how many attributes of 32 bits a vertex has + * + * @function Phaser.Renderer.WebGL.Utils.getComponentCount + * @since 3.0.0 + * + * @param {array} attributes - Array of attributes + * @param {WebGLRenderingContext} glContext - WebGLContext used for check types + * + * @return {number} Count of 32 bit attributes in vertex + */ + getComponentCount: function (attributes, glContext) + { + var count = 0; + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + + if (element.type === glContext.FLOAT) + { + count += element.size; + } + else + { + count += 1; // We'll force any other type to be 32 bit. for now + } + } + + return count; + } + +}; + + +/***/ }), +/* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; @@ -1907,141 +2179,6 @@ if (true) { } -/***/ }), -/* 10 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Renderer.WebGL.Utils - * @since 3.0.0 - */ -module.exports = { - - /** - * Packs four floats on a range from 0.0 to 1.0 into a single Uint32 - * - * @function Phaser.Renderer.WebGL.Utils.getTintFromFloats - * @since 3.0.0 - * - * @param {number} r - Red component in a range from 0.0 to 1.0 - * @param {number} g - Green component in a range from 0.0 to 1.0 - * @param {number} b - Blue component in a range from 0.0 to 1.0 - * @param {number} a - Alpha component in a range from 0.0 to 1.0 - * - * @return {number} [description] - */ - getTintFromFloats: function (r, g, b, a) - { - var ur = ((r * 255.0)|0) & 0xFF; - var ug = ((g * 255.0)|0) & 0xFF; - var ub = ((b * 255.0)|0) & 0xFF; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ur << 16) | (ug << 8) | ub) >>> 0; - }, - - /** - * Packs a Uint24, representing RGB components, with a Float32, representing - * the alpha component, with a range between 0.0 and 1.0 and return a Uint32 - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlpha - * @since 3.0.0 - * - * @param {number} rgb - Uint24 representing RGB components - * @param {number} a - Float32 representing Alpha component - * - * @return {number} Packed RGBA as Uint32 - */ - getTintAppendFloatAlpha: function (rgb, a) - { - var ua = ((a * 255.0)|0) & 0xFF; - return ((ua << 24) | rgb) >>> 0; - }, - - /** - * Packs a Uint24, representing RGB components, with a Float32, representing - * the alpha component, with a range between 0.0 and 1.0 and return a - * swizzled Uint32 - * - * @function Phaser.Renderer.WebGL.Utils.getTintAppendFloatAlphaAndSwap - * @since 3.0.0 - * - * @param {number} rgb - Uint24 representing RGB components - * @param {number} a - Float32 representing Alpha component - * - * @return {number} Packed RGBA as Uint32 - */ - getTintAppendFloatAlphaAndSwap: function (rgb, a) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - var ua = ((a * 255.0)|0) & 0xFF; - - return ((ua << 24) | (ub << 16) | (ug << 8) | ur) >>> 0; - }, - - /** - * Unpacks a Uint24 RGB into an array of floats of ranges of 0.0 and 1.0 - * - * @function Phaser.Renderer.WebGL.Utils.getFloatsFromUintRGB - * @since 3.0.0 - * - * @param {number} rgb - RGB packed as a Uint24 - * - * @return {array} Array of floats representing each component as a float - */ - getFloatsFromUintRGB: function (rgb) - { - var ur = ((rgb >> 16)|0) & 0xff; - var ug = ((rgb >> 8)|0) & 0xff; - var ub = (rgb|0) & 0xff; - - return [ ur / 255.0, ug / 255.0, ub / 255.0 ]; - }, - - /** - * Counts how many attributes of 32 bits a vertex has - * - * @function Phaser.Renderer.WebGL.Utils.getComponentCount - * @since 3.0.0 - * - * @param {array} attributes - Array of attributes - * @param {WebGLRenderingContext} glContext - WebGLContext used for check types - * - * @return {number} Count of 32 bit attributes in vertex - */ - getComponentCount: function (attributes, glContext) - { - var count = 0; - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - - if (element.type === glContext.FLOAT) - { - count += element.size; - } - else - { - count += 1; // We'll force any other type to be 32 bit. for now - } - } - - return count; - } - -}; - - /***/ }), /* 11 */ /***/ (function(module, exports, __webpack_require__) { @@ -2053,12 +2190,12 @@ module.exports = { */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(47); -var GetPoint = __webpack_require__(149); -var GetPoints = __webpack_require__(271); -var GEOM_CONST = __webpack_require__(46); +var Contains = __webpack_require__(48); +var GetPoint = __webpack_require__(152); +var GetPoints = __webpack_require__(274); +var GEOM_CONST = __webpack_require__(47); var Line = __webpack_require__(56); -var Random = __webpack_require__(152); +var Random = __webpack_require__(155); /** * @classdesc @@ -2222,7 +2359,7 @@ var Rectangle = new Class({ * @param {number} width - The width of the Rectangle. * @param {number} height - The height of the Rectangle. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setTo: function (x, y, width, height) { @@ -2240,7 +2377,7 @@ var Rectangle = new Class({ * @method Phaser.Geom.Rectangle#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setEmpty: function () { @@ -2256,7 +2393,7 @@ var Rectangle = new Class({ * @param {number} x - The X coordinate of the top left corner of the Rectangle. * @param {number} [y=x] - The Y coordinate of the top left corner of the Rectangle. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setPosition: function (x, y) { @@ -2277,7 +2414,7 @@ var Rectangle = new Class({ * @param {number} width - The width to set the Rectangle to. * @param {number} [height=width] - The height to set the Rectangle to. * - * @return {Phaser.Geom.Rectangle} This Rectangle object. + * @return {this} This Rectangle object. */ setSize: function (width, height) { @@ -2569,126 +2706,34 @@ module.exports = Rectangle; module.exports = { - 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__(280) + Alpha: __webpack_require__(532), + AlphaSingle: __webpack_require__(269), + Animation: __webpack_require__(503), + BlendMode: __webpack_require__(272), + ComputedSize: __webpack_require__(551), + Crop: __webpack_require__(552), + Depth: __webpack_require__(273), + Flip: __webpack_require__(553), + GetBounds: __webpack_require__(554), + Mask: __webpack_require__(277), + Origin: __webpack_require__(571), + PathFollower: __webpack_require__(572), + Pipeline: __webpack_require__(156), + ScrollFactor: __webpack_require__(280), + Size: __webpack_require__(573), + Texture: __webpack_require__(574), + TextureCrop: __webpack_require__(575), + Tint: __webpack_require__(576), + ToJSON: __webpack_require__(281), + Transform: __webpack_require__(282), + TransformMatrix: __webpack_require__(29), + Visible: __webpack_require__(283) }; /***/ }), /* 13 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var MATH_CONST = { - - /** - * The value of PI * 2. - * - * @name Phaser.Math.PI2 - * @type {number} - * @since 3.0.0 - */ - PI2: Math.PI * 2, - - /** - * The value of PI * 0.5. - * - * @name Phaser.Math.TAU - * @type {number} - * @since 3.0.0 - */ - TAU: Math.PI * 0.5, - - /** - * An epsilon value (1.0e-6) - * - * @name Phaser.Math.EPSILON - * @type {number} - * @since 3.0.0 - */ - EPSILON: 1.0e-6, - - /** - * For converting degrees to radians (PI / 180) - * - * @name Phaser.Math.DEG_TO_RAD - * @type {number} - * @since 3.0.0 - */ - DEG_TO_RAD: Math.PI / 180, - - /** - * For converting radians to degrees (180 / PI) - * - * @name Phaser.Math.RAD_TO_DEG - * @type {number} - * @since 3.0.0 - */ - RAD_TO_DEG: 180 / Math.PI, - - /** - * An instance of the Random Number Generator. - * This is not set until the Game boots. - * - * @name Phaser.Math.RND - * @type {Phaser.Math.RandomDataGenerator} - * @since 3.0.0 - */ - RND: null, - - /** - * The minimum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MIN_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, - - /** - * The maximum safe integer this browser supports. - * We use a const for backward compatibility with Internet Explorer. - * - * @name Phaser.Math.MAX_SAFE_INTEGER - * @type {number} - * @since 3.21.0 - */ - MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 - -}; - -module.exports = MATH_CONST; - - -/***/ }), -/* 14 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -2698,9 +2743,9 @@ module.exports = MATH_CONST; */ var Class = __webpack_require__(0); -var ComponentsToJSON = __webpack_require__(278); +var ComponentsToJSON = __webpack_require__(281); var DataManager = __webpack_require__(113); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(90); /** @@ -2859,10 +2904,10 @@ var GameObject = new Class({ this.input = null; /** - * If this Game Object is enabled for physics then this property will contain a reference to a Physics Body. + * If this Game Object is enabled for Arcade or Matter Physics then this property will contain a reference to a Physics Body. * * @name Phaser.GameObjects.GameObject#body - * @type {?(object|Phaser.Physics.Arcade.Body|Phaser.Physics.Impact.Body)} + * @type {?(object|Phaser.Physics.Arcade.Body|MatterJS.BodyType)} * @default null * @since 3.0.0 */ @@ -3023,6 +3068,65 @@ var GameObject = new Class({ return this; }, + /** + * Increase a value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * 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. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#incData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {this} This GameObject. + */ + incData: function (key, value) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.inc(key, value); + + return this; + }, + + /** + * Toggle a boolean value for the given key within this Game Objects Data Manager. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * 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. + * + * When the value is first set, a `setdata` event is emitted from this Game Object. + * + * @method Phaser.GameObjects.GameObject#toggleData + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {this} This GameObject. + */ + toggleData: function (key) + { + if (!this.data) + { + this.data = new DataManager(this); + } + + this.data.toggle(key); + + return this; + }, + /** * Retrieves the value for the given key in this Game Objects Data Manager, or undefined if it doesn't exist. * @@ -3329,7 +3433,7 @@ module.exports = GameObject; /***/ }), -/* 15 */ +/* 14 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -3338,7 +3442,7 @@ module.exports = GameObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH = __webpack_require__(168); +var MATH = __webpack_require__(170); var GetValue = __webpack_require__(6); /** @@ -3415,6 +3519,98 @@ var GetAdvancedValue = function (source, key, defaultValue) module.exports = GetAdvancedValue; +/***/ }), +/* 15 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var MATH_CONST = { + + /** + * The value of PI * 2. + * + * @name Phaser.Math.PI2 + * @type {number} + * @since 3.0.0 + */ + PI2: Math.PI * 2, + + /** + * The value of PI * 0.5. + * + * @name Phaser.Math.TAU + * @type {number} + * @since 3.0.0 + */ + TAU: Math.PI * 0.5, + + /** + * An epsilon value (1.0e-6) + * + * @name Phaser.Math.EPSILON + * @type {number} + * @since 3.0.0 + */ + EPSILON: 1.0e-6, + + /** + * For converting degrees to radians (PI / 180) + * + * @name Phaser.Math.DEG_TO_RAD + * @type {number} + * @since 3.0.0 + */ + DEG_TO_RAD: Math.PI / 180, + + /** + * For converting radians to degrees (180 / PI) + * + * @name Phaser.Math.RAD_TO_DEG + * @type {number} + * @since 3.0.0 + */ + RAD_TO_DEG: 180 / Math.PI, + + /** + * An instance of the Random Number Generator. + * This is not set until the Game boots. + * + * @name Phaser.Math.RND + * @type {Phaser.Math.RandomDataGenerator} + * @since 3.0.0 + */ + RND: null, + + /** + * The minimum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MIN_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MIN_SAFE_INTEGER: Number.MIN_SAFE_INTEGER || -9007199254740991, + + /** + * The maximum safe integer this browser supports. + * We use a const for backward compatibility with Internet Explorer. + * + * @name Phaser.Math.MAX_SAFE_INTEGER + * @type {number} + * @since 3.21.0 + */ + MAX_SAFE_INTEGER: Number.MAX_SAFE_INTEGER || 9007199254740991 + +}; + +module.exports = MATH_CONST; + + /***/ }), /* 16 */ /***/ (function(module, exports, __webpack_require__) { @@ -3427,7 +3623,7 @@ module.exports = GetAdvancedValue; var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -3585,180 +3781,6 @@ module.exports = GameObjectCreator; /***/ }), /* 17 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var IsPlainObject = __webpack_require__(7); - -// @param {boolean} deep - Perform a deep copy? -// @param {object} target - The target object to copy to. -// @return {object} The extended object. - -/** - * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ - * - * @function Phaser.Utils.Objects.Extend - * @since 3.0.0 - * - * @return {object} The extended object. - */ -var Extend = function () -{ - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if (typeof target === 'boolean') - { - deep = target; - target = arguments[1] || {}; - - // skip the boolean and the target - i = 2; - } - - // extend Phaser if only one argument is passed - if (length === i) - { - target = this; - --i; - } - - for (; i < length; i++) - { - // Only deal with non-null/undefined values - if ((options = arguments[i]) != null) - { - // Extend the base object - for (name in options) - { - src = target[name]; - copy = options[name]; - - // Prevent never-ending loop - if (target === copy) - { - continue; - } - - // Recurse if we're merging plain objects or arrays - if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) - { - if (copyIsArray) - { - copyIsArray = false; - clone = src && Array.isArray(src) ? src : []; - } - else - { - clone = src && IsPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[name] = Extend(deep, clone, copy); - - // Don't bring in undefined values - } - else if (copy !== undefined) - { - target[name] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -module.exports = Extend; - - -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Core.Events - */ - -module.exports = { - - 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) { /** @@ -3909,6 +3931,173 @@ var FILE_CONST = { module.exports = FILE_CONST; +/***/ }), +/* 18 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var IsPlainObject = __webpack_require__(7); + +// @param {boolean} deep - Perform a deep copy? +// @param {object} target - The target object to copy to. +// @return {object} The extended object. + +/** + * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ + * + * @function Phaser.Utils.Objects.Extend + * @since 3.0.0 + * + * @param {...*} [args] - The objects that will be mixed. + * + * @return {object} The extended object. + */ +var Extend = function () +{ + var options, name, src, copy, copyIsArray, clone, + target = arguments[0] || {}, + i = 1, + length = arguments.length, + deep = false; + + // Handle a deep copy situation + if (typeof target === 'boolean') + { + deep = target; + target = arguments[1] || {}; + + // skip the boolean and the target + i = 2; + } + + // extend Phaser if only one argument is passed + if (length === i) + { + target = this; + --i; + } + + for (; i < length; i++) + { + // Only deal with non-null/undefined values + if ((options = arguments[i]) != null) + { + // Extend the base object + for (name in options) + { + src = target[name]; + copy = options[name]; + + // Prevent never-ending loop + if (target === copy) + { + continue; + } + + // Recurse if we're merging plain objects or arrays + if (deep && copy && (IsPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) + { + if (copyIsArray) + { + copyIsArray = false; + clone = src && Array.isArray(src) ? src : []; + } + else + { + clone = src && IsPlainObject(src) ? src : {}; + } + + // Never move original objects, clone them + target[name] = Extend(deep, clone, copy); + + // Don't bring in undefined values + } + else if (copy !== undefined) + { + target[name] = copy; + } + } + } + } + + // Return the modified object + return target; +}; + +module.exports = Extend; + + +/***/ }), +/* 19 */ +/***/ (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; + + +/***/ }), +/* 20 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Core.Events + */ + +module.exports = { + + BLUR: __webpack_require__(555), + BOOT: __webpack_require__(556), + CONTEXT_LOST: __webpack_require__(557), + CONTEXT_RESTORED: __webpack_require__(558), + DESTROY: __webpack_require__(559), + FOCUS: __webpack_require__(560), + HIDDEN: __webpack_require__(561), + PAUSE: __webpack_require__(562), + POST_RENDER: __webpack_require__(563), + POST_STEP: __webpack_require__(564), + PRE_RENDER: __webpack_require__(565), + PRE_STEP: __webpack_require__(566), + READY: __webpack_require__(567), + RESUME: __webpack_require__(568), + STEP: __webpack_require__(569), + VISIBLE: __webpack_require__(570) + +}; + + /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { @@ -3920,13 +4109,13 @@ module.exports = FILE_CONST; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); -var Events = __webpack_require__(81); +var CONST = __webpack_require__(17); +var Events = __webpack_require__(82); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(134); -var MergeXHRSettings = __webpack_require__(212); -var XHRLoader = __webpack_require__(447); -var XHRSettings = __webpack_require__(135); +var GetURL = __webpack_require__(138); +var MergeXHRSettings = __webpack_require__(215); +var XHRLoader = __webpack_require__(454); +var XHRSettings = __webpack_require__(139); /** * @classdesc @@ -4009,7 +4198,7 @@ var File = new Class({ { this.url = loader.path + loadKey + '.' + GetFastValue(fileConfig, 'extension', ''); } - else if (typeof(this.url) !== 'function') + else if (typeof(this.url) !== 'function' && this.url.indexOf('blob:') !== 0 && this.url.indexOf('data:') !== 0) { this.url = loader.path + this.url; } @@ -4452,7 +4641,7 @@ module.exports = File; /***/ }), /* 22 */ -/***/ (function(module, exports) { +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -4461,23 +4650,32 @@ module.exports = File; */ /** - * 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. + * @namespace Phaser.Scenes.Events */ -var Clamp = function (value, min, max) -{ - return Math.max(min, Math.min(max, value)); -}; -module.exports = Clamp; +module.exports = { + + BOOT: __webpack_require__(708), + CREATE: __webpack_require__(709), + DESTROY: __webpack_require__(710), + PAUSE: __webpack_require__(711), + POST_UPDATE: __webpack_require__(712), + PRE_UPDATE: __webpack_require__(713), + READY: __webpack_require__(714), + RENDER: __webpack_require__(715), + RESUME: __webpack_require__(716), + SHUTDOWN: __webpack_require__(717), + SLEEP: __webpack_require__(718), + START: __webpack_require__(719), + TRANSITION_COMPLETE: __webpack_require__(720), + TRANSITION_INIT: __webpack_require__(721), + TRANSITION_OUT: __webpack_require__(722), + TRANSITION_START: __webpack_require__(723), + TRANSITION_WAKE: __webpack_require__(724), + UPDATE: __webpack_require__(725), + WAKE: __webpack_require__(726) + +}; /***/ }), @@ -4850,8 +5048,8 @@ module.exports = PropertyValueSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(29); -var Smoothing = __webpack_require__(164); +var CONST = __webpack_require__(33); +var Smoothing = __webpack_require__(167); // The pool into which the canvas elements are placed. var pool = []; @@ -5103,94 +5301,6 @@ module.exports = CanvasPool(); /***/ }), /* 27 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix - * and then performs the following steps: - * - * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts. - * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given. - * 3. Sets the blend mode of the context to be that used by the Game Object. - * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera. - * 5. Saves the context state. - * 6. Sets the final matrix values into the context via setTransform. - * 7. If Renderer.antialias, or the frame.source.scaleMode is set, then imageSmoothingEnabled is set. - * - * This function is only meant to be used internally. Most of the Canvas Renderer classes use it. - * - * @function Phaser.Renderer.Canvas.SetTransform - * @since 3.12.0 - * - * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. - * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on. - * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. - * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering. - * - * @return {boolean} `true` if the Game Object context was set, otherwise `false`. - */ -var SetTransform = function (renderer, ctx, src, camera, parentMatrix) -{ - var alpha = camera.alpha * src.alpha; - - if (alpha <= 0) - { - // Nothing to see, so don't waste time calculating stuff - return false; - } - - var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix); - var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); - var calcMatrix = renderer._tempMatrix3; - - if (parentMatrix) - { - // Multiply the camera by the parent matrix - camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - - // Undo the camera scroll - gameObjectMatrix.e = src.x; - gameObjectMatrix.f = src.y; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(gameObjectMatrix, calcMatrix); - } - else - { - gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX; - gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY; - - // Multiply by the Sprite matrix, store result in calcMatrix - camMatrix.multiply(gameObjectMatrix, calcMatrix); - } - - // Blend Mode - ctx.globalCompositeOperation = renderer.blendModes[src.blendMode]; - - // Alpha - ctx.globalAlpha = alpha; - - ctx.save(); - - calcMatrix.setToContext(ctx); - - ctx.imageSmoothingEnabled = !(!renderer.antialias || (src.frame && src.frame.source.scaleMode)); - - return true; -}; - -module.exports = SetTransform; - - -/***/ }), -/* 28 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5200,7 +5310,7 @@ module.exports = SetTransform; */ var BlendModes = __webpack_require__(52); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Builds a Game Object using the provided configuration object. @@ -5318,445 +5428,7 @@ module.exports = BuildGameObject; /***/ }), -/* 29 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Global constants. - * - * @ignore - */ - -var CONST = { - - /** - * Phaser Release Version - * - * @name Phaser.VERSION - * @const - * @type {string} - * @since 3.0.0 - */ - VERSION: '3.22.0', - - BlendModes: __webpack_require__(52), - - ScaleModes: __webpack_require__(231), - - /** - * AUTO Detect Renderer. - * - * @name Phaser.AUTO - * @const - * @type {integer} - * @since 3.0.0 - */ - AUTO: 0, - - /** - * Canvas Renderer. - * - * @name Phaser.CANVAS - * @const - * @type {integer} - * @since 3.0.0 - */ - CANVAS: 1, - - /** - * WebGL Renderer. - * - * @name Phaser.WEBGL - * @const - * @type {integer} - * @since 3.0.0 - */ - WEBGL: 2, - - /** - * Headless Renderer. - * - * @name Phaser.HEADLESS - * @const - * @type {integer} - * @since 3.0.0 - */ - HEADLESS: 3, - - /** - * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead - * to help you remember what the value is doing in your code. - * - * @name Phaser.FOREVER - * @const - * @type {integer} - * @since 3.0.0 - */ - FOREVER: -1, - - /** - * Direction constant. - * - * @name Phaser.NONE - * @const - * @type {integer} - * @since 3.0.0 - */ - NONE: 4, - - /** - * Direction constant. - * - * @name Phaser.UP - * @const - * @type {integer} - * @since 3.0.0 - */ - UP: 5, - - /** - * Direction constant. - * - * @name Phaser.DOWN - * @const - * @type {integer} - * @since 3.0.0 - */ - DOWN: 6, - - /** - * Direction constant. - * - * @name Phaser.LEFT - * @const - * @type {integer} - * @since 3.0.0 - */ - LEFT: 7, - - /** - * Direction constant. - * - * @name Phaser.RIGHT - * @const - * @type {integer} - * @since 3.0.0 - */ - RIGHT: 8 - -}; - -module.exports = CONST; - - -/***/ }), -/* 30 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @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__(56); - -/** - * @classdesc - * 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 - * @memberof Phaser.GameObjects - * @constructor - * @since 3.13.0 - * - * @extends Phaser.GameObjects.Components.AlphaSingle - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.ComputedSize - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @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 {string} [type] - The internal type of the Shape. - * @param {any} [data] - The data of the source shape geometry, if any. - */ -var Shape = new Class({ - - Extends: GameObject, - - Mixins: [ - Components.AlphaSingle, - Components.BlendMode, - Components.ComputedSize, - Components.Depth, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Transform, - Components.Visible - ], - - initialize: - - function Shape (scene, type, data) - { - if (type === undefined) { type = 'Shape'; } - - GameObject.call(this, scene, type); - - /** - * The source Shape data. Typically a geometry object. - * You should not manipulate this directly. - * - * @name Phaser.GameObjects.Shape#data - * @type {any} - * @readonly - * @since 3.13.0 - */ - this.geom = data; - - /** - * Holds the polygon path data for filled rendering. - * - * @name Phaser.GameObjects.Shape#pathData - * @type {number[]} - * @readonly - * @since 3.13.0 - */ - this.pathData = []; - - /** - * Holds the earcut polygon path index data for filled rendering. - * - * @name Phaser.GameObjects.Shape#pathIndexes - * @type {integer[]} - * @readonly - * @since 3.13.0 - */ - this.pathIndexes = []; - - /** - * The fill color used by this Shape. - * - * @name Phaser.GameObjects.Shape#fillColor - * @type {number} - * @since 3.13.0 - */ - this.fillColor = 0xffffff; - - /** - * The fill alpha value used by this Shape. - * - * @name Phaser.GameObjects.Shape#fillAlpha - * @type {number} - * @since 3.13.0 - */ - this.fillAlpha = 1; - - /** - * The stroke color used by this Shape. - * - * @name Phaser.GameObjects.Shape#strokeColor - * @type {number} - * @since 3.13.0 - */ - this.strokeColor = 0xffffff; - - /** - * The stroke alpha value used by this Shape. - * - * @name Phaser.GameObjects.Shape#strokeAlpha - * @type {number} - * @since 3.13.0 - */ - this.strokeAlpha = 1; - - /** - * The stroke line width used by this Shape. - * - * @name Phaser.GameObjects.Shape#lineWidth - * @type {number} - * @since 3.13.0 - */ - this.lineWidth = 1; - - /** - * Controls if this Shape is filled or not. - * Note that some Shapes do not support being filled (such as Line shapes) - * - * @name Phaser.GameObjects.Shape#isFilled - * @type {boolean} - * @since 3.13.0 - */ - this.isFilled = false; - - /** - * Controls if this Shape is stroked or not. - * Note that some Shapes do not support being stroked (such as Iso Box shapes) - * - * @name Phaser.GameObjects.Shape#isStroked - * @type {boolean} - * @since 3.13.0 - */ - this.isStroked = false; - - /** - * Controls if this Shape path is closed during rendering when stroked. - * Note that some Shapes are always closed when stroked (such as Ellipse shapes) - * - * @name Phaser.GameObjects.Shape#closePath - * @type {boolean} - * @since 3.13.0 - */ - this.closePath = true; - - /** - * Private internal value. - * A Line used when parsing internal path data to avoid constant object re-creation. - * - * @name Phaser.GameObjects.Curve#_tempLine - * @type {Phaser.Geom.Line} - * @private - * @since 3.13.0 - */ - this._tempLine = new Line(); - - this.initPipeline(); - }, - - /** - * 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. - * - * @method Phaser.GameObjects.Shape#setFillStyle - * @since 3.13.0 - * - * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled. - * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given. - * - * @return {this} This Game Object instance. - */ - setFillStyle: function (color, alpha) - { - if (alpha === undefined) { alpha = 1; } - - if (color === undefined) - { - this.isFilled = false; - } - else - { - this.fillColor = color; - this.fillAlpha = alpha; - this.isFilled = true; - } - - return 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. - * - * @method Phaser.GameObjects.Shape#setStrokeStyle - * @since 3.13.0 - * - * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked. - * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked. - * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given. - * - * @return {this} This Game Object instance. - */ - setStrokeStyle: function (lineWidth, color, alpha) - { - if (alpha === undefined) { alpha = 1; } - - if (lineWidth === undefined) - { - this.isStroked = false; - } - else - { - this.lineWidth = lineWidth; - this.strokeColor = color; - this.strokeAlpha = alpha; - this.isStroked = true; - } - - return 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. - * - * @method Phaser.GameObjects.Shape#setClosePath - * @since 3.13.0 - * - * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`. - * - * @return {this} This Game Object instance. - */ - setClosePath: function (value) - { - this.closePath = value; - - return this; - }, - - /** - * Internal destroy handler, called as part of the destroy process. - * - * @method Phaser.GameObjects.Shape#preDestroy - * @protected - * @since 3.13.0 - */ - preDestroy: function () - { - this.geom = null; - this._tempLine = null; - this.pathData = []; - this.pathIndexes = []; - } - -}); - -module.exports = Shape; - - -/***/ }), -/* 31 */ +/* 28 */ /***/ (function(module, exports) { /** @@ -5766,52 +5438,85 @@ module.exports = Shape; */ /** - * @namespace Phaser.Tilemaps.Formats + * Takes a reference to the Canvas Renderer, a Canvas Rendering Context, a Game Object, a Camera and a parent matrix + * and then performs the following steps: + * + * 1. Checks the alpha of the source combined with the Camera alpha. If 0 or less it aborts. + * 2. Takes the Camera and Game Object matrix and multiplies them, combined with the parent matrix if given. + * 3. Sets the blend mode of the context to be that used by the Game Object. + * 4. Sets the alpha value of the context to be that used by the Game Object combined with the Camera. + * 5. Saves the context state. + * 6. Sets the final matrix values into the context via setTransform. + * 7. If Renderer.antialias, or the frame.source.scaleMode is set, then imageSmoothingEnabled is set. + * + * This function is only meant to be used internally. Most of the Canvas Renderer classes use it. + * + * @function Phaser.Renderer.Canvas.SetTransform + * @since 3.12.0 + * + * @param {Phaser.Renderer.Canvas.CanvasRenderer} renderer - A reference to the current active Canvas renderer. + * @param {CanvasRenderingContext2D} ctx - The canvas context to set the transform on. + * @param {Phaser.GameObjects.GameObject} src - The Game Object being rendered. Can be any type that extends the base class. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera that is rendering the Game Object. + * @param {Phaser.GameObjects.Components.TransformMatrix} [parentMatrix] - A parent transform matrix to apply to the Game Object before rendering. + * + * @return {boolean} `true` if the Game Object context was set, otherwise `false`. */ +var SetTransform = function (renderer, ctx, src, camera, parentMatrix) +{ + var alpha = camera.alpha * src.alpha; -module.exports = { + if (alpha <= 0) + { + // Nothing to see, so don't waste time calculating stuff + return false; + } - /** - * CSV Map Type - * - * @name Phaser.Tilemaps.Formats.CSV - * @type {number} - * @since 3.0.0 - */ - CSV: 0, + var camMatrix = renderer._tempMatrix1.copyFromArray(camera.matrix.matrix); + var gameObjectMatrix = renderer._tempMatrix2.applyITRS(src.x, src.y, src.rotation, src.scaleX, src.scaleY); + var calcMatrix = renderer._tempMatrix3; - /** - * Tiled JSON Map Type - * - * @name Phaser.Tilemaps.Formats.TILED_JSON - * @type {number} - * @since 3.0.0 - */ - TILED_JSON: 1, + if (parentMatrix) + { + // Multiply the camera by the parent matrix + camMatrix.multiplyWithOffset(parentMatrix, -camera.scrollX * src.scrollFactorX, -camera.scrollY * src.scrollFactorY); - /** - * 2D Array Map Type - * - * @name Phaser.Tilemaps.Formats.ARRAY_2D - * @type {number} - * @since 3.0.0 - */ - ARRAY_2D: 2, + // Undo the camera scroll + gameObjectMatrix.e = src.x; + gameObjectMatrix.f = src.y; - /** - * Weltmeister (Impact.js) Map Type - * - * @name Phaser.Tilemaps.Formats.WELTMEISTER - * @type {number} - * @since 3.0.0 - */ - WELTMEISTER: 3 + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(gameObjectMatrix, calcMatrix); + } + else + { + gameObjectMatrix.e -= camera.scrollX * src.scrollFactorX; + gameObjectMatrix.f -= camera.scrollY * src.scrollFactorY; + // Multiply by the Sprite matrix, store result in calcMatrix + camMatrix.multiply(gameObjectMatrix, calcMatrix); + } + + // Blend Mode + ctx.globalCompositeOperation = renderer.blendModes[src.blendMode]; + + // Alpha + ctx.globalAlpha = alpha; + + ctx.save(); + + calcMatrix.setToContext(ctx); + + ctx.imageSmoothingEnabled = !(!renderer.antialias || (src.frame && src.frame.source.scaleMode)); + + return true; }; +module.exports = SetTransform; + /***/ }), -/* 32 */ +/* 29 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -5821,7 +5526,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Vector2 = __webpack_require__(3); /** @@ -6254,7 +5959,7 @@ var TransformMatrix = new Class({ * @param {Phaser.GameObjects.Components.TransformMatrix} rhs - The Matrix to multiply by. * @param {Phaser.GameObjects.Components.TransformMatrix} [out] - An optional Matrix to store the results in. * - * @return {Phaser.GameObjects.Components.TransformMatrix} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. + * @return {(this|Phaser.GameObjects.Components.TransformMatrix)} Either this TransformMatrix, or the `out` Matrix, if given in the arguments. */ multiply: function (rhs, out) { @@ -6779,7 +6484,7 @@ module.exports = TransformMatrix; /***/ }), -/* 33 */ +/* 30 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -6789,10 +6494,310 @@ module.exports = TransformMatrix; */ var Class = __webpack_require__(0); -var GetColor = __webpack_require__(162); -var GetColor32 = __webpack_require__(292); -var HSVToRGB = __webpack_require__(163); -var RGBToHSV = __webpack_require__(293); +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var Line = __webpack_require__(56); + +/** + * @classdesc + * 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 + * @memberof Phaser.GameObjects + * @constructor + * @since 3.13.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.ComputedSize + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @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 {string} [type] - The internal type of the Shape. + * @param {any} [data] - The data of the source shape geometry, if any. + */ +var Shape = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.AlphaSingle, + Components.BlendMode, + Components.ComputedSize, + Components.Depth, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Transform, + Components.Visible + ], + + initialize: + + function Shape (scene, type, data) + { + if (type === undefined) { type = 'Shape'; } + + GameObject.call(this, scene, type); + + /** + * The source Shape data. Typically a geometry object. + * You should not manipulate this directly. + * + * @name Phaser.GameObjects.Shape#data + * @type {any} + * @readonly + * @since 3.13.0 + */ + this.geom = data; + + /** + * Holds the polygon path data for filled rendering. + * + * @name Phaser.GameObjects.Shape#pathData + * @type {number[]} + * @readonly + * @since 3.13.0 + */ + this.pathData = []; + + /** + * Holds the earcut polygon path index data for filled rendering. + * + * @name Phaser.GameObjects.Shape#pathIndexes + * @type {integer[]} + * @readonly + * @since 3.13.0 + */ + this.pathIndexes = []; + + /** + * The fill color used by this Shape. + * + * @name Phaser.GameObjects.Shape#fillColor + * @type {number} + * @since 3.13.0 + */ + this.fillColor = 0xffffff; + + /** + * The fill alpha value used by this Shape. + * + * @name Phaser.GameObjects.Shape#fillAlpha + * @type {number} + * @since 3.13.0 + */ + this.fillAlpha = 1; + + /** + * The stroke color used by this Shape. + * + * @name Phaser.GameObjects.Shape#strokeColor + * @type {number} + * @since 3.13.0 + */ + this.strokeColor = 0xffffff; + + /** + * The stroke alpha value used by this Shape. + * + * @name Phaser.GameObjects.Shape#strokeAlpha + * @type {number} + * @since 3.13.0 + */ + this.strokeAlpha = 1; + + /** + * The stroke line width used by this Shape. + * + * @name Phaser.GameObjects.Shape#lineWidth + * @type {number} + * @since 3.13.0 + */ + this.lineWidth = 1; + + /** + * Controls if this Shape is filled or not. + * Note that some Shapes do not support being filled (such as Line shapes) + * + * @name Phaser.GameObjects.Shape#isFilled + * @type {boolean} + * @since 3.13.0 + */ + this.isFilled = false; + + /** + * Controls if this Shape is stroked or not. + * Note that some Shapes do not support being stroked (such as Iso Box shapes) + * + * @name Phaser.GameObjects.Shape#isStroked + * @type {boolean} + * @since 3.13.0 + */ + this.isStroked = false; + + /** + * Controls if this Shape path is closed during rendering when stroked. + * Note that some Shapes are always closed when stroked (such as Ellipse shapes) + * + * @name Phaser.GameObjects.Shape#closePath + * @type {boolean} + * @since 3.13.0 + */ + this.closePath = true; + + /** + * Private internal value. + * A Line used when parsing internal path data to avoid constant object re-creation. + * + * @name Phaser.GameObjects.Curve#_tempLine + * @type {Phaser.Geom.Line} + * @private + * @since 3.13.0 + */ + this._tempLine = new Line(); + + this.initPipeline(); + }, + + /** + * 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. + * + * @method Phaser.GameObjects.Shape#setFillStyle + * @since 3.13.0 + * + * @param {number} [color] - The color used to fill this shape. If not provided the Shape will not be filled. + * @param {number} [alpha=1] - The alpha value used when filling this shape, if a fill color is given. + * + * @return {this} This Game Object instance. + */ + setFillStyle: function (color, alpha) + { + if (alpha === undefined) { alpha = 1; } + + if (color === undefined) + { + this.isFilled = false; + } + else + { + this.fillColor = color; + this.fillAlpha = alpha; + this.isFilled = true; + } + + return 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. + * + * @method Phaser.GameObjects.Shape#setStrokeStyle + * @since 3.13.0 + * + * @param {number} [lineWidth] - The width of line to stroke with. If not provided or undefined the Shape will not be stroked. + * @param {number} [color] - The color used to stroke this shape. If not provided the Shape will not be stroked. + * @param {number} [alpha=1] - The alpha value used when stroking this shape, if a stroke color is given. + * + * @return {this} This Game Object instance. + */ + setStrokeStyle: function (lineWidth, color, alpha) + { + if (alpha === undefined) { alpha = 1; } + + if (lineWidth === undefined) + { + this.isStroked = false; + } + else + { + this.lineWidth = lineWidth; + this.strokeColor = color; + this.strokeAlpha = alpha; + this.isStroked = true; + } + + return 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. + * + * @method Phaser.GameObjects.Shape#setClosePath + * @since 3.13.0 + * + * @param {boolean} value - Set to `true` if the Shape should be closed when stroked, otherwise `false`. + * + * @return {this} This Game Object instance. + */ + setClosePath: function (value) + { + this.closePath = value; + + return this; + }, + + /** + * Internal destroy handler, called as part of the destroy process. + * + * @method Phaser.GameObjects.Shape#preDestroy + * @protected + * @since 3.13.0 + */ + preDestroy: function () + { + this.geom = null; + this._tempLine = null; + this.pathData = []; + this.pathIndexes = []; + } + +}); + +module.exports = Shape; + + +/***/ }), +/* 31 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); +var GetColor = __webpack_require__(165); +var GetColor32 = __webpack_require__(295); +var HSVToRGB = __webpack_require__(166); +var RGBToHSV = __webpack_require__(296); /** * @namespace Phaser.Display.Color @@ -7641,6 +7646,199 @@ var Color = new Class({ module.exports = Color; +/***/ }), +/* 32 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Tilemaps.Formats + */ + +module.exports = { + + /** + * CSV Map Type + * + * @name Phaser.Tilemaps.Formats.CSV + * @type {number} + * @since 3.0.0 + */ + CSV: 0, + + /** + * Tiled JSON Map Type + * + * @name Phaser.Tilemaps.Formats.TILED_JSON + * @type {number} + * @since 3.0.0 + */ + TILED_JSON: 1, + + /** + * 2D Array Map Type + * + * @name Phaser.Tilemaps.Formats.ARRAY_2D + * @type {number} + * @since 3.0.0 + */ + ARRAY_2D: 2, + + /** + * Weltmeister (Impact.js) Map Type + * + * @name Phaser.Tilemaps.Formats.WELTMEISTER + * @type {number} + * @since 3.0.0 + */ + WELTMEISTER: 3 + +}; + + +/***/ }), +/* 33 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Global constants. + * + * @ignore + */ + +var CONST = { + + /** + * Phaser Release Version + * + * @name Phaser.VERSION + * @const + * @type {string} + * @since 3.0.0 + */ + VERSION: '3.23.0', + + BlendModes: __webpack_require__(52), + + ScaleModes: __webpack_require__(234), + + /** + * AUTO Detect Renderer. + * + * @name Phaser.AUTO + * @const + * @type {integer} + * @since 3.0.0 + */ + AUTO: 0, + + /** + * Canvas Renderer. + * + * @name Phaser.CANVAS + * @const + * @type {integer} + * @since 3.0.0 + */ + CANVAS: 1, + + /** + * WebGL Renderer. + * + * @name Phaser.WEBGL + * @const + * @type {integer} + * @since 3.0.0 + */ + WEBGL: 2, + + /** + * Headless Renderer. + * + * @name Phaser.HEADLESS + * @const + * @type {integer} + * @since 3.0.0 + */ + HEADLESS: 3, + + /** + * In Phaser the value -1 means 'forever' in lots of cases, this const allows you to use it instead + * to help you remember what the value is doing in your code. + * + * @name Phaser.FOREVER + * @const + * @type {integer} + * @since 3.0.0 + */ + FOREVER: -1, + + /** + * Direction constant. + * + * @name Phaser.NONE + * @const + * @type {integer} + * @since 3.0.0 + */ + NONE: 4, + + /** + * Direction constant. + * + * @name Phaser.UP + * @const + * @type {integer} + * @since 3.0.0 + */ + UP: 5, + + /** + * Direction constant. + * + * @name Phaser.DOWN + * @const + * @type {integer} + * @since 3.0.0 + */ + DOWN: 6, + + /** + * Direction constant. + * + * @name Phaser.LEFT + * @const + * @type {integer} + * @since 3.0.0 + */ + LEFT: 7, + + /** + * Direction constant. + * + * @name Phaser.RIGHT + * @const + * @type {integer} + * @since 3.0.0 + */ + RIGHT: 8 + +}; + +module.exports = CONST; + + /***/ }), /* 34 */ /***/ (function(module, exports) { @@ -7718,7 +7916,7 @@ module.exports = PropertyValueInc; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(15); /** * Convert the given angle from degrees, to the equivalent angle in radians. @@ -7740,6 +7938,43 @@ module.exports = DegToRad; /***/ }), /* 36 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * @namespace Phaser.Cameras.Scene2D.Events + */ + +module.exports = { + + DESTROY: __webpack_require__(646), + FADE_IN_COMPLETE: __webpack_require__(647), + FADE_IN_START: __webpack_require__(648), + FADE_OUT_COMPLETE: __webpack_require__(649), + FADE_OUT_START: __webpack_require__(650), + FLASH_COMPLETE: __webpack_require__(651), + FLASH_START: __webpack_require__(652), + PAN_COMPLETE: __webpack_require__(653), + PAN_START: __webpack_require__(654), + POST_RENDER: __webpack_require__(655), + PRE_RENDER: __webpack_require__(656), + ROTATE_COMPLETE: __webpack_require__(657), + ROTATE_START: __webpack_require__(658), + SHAKE_COMPLETE: __webpack_require__(659), + SHAKE_START: __webpack_require__(660), + ZOOM_COMPLETE: __webpack_require__(661), + ZOOM_START: __webpack_require__(662) + +}; + + +/***/ }), +/* 37 */ /***/ (function(module, exports) { /** @@ -7776,7 +8011,7 @@ module.exports = FillStyleCanvas; /***/ }), -/* 37 */ +/* 38 */ /***/ (function(module, exports) { /** @@ -8002,7 +8237,7 @@ module.exports = Common; * @return {boolean} True if the object is a string, otherwise false */ Common.isString = function(obj) { - return toString.call(obj) === '[object String]'; + return Object.prototype.toString.call(obj) === '[object String]'; }; /** @@ -8320,7 +8555,7 @@ module.exports = Common; /***/ }), -/* 38 */ +/* 39 */ /***/ (function(module, exports) { /** @@ -8348,7 +8583,7 @@ module.exports = GetBottom; /***/ }), -/* 39 */ +/* 40 */ /***/ (function(module, exports) { /** @@ -8381,7 +8616,7 @@ module.exports = SetTop; /***/ }), -/* 40 */ +/* 41 */ /***/ (function(module, exports) { /** @@ -8409,7 +8644,7 @@ module.exports = GetLeft; /***/ }), -/* 41 */ +/* 42 */ /***/ (function(module, exports) { /** @@ -8442,7 +8677,7 @@ module.exports = SetLeft; /***/ }), -/* 42 */ +/* 43 */ /***/ (function(module, exports) { /** @@ -8470,7 +8705,7 @@ module.exports = GetRight; /***/ }), -/* 43 */ +/* 44 */ /***/ (function(module, exports) { /** @@ -8503,7 +8738,7 @@ module.exports = SetRight; /***/ }), -/* 44 */ +/* 45 */ /***/ (function(module, exports) { /** @@ -8536,7 +8771,7 @@ module.exports = SetBottom; /***/ }), -/* 45 */ +/* 46 */ /***/ (function(module, exports) { /** @@ -8564,7 +8799,7 @@ module.exports = GetTop; /***/ }), -/* 46 */ +/* 47 */ /***/ (function(module, exports) { /** @@ -8644,7 +8879,7 @@ module.exports = GEOM_CONST; /***/ }), -/* 47 */ +/* 48 */ /***/ (function(module, exports) { /** @@ -8678,41 +8913,6 @@ var Contains = function (rect, x, y) module.exports = Contains; -/***/ }), -/* 48 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * @namespace Phaser.Cameras.Scene2D.Events - */ - -module.exports = { - - 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) - -}; - - /***/ }), /* 49 */ /***/ (function(module, exports) { @@ -8890,7 +9090,7 @@ module.exports = CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(138); +var GetTileAt = __webpack_require__(142); var GetTilesWithin = __webpack_require__(24); /** @@ -9335,52 +9535,52 @@ module.exports = DistanceBetween; module.exports = { - 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) + BOOT: __webpack_require__(821), + DESTROY: __webpack_require__(822), + DRAG_END: __webpack_require__(823), + DRAG_ENTER: __webpack_require__(824), + DRAG: __webpack_require__(825), + DRAG_LEAVE: __webpack_require__(826), + DRAG_OVER: __webpack_require__(827), + DRAG_START: __webpack_require__(828), + DROP: __webpack_require__(829), + GAME_OUT: __webpack_require__(830), + GAME_OVER: __webpack_require__(831), + GAMEOBJECT_DOWN: __webpack_require__(832), + GAMEOBJECT_DRAG_END: __webpack_require__(833), + GAMEOBJECT_DRAG_ENTER: __webpack_require__(834), + GAMEOBJECT_DRAG: __webpack_require__(835), + GAMEOBJECT_DRAG_LEAVE: __webpack_require__(836), + GAMEOBJECT_DRAG_OVER: __webpack_require__(837), + GAMEOBJECT_DRAG_START: __webpack_require__(838), + GAMEOBJECT_DROP: __webpack_require__(839), + GAMEOBJECT_MOVE: __webpack_require__(840), + GAMEOBJECT_OUT: __webpack_require__(841), + GAMEOBJECT_OVER: __webpack_require__(842), + GAMEOBJECT_POINTER_DOWN: __webpack_require__(843), + GAMEOBJECT_POINTER_MOVE: __webpack_require__(844), + GAMEOBJECT_POINTER_OUT: __webpack_require__(845), + GAMEOBJECT_POINTER_OVER: __webpack_require__(846), + GAMEOBJECT_POINTER_UP: __webpack_require__(847), + GAMEOBJECT_POINTER_WHEEL: __webpack_require__(848), + GAMEOBJECT_UP: __webpack_require__(849), + GAMEOBJECT_WHEEL: __webpack_require__(850), + MANAGER_BOOT: __webpack_require__(851), + MANAGER_PROCESS: __webpack_require__(852), + MANAGER_UPDATE: __webpack_require__(853), + POINTER_DOWN: __webpack_require__(854), + POINTER_DOWN_OUTSIDE: __webpack_require__(855), + POINTER_MOVE: __webpack_require__(856), + POINTER_OUT: __webpack_require__(857), + POINTER_OVER: __webpack_require__(858), + POINTER_UP: __webpack_require__(859), + POINTER_UP_OUTSIDE: __webpack_require__(860), + POINTER_WHEEL: __webpack_require__(861), + POINTERLOCK_CHANGE: __webpack_require__(862), + PRE_UPDATE: __webpack_require__(863), + SHUTDOWN: __webpack_require__(864), + START: __webpack_require__(865), + UPDATE: __webpack_require__(866) }; @@ -9437,10 +9637,10 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var GetPoint = __webpack_require__(272); -var GetPoints = __webpack_require__(150); -var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(151); +var GetPoint = __webpack_require__(275); +var GetPoints = __webpack_require__(153); +var GEOM_CONST = __webpack_require__(47); +var Random = __webpack_require__(154); var Vector2 = __webpack_require__(3); /** @@ -9586,7 +9786,7 @@ var Line = new Class({ * @param {number} [x2=0] - The x coordinate of the lines ending point. * @param {number} [y2=0] - The y coordinate of the lines ending point. * - * @return {Phaser.Geom.Line} This Line object. + * @return {this} This Line object. */ setTo: function (x1, y1, x2, y2) { @@ -9839,29 +10039,29 @@ module.exports = Wrap; module.exports = { - 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) + COMPLETE: __webpack_require__(889), + DECODED: __webpack_require__(890), + DECODED_ALL: __webpack_require__(891), + DESTROY: __webpack_require__(892), + DETUNE: __webpack_require__(893), + GLOBAL_DETUNE: __webpack_require__(894), + GLOBAL_MUTE: __webpack_require__(895), + GLOBAL_RATE: __webpack_require__(896), + GLOBAL_VOLUME: __webpack_require__(897), + LOOP: __webpack_require__(898), + LOOPED: __webpack_require__(899), + MUTE: __webpack_require__(900), + PAUSE_ALL: __webpack_require__(901), + PAUSE: __webpack_require__(902), + PLAY: __webpack_require__(903), + RATE: __webpack_require__(904), + RESUME_ALL: __webpack_require__(905), + RESUME: __webpack_require__(906), + SEEK: __webpack_require__(907), + STOP_ALL: __webpack_require__(908), + STOP: __webpack_require__(909), + UNLOCKED: __webpack_require__(910), + VOLUME: __webpack_require__(911) }; @@ -9877,7 +10077,7 @@ module.exports = { */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -9889,7 +10089,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -9993,7 +10193,7 @@ var JSONFile = new Class({ * Adds a JSON file, or array of JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -10008,14 +10208,14 @@ var JSONFile = new Class({ * 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 JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.json({ * key: 'wavedata', @@ -10026,7 +10226,7 @@ var JSONFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.JSONFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.json('wavedata', 'files/AlienWaveData.json'); * // and later in your game ... @@ -10045,7 +10245,7 @@ var JSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -10065,7 +10265,7 @@ var JSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#json - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -10073,7 +10273,7 @@ var JSONFile = new Class({ * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('json', function (key, url, dataKey, xhrSettings) { @@ -10348,11 +10548,11 @@ var Body = {}; module.exports = Body; var Vertices = __webpack_require__(86); -var Vector = __webpack_require__(101); -var Sleeping = __webpack_require__(236); -var Common = __webpack_require__(37); -var Bounds = __webpack_require__(102); -var Axes = __webpack_require__(507); +var Vector = __webpack_require__(99); +var Sleeping = __webpack_require__(239); +var Common = __webpack_require__(38); +var Bounds = __webpack_require__(100); +var Axes = __webpack_require__(512); (function() { @@ -11826,10 +12026,10 @@ module.exports = WorldToTileY; var Class = __webpack_require__(0); 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__(147); +var GetPoint = __webpack_require__(266); +var GetPoints = __webpack_require__(267); +var GEOM_CONST = __webpack_require__(47); +var Random = __webpack_require__(150); /** * @classdesc @@ -11993,7 +12193,7 @@ var Circle = new Class({ * @param {number} [y=0] - The y position of the center of the circle. * @param {number} [radius=0] - The radius of the circle. * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setTo: function (x, y, radius) { @@ -12012,7 +12212,7 @@ var Circle = new Class({ * @method Phaser.Geom.Circle#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setEmpty: function () { @@ -12031,7 +12231,7 @@ var Circle = new Class({ * @param {number} [x=0] - The x position of the center of the circle. * @param {number} [y=0] - The y position of the center of the circle. * - * @return {Phaser.Geom.Circle} This Circle object. + * @return {this} This Circle object. */ setPosition: function (x, y) { @@ -12972,172 +13172,103 @@ module.exports = SafeRange; * @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__(960); +var EaseMap = __webpack_require__(115); +var UppercaseFirst = __webpack_require__(181); /** - * @classdesc - * A Sprite Game Object. + * This internal function is used to return the correct ease function for a Tween. + * + * It can take a variety of input, including an EaseMap based string, or a custom function. * - * 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. - * - * @class Sprite - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects - * @constructor + * @function Phaser.Tweens.Builders.GetEaseFunction * @since 3.0.0 * - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.TextureCrop - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible + * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function. + * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. * - * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @return {function} The ease function. */ -var Sprite = new Class({ +var GetEaseFunction = function (ease, easeParams) +{ + // Default ease function + var easeFunction = EaseMap.Power0; - Extends: GameObject, - - Mixins: [ - Components.Alpha, - Components.BlendMode, - Components.Depth, - Components.Flip, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Size, - Components.TextureCrop, - Components.Tint, - Components.Transform, - Components.Visible, - SpriteRender - ], - - initialize: - - function Sprite (scene, x, y, texture, frame) + // Prepare ease function + if (typeof ease === 'string') { - GameObject.call(this, scene, 'Sprite'); + // String based look-up - /** - * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. - * - * @name Phaser.GameObjects.Sprite#_crop - * @type {object} - * @private - * @since 3.11.0 - */ - this._crop = this.resetCropObject(); + // 1) They specified it correctly + if (EaseMap.hasOwnProperty(ease)) + { + easeFunction = EaseMap[ease]; + } + else + { + // Do some string manipulation to try and find it + var direction = ''; - /** - * The Animation Controller of this Sprite. - * - * @name Phaser.GameObjects.Sprite#anims - * @type {Phaser.GameObjects.Components.Animation} - * @since 3.0.0 - */ - this.anims = new Components.Animation(this); + if (ease.indexOf('.')) + { + // quad.in = Quad.easeIn + // quad.out = Quad.easeOut + // quad.inout = Quad.easeInOut - this.setTexture(texture, frame); - this.setPosition(x, y); - this.setSizeToFrame(); - this.setOriginFromFrame(); - this.initPipeline(); - }, + direction = ease.substr(ease.indexOf('.') + 1); - /** - * Update this Sprite's animations. - * - * @method Phaser.GameObjects.Sprite#preUpdate - * @protected - * @since 3.0.0 - * - * @param {number} time - The current timestamp. - * @param {number} delta - The delta time, in ms, elapsed since the last frame. - */ - preUpdate: function (time, delta) + if (direction.toLowerCase() === 'in') + { + direction = 'easeIn'; + } + else if (direction.toLowerCase() === 'out') + { + direction = 'easeOut'; + } + else if (direction.toLowerCase() === 'inout') + { + direction = 'easeInOut'; + } + } + + ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction); + + if (EaseMap.hasOwnProperty(ease)) + { + easeFunction = EaseMap[ease]; + } + } + } + else if (typeof ease === 'function') { - this.anims.update(time, delta); - }, - - /** - * Start playing the given animation. - * - * @method Phaser.GameObjects.Sprite#play - * @since 3.0.0 - * - * @param {string} key - The string-based key of the animation to play. - * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. - * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. - * - * @return {Phaser.GameObjects.Sprite} This Game Object. - */ - play: function (key, ignoreIfPlaying, startFrame) + // Custom function + easeFunction = ease; + } + else if (Array.isArray(ease) && ease.length === 4) { - this.anims.play(key, ignoreIfPlaying, startFrame); - - return this; - }, - - /** - * Build a JSON representation of this Sprite. - * - * @method Phaser.GameObjects.Sprite#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. - */ - toJSON: function () - { - var data = Components.ToJSON(this); - - // Extra Sprite data is added here - - return data; - }, - - /** - * Handles the pre-destroy step for the Sprite, which removes the Animation component. - * - * @method Phaser.GameObjects.Sprite#preDestroy - * @private - * @since 3.14.0 - */ - preDestroy: function () - { - this.anims.destroy(); - - this.anims = undefined; + // Bezier function (TODO) } -}); + // No custom ease parameters? + if (!easeParams) + { + // Return ease function + return easeFunction; + } -module.exports = Sprite; + var cloneParams = easeParams.slice(0); + + cloneParams.unshift(0); + + // Return ease function with custom ease parameters + return function (v) + { + cloneParams[0] = v; + + return easeFunction.apply(this, cloneParams); + }; +}; + +module.exports = GetEaseFunction; /***/ }), @@ -13150,7 +13281,7 @@ module.exports = Sprite; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders a stroke outline around the given Shape. @@ -13227,11 +13358,11 @@ module.exports = StrokePathWebGL; var Class = __webpack_require__(0); var Contains = __webpack_require__(83); -var GetPoint = __webpack_require__(417); -var GetPoints = __webpack_require__(418); -var GEOM_CONST = __webpack_require__(46); +var GetPoint = __webpack_require__(424); +var GetPoints = __webpack_require__(425); +var GEOM_CONST = __webpack_require__(47); var Line = __webpack_require__(56); -var Random = __webpack_require__(155); +var Random = __webpack_require__(158); /** * @classdesc @@ -13419,7 +13550,7 @@ var Triangle = new Class({ * @param {number} [x3=0] - `x` coordinate of the third point. * @param {number} [y3=0] - `y` coordinate of the third point. * - * @return {Phaser.Geom.Triangle} This Triangle object. + * @return {this} This Triangle object. */ setTo: function (x1, y1, x2, y2, x3, y3) { @@ -13673,7 +13804,7 @@ module.exports = Triangle; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -13684,7 +13815,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -13828,7 +13959,7 @@ var ImageFile = new Class({ * Adds an Image, or array of Images, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -13843,7 +13974,7 @@ var ImageFile = new Class({ * 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. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * If you try to load an animated gif only the first frame will be rendered. Browsers do not natively support playback * of animated gifs to Canvas elements. @@ -13854,7 +13985,7 @@ var ImageFile = new Class({ * 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.image({ * key: 'logo', @@ -13865,7 +13996,7 @@ var ImageFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.ImageFileConfig` 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.image('logo', 'images/AtariLogo.png'); * // and later in your game ... @@ -13884,13 +14015,13 @@ var ImageFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.image('logo', [ 'images/AtariLogo.png', 'images/AtariLogo-n.png' ]); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.image({ * key: 'logo', @@ -13906,14 +14037,14 @@ var ImageFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#image - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ImageFileConfig|Phaser.Types.Loader.FileTypes.ImageFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string|string[]} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('image', function (key, url, xhrSettings) { @@ -13984,7 +14115,7 @@ module.exports = SetTileCollision; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Rectangle = __webpack_require__(436); +var Rectangle = __webpack_require__(443); /** * @classdesc @@ -14419,7 +14550,7 @@ var Tile = new Class({ * @since 3.0.0 * * @param {Phaser.Cameras.Scene2D.Camera} [camera] - The Camera to use to perform the check. - * @param {object} [output] - [description] + * @param {Phaser.Geom.Rectangle} [output] - Optional Rectangle object to store the results in. * * @return {(Phaser.Geom.Rectangle|object)} */ @@ -14812,6 +14943,184 @@ module.exports = Tile; /***/ }), /* 75 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @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__(13); +var SpriteRender = __webpack_require__(965); + +/** + * @classdesc + * A 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. + * + * @class Sprite + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @since 3.0.0 + * + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Size + * @extends Phaser.GameObjects.Components.TextureCrop + * @extends Phaser.GameObjects.Components.Tint + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible + * + * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. + */ +var Sprite = new Class({ + + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Size, + Components.TextureCrop, + Components.Tint, + Components.Transform, + Components.Visible, + SpriteRender + ], + + initialize: + + function Sprite (scene, x, y, texture, frame) + { + GameObject.call(this, scene, 'Sprite'); + + /** + * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. + * + * @name Phaser.GameObjects.Sprite#_crop + * @type {object} + * @private + * @since 3.11.0 + */ + this._crop = this.resetCropObject(); + + /** + * The Animation Controller of this Sprite. + * + * @name Phaser.GameObjects.Sprite#anims + * @type {Phaser.GameObjects.Components.Animation} + * @since 3.0.0 + */ + this.anims = new Components.Animation(this); + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.setOriginFromFrame(); + this.initPipeline(); + }, + + /** + * Update this Sprite's animations. + * + * @method Phaser.GameObjects.Sprite#preUpdate + * @protected + * @since 3.0.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + preUpdate: function (time, delta) + { + this.anims.update(time, delta); + }, + + /** + * Start playing the given animation. + * + * @method Phaser.GameObjects.Sprite#play + * @since 3.0.0 + * + * @param {string} key - The string-based key of the animation to play. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {this} This Game Object. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + this.anims.play(key, ignoreIfPlaying, startFrame); + + return this; + }, + + /** + * Build a JSON representation of this Sprite. + * + * @method Phaser.GameObjects.Sprite#toJSON + * @since 3.0.0 + * + * @return {Phaser.Types.GameObjects.JSONGameObject} A JSON representation of the Game Object. + */ + toJSON: function () + { + var data = Components.ToJSON(this); + + // Extra Sprite data is added here + + return data; + }, + + /** + * Handles the pre-destroy step for the Sprite, which removes the Animation component. + * + * @method Phaser.GameObjects.Sprite#preDestroy + * @private + * @since 3.14.0 + */ + preDestroy: function () + { + this.anims.destroy(); + + this.anims = undefined; + } + +}); + +module.exports = Sprite; + + +/***/ }), +/* 76 */ /***/ (function(module, exports) { /** @@ -14839,7 +15148,7 @@ module.exports = GetCenterX; /***/ }), -/* 76 */ +/* 77 */ /***/ (function(module, exports) { /** @@ -14874,7 +15183,7 @@ module.exports = SetCenterX; /***/ }), -/* 77 */ +/* 78 */ /***/ (function(module, exports) { /** @@ -14902,7 +15211,7 @@ module.exports = GetCenterY; /***/ }), -/* 78 */ +/* 79 */ /***/ (function(module, exports) { /** @@ -14937,7 +15246,7 @@ module.exports = SetCenterY; /***/ }), -/* 79 */ +/* 80 */ /***/ (function(module, exports) { /** @@ -14983,7 +15292,7 @@ module.exports = SpliceOne; /***/ }), -/* 80 */ +/* 81 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -14993,7 +15302,7 @@ module.exports = SpliceOne; */ var Class = __webpack_require__(0); -var FromPoints = __webpack_require__(174); +var FromPoints = __webpack_require__(176); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -15477,17 +15786,16 @@ var Curve = new Class({ return this.getTangent(t, out); }, - // Given a distance in pixels, get a t to find p. /** - * [description] + * Given a distance in pixels, get a t to find p. * * @method Phaser.Curves.Curve#getTFromDistance * @since 3.0.0 * - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The distance. */ getTFromDistance: function (distance, divisions) { @@ -15499,19 +15807,17 @@ var Curve = new Class({ return this.getUtoTmapping(0, distance, divisions); }, - // Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant - /** - * [description] + * Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant. * * @method Phaser.Curves.Curve#getUtoTmapping * @since 3.0.0 * - * @param {number} u - [description] - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {number} u - A float between 0 and 1. + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The equidistant value. */ getUtoTmapping: function (u, distance, divisions) { @@ -15603,7 +15909,7 @@ module.exports = Curve; /***/ }), -/* 81 */ +/* 82 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -15618,129 +15924,20 @@ module.exports = Curve; module.exports = { - 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) + ADD: __webpack_require__(868), + COMPLETE: __webpack_require__(869), + FILE_COMPLETE: __webpack_require__(870), + FILE_KEY_COMPLETE: __webpack_require__(871), + FILE_LOAD_ERROR: __webpack_require__(872), + FILE_LOAD: __webpack_require__(873), + FILE_PROGRESS: __webpack_require__(874), + POST_PROCESS: __webpack_require__(875), + PROGRESS: __webpack_require__(876), + START: __webpack_require__(877) }; -/***/ }), -/* 82 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var EaseMap = __webpack_require__(166); -var UppercaseFirst = __webpack_require__(179); - -/** - * This internal function is used to return the correct ease function for a Tween. - * - * It can take a variety of input, including an EaseMap based string, or a custom function. - * - * @function Phaser.Tweens.Builders.GetEaseFunction - * @since 3.0.0 - * - * @param {(string|function)} ease - The ease to find. This can be either a string from the EaseMap, or a custom function. - * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. - * - * @return {function} The ease function. - */ -var GetEaseFunction = function (ease, easeParams) -{ - // Default ease function - var easeFunction = EaseMap.Power0; - - // Prepare ease function - if (typeof ease === 'string') - { - // String based look-up - - // 1) They specified it correctly - if (EaseMap.hasOwnProperty(ease)) - { - easeFunction = EaseMap[ease]; - } - else - { - // Do some string manipulation to try and find it - var direction = ''; - - if (ease.indexOf('.')) - { - // quad.in = Quad.easeIn - // quad.out = Quad.easeOut - // quad.inout =Quad.easeInOut - - direction = ease.substr(ease.indexOf('.') + 1); - - if (direction.toLowerCase() === 'in') - { - direction = 'easeIn'; - } - else if (direction.toLowerCase() === 'out') - { - direction = 'easeOut'; - } - else if (direction.toLowerCase() === 'inout') - { - direction = 'easeInOut'; - } - } - - ease = UppercaseFirst(ease.substr(0, ease.indexOf('.') + 1) + direction); - - if (EaseMap.hasOwnProperty(ease)) - { - easeFunction = EaseMap[ease]; - } - } - } - else if (typeof ease === 'function') - { - // Custom function - easeFunction = ease; - } - else if (Array.isArray(ease) && ease.length === 4) - { - // Bezier function (TODO) - } - - // No custom ease parameters? - if (!easeParams) - { - // Return ease function - return easeFunction; - } - - var cloneParams = easeParams.slice(0); - - cloneParams.unshift(0); - - // Return ease function with custom ease parameters - return function (v) - { - cloneParams[0] = v; - - return easeFunction.apply(this, cloneParams); - }; -}; - -module.exports = GetEaseFunction; - - /***/ }), /* 83 */ /***/ (function(module, exports) { @@ -15916,8 +16113,8 @@ var Vertices = {}; module.exports = Vertices; -var Vector = __webpack_require__(101); -var Common = __webpack_require__(37); +var Vector = __webpack_require__(99); +var Common = __webpack_require__(38); (function() { @@ -16369,7 +16566,7 @@ var Common = __webpack_require__(37); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); /** * Return a value based on the range between `min` and `max` and the percentage given. @@ -16622,17 +16819,17 @@ module.exports = TWEEN_CONST; module.exports = { - 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) + DESTROY: __webpack_require__(581), + VIDEO_COMPLETE: __webpack_require__(582), + VIDEO_CREATED: __webpack_require__(583), + VIDEO_ERROR: __webpack_require__(584), + VIDEO_LOOP: __webpack_require__(585), + VIDEO_PLAY: __webpack_require__(586), + VIDEO_SEEKED: __webpack_require__(587), + VIDEO_SEEKING: __webpack_require__(588), + VIDEO_STOP: __webpack_require__(589), + VIDEO_TIMEOUT: __webpack_require__(590), + VIDEO_UNLOCKED: __webpack_require__(591) }; @@ -16650,11 +16847,11 @@ module.exports = { var Class = __webpack_require__(0); var Components = __webpack_require__(12); var DegToRad = __webpack_require__(35); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(48); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(36); var Rectangle = __webpack_require__(11); -var TransformMatrix = __webpack_require__(32); -var ValueToColor = __webpack_require__(161); +var TransformMatrix = __webpack_require__(29); +var ValueToColor = __webpack_require__(164); var Vector2 = __webpack_require__(3); /** @@ -17252,7 +17449,7 @@ var BaseCamera = new Class({ * * @param {number} x - The horizontal coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOnX: function (x) { @@ -17279,7 +17476,7 @@ var BaseCamera = new Class({ * * @param {number} y - The vertical coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOnY: function (y) { @@ -17306,7 +17503,7 @@ var BaseCamera = new Class({ * @param {number} x - The horizontal coordinate to center on. * @param {number} y - The vertical coordinate to center on. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerOn: function (x, y) { @@ -17322,7 +17519,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#centerToBounds * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerToBounds: function () { @@ -17347,7 +17544,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#centerToSize * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ centerToSize: function () { @@ -17515,7 +17712,7 @@ var BaseCamera = new Class({ * * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]|Phaser.GameObjects.Group)} entries - The Game Object, or array of Game Objects, to be ignored by this Camera. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ ignore: function (entries) { @@ -17685,7 +17882,7 @@ var BaseCamera = new Class({ * @method Phaser.Cameras.Scene2D.BaseCamera#removeBounds * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ removeBounds: function () { @@ -17708,7 +17905,7 @@ var BaseCamera = new Class({ * * @param {number} [value=0] - The cameras angle of rotation, given in degrees. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setAngle: function (value) { @@ -17732,7 +17929,7 @@ var BaseCamera = new Class({ * * @param {(string|number|Phaser.Types.Display.InputColorObject)} [color='rgba(0,0,0,0)'] - The color value. In CSS, hex or numeric color notation. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setBackgroundColor: function (color) { @@ -17773,7 +17970,7 @@ var BaseCamera = new Class({ * @param {integer} height - The height of the bounds, in pixels. * @param {boolean} [centerOn=false] - If `true` the Camera will automatically be centered on the new bounds. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setBounds: function (x, y, width, height, centerOn) { @@ -17831,7 +18028,7 @@ var BaseCamera = new Class({ * * @param {string} [value=''] - The name of the Camera. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setName: function (value) { @@ -17853,7 +18050,7 @@ var BaseCamera = new Class({ * @param {number} x - The top-left x coordinate of the Camera viewport. * @param {number} [y=x] - The top-left y coordinate of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setPosition: function (x, y) { @@ -17875,7 +18072,7 @@ var BaseCamera = new Class({ * * @param {number} [value=0] - The rotation of the Camera, in radians. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setRotation: function (value) { @@ -17896,7 +18093,7 @@ var BaseCamera = new Class({ * * @param {boolean} value - `true` to round Camera pixels, `false` to not. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setRoundPixels: function (value) { @@ -17915,7 +18112,7 @@ var BaseCamera = new Class({ * * @param {Phaser.Scene} scene - The Scene the camera is bound to. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setScene: function (scene) { @@ -17959,7 +18156,7 @@ var BaseCamera = new Class({ * @param {number} x - The x coordinate of the Camera in the game world. * @param {number} [y=x] - The y coordinate of the Camera in the game world. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setScroll: function (x, y) { @@ -17984,7 +18181,7 @@ var BaseCamera = new Class({ * @param {integer} width - The width of the Camera viewport. * @param {integer} [height=width] - The height of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setSize: function (width, height) { @@ -18015,7 +18212,7 @@ var BaseCamera = new Class({ * @param {integer} width - The width of the Camera viewport. * @param {integer} [height=width] - The height of the Camera viewport. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setViewport: function (x, y, width, height) { @@ -18042,7 +18239,7 @@ var BaseCamera = new Class({ * * @param {number} [value=1] - The zoom value of the Camera. The minimum it can be is 0.001. * - * @return {Phaser.Cameras.Scene2D.BaseCamera} This Camera instance. + * @return {this} This Camera instance. */ setZoom: function (value) { @@ -18574,12 +18771,12 @@ module.exports = BaseCamera; module.exports = { - 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) + ENTER_FULLSCREEN: __webpack_require__(702), + FULLSCREEN_FAILED: __webpack_require__(703), + FULLSCREEN_UNSUPPORTED: __webpack_require__(704), + LEAVE_FULLSCREEN: __webpack_require__(705), + ORIENTATION_CHANGE: __webpack_require__(706), + RESIZE: __webpack_require__(707) }; @@ -18639,8 +18836,8 @@ module.exports = SnapFloor; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(22); -var Extend = __webpack_require__(17); +var Clamp = __webpack_require__(19); +var Extend = __webpack_require__(18); /** * @classdesc @@ -19459,10 +19656,10 @@ module.exports = Frame; var Class = __webpack_require__(0); var Contains = __webpack_require__(96); -var GetPoint = __webpack_require__(390); -var GetPoints = __webpack_require__(391); -var GEOM_CONST = __webpack_require__(46); -var Random = __webpack_require__(154); +var GetPoint = __webpack_require__(397); +var GetPoints = __webpack_require__(398); +var GEOM_CONST = __webpack_require__(47); +var Random = __webpack_require__(157); /** * @classdesc @@ -19629,7 +19826,7 @@ var Ellipse = new Class({ * @param {number} width - The width of the ellipse. * @param {number} height - The height of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setTo: function (x, y, width, height) { @@ -19648,7 +19845,7 @@ var Ellipse = new Class({ * @method Phaser.Geom.Ellipse#setEmpty * @since 3.0.0 * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setEmpty: function () { @@ -19667,7 +19864,7 @@ var Ellipse = new Class({ * @param {number} x - The x position of the center of the ellipse. * @param {number} y - The y position of the center of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setPosition: function (x, y) { @@ -19689,7 +19886,7 @@ var Ellipse = new Class({ * @param {number} width - The width of the ellipse. * @param {number} [height=width] - The height of the ellipse. * - * @return {Phaser.Geom.Ellipse} This Ellipse object. + * @return {this} This Ellipse object. */ setSize: function (width, height) { @@ -19881,15 +20078,15 @@ module.exports = Contains; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Actions = __webpack_require__(238); +var Actions = __webpack_require__(241); 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__(384); -var Set = __webpack_require__(108); -var Sprite = __webpack_require__(69); +var Range = __webpack_require__(391); +var Set = __webpack_require__(133); +var Sprite = __webpack_require__(75); /** * @classdesc @@ -20398,7 +20595,7 @@ var Group = new Class({ * @param {Phaser.GameObjects.GameObject} child - The Game Object to add. * @param {boolean} [addToScene=false] - Also add the Game Object to the scene. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ add: function (child, addToScene) { @@ -20447,7 +20644,7 @@ var Group = new Class({ * @param {Phaser.GameObjects.GameObject[]} children - The Game Objects to add. * @param {boolean} [addToScene=false] - Also add the Game Objects to the scene. * - * @return {Phaser.GameObjects.Group} This group. + * @return {this} This group. */ addMultiple: function (children, addToScene) { @@ -20476,7 +20673,7 @@ var Group = new Class({ * @param {boolean} [removeFromScene=false] - Optionally remove the Group member from the Scene it belongs to. * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group member. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ remove: function (child, removeFromScene, destroyChild) { @@ -20530,7 +20727,7 @@ var Group = new Class({ * @param {boolean} [removeFromScene=false] - Optionally remove each Group member from the Scene. * @param {boolean} [destroyChild=false] - Optionally call destroy on the removed Group members. * - * @return {Phaser.GameObjects.Group} This group. + * @return {this} This group. */ clear: function (removeFromScene, destroyChild) { @@ -20893,7 +21090,7 @@ var Group = new Class({ * @param {string} key - The string-based key of the animation to play. * @param {string} [startFrame=0] - Optionally start the animation playing from this frame index. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ playAnimation: function (key, startFrame) { @@ -20992,7 +21189,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ propertyValueSet: function (key, value, step, index, direction) { @@ -21013,7 +21210,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ propertyValueInc: function (key, value, step, index, direction) { @@ -21031,7 +21228,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setX: function (value, step) { @@ -21049,7 +21246,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setY: function (value, step) { @@ -21069,7 +21266,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setXY: function (x, y, stepX, stepY) { @@ -21087,7 +21284,7 @@ var Group = new Class({ * @param {number} value - The amount to be added to the `x` property. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incX: function (value, step) { @@ -21105,7 +21302,7 @@ var Group = new Class({ * @param {number} value - The amount to be added to the `y` property. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incY: function (value, step) { @@ -21125,7 +21322,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ incXY: function (x, y, stepX, stepY) { @@ -21147,7 +21344,7 @@ var Group = new Class({ * @param {number} y - The y coordinate to place the first item in the array at. * @param {integer} [direction=0] - The iteration direction. 0 = first to last and 1 = last to first. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ shiftPosition: function (x, y, direction) { @@ -21165,7 +21362,7 @@ var Group = new Class({ * @param {number} value - The amount to set the angle to, in degrees. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ angle: function (value, step) { @@ -21183,7 +21380,7 @@ var Group = new Class({ * @param {number} value - The amount to set the rotation to, in radians. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotate: function (value, step) { @@ -21201,7 +21398,7 @@ var Group = new Class({ * @param {Phaser.Types.Math.Vector2Like} point - Any object with public `x` and `y` properties. * @param {number} angle - The angle to rotate by, in radians. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotateAround: function (point, angle) { @@ -21220,7 +21417,7 @@ var Group = new Class({ * @param {number} angle - The angle to rotate by, in radians. * @param {number} distance - The distance from the point of rotation in pixels. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ rotateAroundDistance: function (point, angle, distance) { @@ -21238,7 +21435,7 @@ var Group = new Class({ * @param {number} value - The amount to set the alpha to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setAlpha: function (value, step) { @@ -21258,7 +21455,7 @@ var Group = new Class({ * @param {number} [bottomLeft] - The tint to be applied to the bottom-left corner of item. * @param {number} [bottomRight] - The tint to be applied to the bottom-right corner of item. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setTint: function (topLeft, topRight, bottomLeft, bottomRight) { @@ -21278,7 +21475,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `originX` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `originY` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setOrigin: function (originX, originY, stepX, stepY) { @@ -21296,7 +21493,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleX: function (value, step) { @@ -21314,7 +21511,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleY: function (value, step) { @@ -21334,7 +21531,7 @@ var Group = new Class({ * @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter. * @param {number} [stepY=0] - This is added to the `scaleY` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ scaleXY: function (scaleX, scaleY, stepX, stepY) { @@ -21352,7 +21549,7 @@ var Group = new Class({ * @param {number} value - The amount to set the property to. * @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setDepth: function (value, step) { @@ -21369,7 +21566,7 @@ var Group = new Class({ * * @param {number} value - The amount to set the property to. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setBlendMode: function (value) { @@ -21387,7 +21584,7 @@ var Group = new Class({ * @param {*} hitArea - 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 {Phaser.Types.Input.HitAreaCallback} hitAreaCallback - A callback to be invoked when the Game Object is interacted with. If you provide a shape you must also provide a callback. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setHitArea: function (hitArea, hitAreaCallback) { @@ -21402,7 +21599,7 @@ var Group = new Class({ * @method Phaser.GameObjects.Group#shuffle * @since 3.21.0 * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ shuffle: function () { @@ -21454,7 +21651,7 @@ var Group = new Class({ * @param {integer} [index=0] - An optional offset to start searching from within the items array. * @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning. * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ setVisible: function (value, index, direction) { @@ -21469,7 +21666,7 @@ var Group = new Class({ * @method Phaser.GameObjects.Group#toggleVisible * @since 3.0.0 * - * @return {Phaser.GameObjects.Group} This Group object. + * @return {this} This Group object. */ toggleVisible: function () { @@ -21519,137 +21716,7 @@ module.exports = Group; * @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__(963); - -/** - * @classdesc - * An Image Game Object. - * - * An Image is a light-weight Game Object useful for the display of static images in your game, - * such as logos, backgrounds, scenery or other non-animated elements. Images can have input - * events and physics bodies, or be tweened, tinted or scrolled. The main difference between an - * Image and a Sprite is that you cannot animate an Image as they do not have the Animation component. - * - * @class Image - * @extends Phaser.GameObjects.GameObject - * @memberof Phaser.GameObjects - * @constructor - * @since 3.0.0 - * - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Mask - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.TextureCrop - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. - */ -var Image = new Class({ - - Extends: GameObject, - - Mixins: [ - Components.Alpha, - Components.BlendMode, - Components.Depth, - Components.Flip, - Components.GetBounds, - Components.Mask, - Components.Origin, - Components.Pipeline, - Components.ScrollFactor, - Components.Size, - Components.TextureCrop, - Components.Tint, - Components.Transform, - Components.Visible, - ImageRender - ], - - initialize: - - function Image (scene, x, y, texture, frame) - { - GameObject.call(this, scene, 'Image'); - - /** - * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. - * - * @name Phaser.GameObjects.Image#_crop - * @type {object} - * @private - * @since 3.11.0 - */ - this._crop = this.resetCropObject(); - - this.setTexture(texture, frame); - this.setPosition(x, y); - this.setSizeToFrame(); - this.setOriginFromFrame(); - this.initPipeline(); - } - -}); - -module.exports = Image; - - -/***/ }), -/* 99 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Determine whether the source object has a property with the specified key. - * - * @function Phaser.Utils.Objects.HasValue - * @since 3.0.0 - * - * @param {object} source - The source object to be checked. - * @param {string} key - The property to check for within the object - * - * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`. - */ -var HasValue = function (source, key) -{ - return (source.hasOwnProperty(key)); -}; - -module.exports = HasValue; - - -/***/ }), -/* 100 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders a filled path for the given Shape. @@ -21704,7 +21771,7 @@ module.exports = FillPathWebGL; /***/ }), -/* 101 */ +/* 99 */ /***/ (function(module, exports) { /** @@ -21948,7 +22015,7 @@ module.exports = Vector; })(); /***/ }), -/* 102 */ +/* 100 */ /***/ (function(module, exports) { /** @@ -22074,7 +22141,7 @@ module.exports = Bounds; /***/ }), -/* 103 */ +/* 101 */ /***/ (function(module, exports) { /** @@ -22105,7 +22172,7 @@ module.exports = IsInLayerBounds; /***/ }), -/* 104 */ +/* 102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22128,7 +22195,7 @@ var GetFastValue = __webpack_require__(2); * @constructor * @since 3.0.0 * - * @param {object} [config] - [description] + * @param {Phaser.Types.Tilemaps.LayerDataConfig} [config] - The Layer Data configuration object. */ var LayerData = new Class({ @@ -22148,7 +22215,7 @@ var LayerData = new Class({ this.name = GetFastValue(config, 'name', 'layer'); /** - * The x offset of where to draw from the top left + * The x offset of where to draw from the top left. * * @name Phaser.Tilemaps.LayerData#x * @type {number} @@ -22157,7 +22224,7 @@ var LayerData = new Class({ this.x = GetFastValue(config, 'x', 0); /** - * The y offset of where to draw from the top left + * The y offset of where to draw from the top left. * * @name Phaser.Tilemaps.LayerData#y * @type {number} @@ -22166,7 +22233,7 @@ var LayerData = new Class({ this.y = GetFastValue(config, 'y', 0); /** - * The width in tile of the layer. + * The width of the layer in tiles. * * @name Phaser.Tilemaps.LayerData#width * @type {number} @@ -22175,7 +22242,7 @@ var LayerData = new Class({ this.width = GetFastValue(config, 'width', 0); /** - * The height in tiles of the layer. + * The height of the layer in tiles. * * @name Phaser.Tilemaps.LayerData#height * @type {number} @@ -22202,7 +22269,7 @@ var LayerData = new Class({ this.tileHeight = GetFastValue(config, 'tileHeight', 0); /** - * [description] + * The base tile width. * * @name Phaser.Tilemaps.LayerData#baseTileWidth * @type {number} @@ -22211,7 +22278,7 @@ var LayerData = new Class({ this.baseTileWidth = GetFastValue(config, 'baseTileWidth', this.tileWidth); /** - * [description] + * The base tile height. * * @name Phaser.Tilemaps.LayerData#baseTileHeight * @type {number} @@ -22238,7 +22305,7 @@ var LayerData = new Class({ this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.baseTileHeight); /** - * [description] + * The alpha value of the layer. * * @name Phaser.Tilemaps.LayerData#alpha * @type {number} @@ -22247,7 +22314,7 @@ var LayerData = new Class({ this.alpha = GetFastValue(config, 'alpha', 1); /** - * [description] + * Is the layer visible or not? * * @name Phaser.Tilemaps.LayerData#visible * @type {boolean} @@ -22259,13 +22326,13 @@ var LayerData = new Class({ * Layer specific properties (can be specified in Tiled) * * @name Phaser.Tilemaps.LayerData#properties - * @type {object} + * @type {object[]} * @since 3.0.0 */ - this.properties = GetFastValue(config, 'properties', {}); + this.properties = GetFastValue(config, 'properties', []); /** - * [description] + * Tile ID index map. * * @name Phaser.Tilemaps.LayerData#indexes * @type {array} @@ -22274,7 +22341,7 @@ var LayerData = new Class({ this.indexes = GetFastValue(config, 'indexes', []); /** - * [description] + * Tile Collision ID index map. * * @name Phaser.Tilemaps.LayerData#collideIndexes * @type {array} @@ -22283,7 +22350,7 @@ var LayerData = new Class({ this.collideIndexes = GetFastValue(config, 'collideIndexes', []); /** - * [description] + * An array of callbacks. * * @name Phaser.Tilemaps.LayerData#callbacks * @type {array} @@ -22292,7 +22359,7 @@ var LayerData = new Class({ this.callbacks = GetFastValue(config, 'callbacks', []); /** - * [description] + * An array of physics bodies. * * @name Phaser.Tilemaps.LayerData#bodies * @type {array} @@ -22301,7 +22368,7 @@ var LayerData = new Class({ this.bodies = GetFastValue(config, 'bodies', []); /** - * An array of the tile indexes + * An array of the tile data indexes. * * @name Phaser.Tilemaps.LayerData#data * @type {Phaser.Tilemaps.Tile[][]} @@ -22310,7 +22377,7 @@ var LayerData = new Class({ this.data = GetFastValue(config, 'data', []); /** - * [description] + * A reference to the Tilemap layer that owns this data. * * @name Phaser.Tilemaps.LayerData#tilemapLayer * @type {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} @@ -22325,7 +22392,7 @@ module.exports = LayerData; /***/ }), -/* 105 */ +/* 103 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -22431,7 +22498,7 @@ var MapData = new Class({ this.heightInPixels = GetFastValue(config, 'heightInPixels', this.height * this.tileHeight); /** - * [description] + * The format of the map data. * * @name Phaser.Tilemaps.MapData#format * @type {integer} @@ -22535,7 +22602,7 @@ var MapData = new Class({ this.imageCollections = GetFastValue(config, 'imageCollections', []); /** - * [description] + * An array of tile instances. * * @name Phaser.Tilemaps.MapData#tiles * @type {array} @@ -22550,7 +22617,411 @@ module.exports = MapData; /***/ }), -/* 106 */ +/* 104 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @classdesc + * A Tileset is a combination of an image containing the tiles and a container for data about + * each tile. + * + * @class Tileset + * @memberof Phaser.Tilemaps + * @constructor + * @since 3.0.0 + * + * @param {string} name - The name of the tileset in the map data. + * @param {integer} firstgid - The first tile index this tileset contains. + * @param {integer} [tileWidth=32] - Width of each tile (in pixels). + * @param {integer} [tileHeight=32] - Height of each tile (in pixels). + * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels). + * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels). + * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset. + * These typically are custom properties created in Tiled when editing a tileset. + * @param {object} [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. + */ +var Tileset = new Class({ + + initialize: + + function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData) + { + if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; } + if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; } + if (tileMargin === undefined) { tileMargin = 0; } + if (tileSpacing === undefined) { tileSpacing = 0; } + if (tileProperties === undefined) { tileProperties = {}; } + if (tileData === undefined) { tileData = {}; } + + /** + * The name of the Tileset. + * + * @name Phaser.Tilemaps.Tileset#name + * @type {string} + * @since 3.0.0 + */ + this.name = name; + + /** + * The starting index of the first tile index this Tileset contains. + * + * @name Phaser.Tilemaps.Tileset#firstgid + * @type {integer} + * @since 3.0.0 + */ + this.firstgid = firstgid; + + /** + * The width of each tile (in pixels). Use setTileSize to change. + * + * @name Phaser.Tilemaps.Tileset#tileWidth + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileWidth = tileWidth; + + /** + * The height of each tile (in pixels). Use setTileSize to change. + * + * @name Phaser.Tilemaps.Tileset#tileHeight + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileHeight = tileHeight; + + /** + * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. + * + * @name Phaser.Tilemaps.Tileset#tileMargin + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileMargin = tileMargin; + + /** + * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. + * + * @name Phaser.Tilemaps.Tileset#tileSpacing + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.tileSpacing = tileSpacing; + + /** + * Tileset-specific properties per tile that are typically defined in the Tiled editor in the + * Tileset editor. + * + * @name Phaser.Tilemaps.Tileset#tileProperties + * @type {object} + * @since 3.0.0 + */ + this.tileProperties = tileProperties; + + /** + * 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. + * + * @name Phaser.Tilemaps.Tileset#tileData + * @type {object} + * @since 3.0.0 + */ + this.tileData = tileData; + + /** + * The cached image that contains the individual tiles. Use setImage to set. + * + * @name Phaser.Tilemaps.Tileset#image + * @type {?Phaser.Textures.Texture} + * @readonly + * @since 3.0.0 + */ + this.image = null; + + /** + * The gl texture used by the WebGL renderer. + * + * @name Phaser.Tilemaps.Tileset#glTexture + * @type {?WebGLTexture} + * @readonly + * @since 3.11.0 + */ + this.glTexture = null; + + /** + * The number of tile rows in the the tileset. + * + * @name Phaser.Tilemaps.Tileset#rows + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.rows = 0; + + /** + * The number of tile columns in the tileset. + * + * @name Phaser.Tilemaps.Tileset#columns + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.columns = 0; + + /** + * The total number of tiles in the tileset. + * + * @name Phaser.Tilemaps.Tileset#total + * @type {integer} + * @readonly + * @since 3.0.0 + */ + this.total = 0; + + /** + * 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}. + * + * @name Phaser.Tilemaps.Tileset#texCoordinates + * @type {object[]} + * @readonly + * @since 3.0.0 + */ + this.texCoordinates = []; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileProperties + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?(object|undefined)} + */ + getTileProperties: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.tileProperties[tileIndex - this.firstgid]; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileData + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object|undefined} + */ + getTileData: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.tileData[tileIndex - this.firstgid]; + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object} + */ + getTileCollisionGroup: function (tileIndex) + { + var data = this.getTileData(tileIndex); + + return (data && data.objectgroup) ? data.objectgroup : null; + }, + + /** + * Returns true if and only if this Tileset contains the given tile index. + * + * @method Phaser.Tilemaps.Tileset#containsTileIndex + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {boolean} + */ + containsTileIndex: function (tileIndex) + { + return ( + tileIndex >= this.firstgid && + tileIndex < (this.firstgid + this.total) + ); + }, + + /** + * 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. + * + * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates + * @since 3.0.0 + * + * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. + * + * @return {?object} Object in the form { x, y } representing the top-left UV coordinate + * within the Tileset image. + */ + getTileTextureCoordinates: function (tileIndex) + { + if (!this.containsTileIndex(tileIndex)) { return null; } + + return this.texCoordinates[tileIndex - this.firstgid]; + }, + + /** + * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setImage + * @since 3.0.0 + * + * @param {Phaser.Textures.Texture} texture - The image that contains the tiles. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setImage: function (texture) + { + this.image = texture; + + this.glTexture = texture.get().source.glTexture; + + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + + return this; + }, + + /** + * Sets the tile width & height and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setTileSize + * @since 3.0.0 + * + * @param {integer} [tileWidth] - The width of a tile in pixels. + * @param {integer} [tileHeight] - The height of a tile in pixels. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setTileSize: function (tileWidth, tileHeight) + { + if (tileWidth !== undefined) { this.tileWidth = tileWidth; } + if (tileHeight !== undefined) { this.tileHeight = tileHeight; } + + if (this.image) + { + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + } + + return this; + }, + + /** + * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). + * + * @method Phaser.Tilemaps.Tileset#setSpacing + * @since 3.0.0 + * + * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels). + * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels). + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + setSpacing: function (margin, spacing) + { + if (margin !== undefined) { this.tileMargin = margin; } + if (spacing !== undefined) { this.tileSpacing = spacing; } + + if (this.image) + { + this.updateTileData(this.image.source[0].width, this.image.source[0].height); + } + + return this; + }, + + /** + * Updates tile texture coordinates and tileset data. + * + * @method Phaser.Tilemaps.Tileset#updateTileData + * @since 3.0.0 + * + * @param {integer} imageWidth - The (expected) width of the image to slice. + * @param {integer} imageHeight - The (expected) height of the image to slice. + * + * @return {Phaser.Tilemaps.Tileset} This Tileset object. + */ + updateTileData: function (imageWidth, imageHeight) + { + var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing); + var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing); + + if (rowCount % 1 !== 0 || colCount % 1 !== 0) + { + console.warn('Image tile area not tile size multiple in: ' + this.name); + } + + // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated + // - hence the floor when calculating the rows/columns. + rowCount = Math.floor(rowCount); + colCount = Math.floor(colCount); + + this.rows = rowCount; + this.columns = colCount; + + // In Tiled, "empty" spaces in a tileset count as tiles and hence count towards the gid + this.total = rowCount * colCount; + + this.texCoordinates.length = 0; + + var tx = this.tileMargin; + var ty = this.tileMargin; + + for (var y = 0; y < this.rows; y++) + { + for (var x = 0; x < this.columns; x++) + { + this.texCoordinates.push({ x: tx, y: ty }); + tx += this.tileWidth + this.tileSpacing; + } + + tx = this.tileMargin; + ty += this.tileHeight + this.tileSpacing; + } + + return this; + } + +}); + +module.exports = Tileset; + + +/***/ }), +/* 105 */ /***/ (function(module, exports) { /** @@ -22683,6 +23154,40 @@ var ALIGN_CONST = { module.exports = ALIGN_CONST; +/***/ }), +/* 106 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @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; + + /***/ }), /* 107 */ /***/ (function(module, exports, __webpack_require__) { @@ -22693,44 +23198,100 @@ module.exports = ALIGN_CONST; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clone = __webpack_require__(67); +var Class = __webpack_require__(0); +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var ImageRender = __webpack_require__(968); /** - * Creates a new Object using all values from obj1 and obj2. - * If a value exists in both obj1 and obj2, the value in obj1 is used. - * - * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this - * function on shallow objects. + * @classdesc + * An Image Game Object. * - * @function Phaser.Utils.Objects.Merge + * 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. + * + * @class Image + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor * @since 3.0.0 * - * @param {object} obj1 - The first object. - * @param {object} obj2 - The second object. + * @extends Phaser.GameObjects.Components.Alpha + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @extends Phaser.GameObjects.Components.GetBounds + * @extends Phaser.GameObjects.Components.Mask + * @extends Phaser.GameObjects.Components.Origin + * @extends Phaser.GameObjects.Components.Pipeline + * @extends Phaser.GameObjects.Components.ScrollFactor + * @extends Phaser.GameObjects.Components.Size + * @extends Phaser.GameObjects.Components.TextureCrop + * @extends Phaser.GameObjects.Components.Tint + * @extends Phaser.GameObjects.Components.Transform + * @extends Phaser.GameObjects.Components.Visible * - * @return {object} A new object containing the union of obj1's and obj2's properties. + * @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)} [frame] - An optional frame from the Texture this Game Object is rendering with. */ -var Merge = function (obj1, obj2) -{ - var clone = Clone(obj1); +var Image = new Class({ - for (var key in obj2) + Extends: GameObject, + + Mixins: [ + Components.Alpha, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.GetBounds, + Components.Mask, + Components.Origin, + Components.Pipeline, + Components.ScrollFactor, + Components.Size, + Components.TextureCrop, + Components.Tint, + Components.Transform, + Components.Visible, + ImageRender + ], + + initialize: + + function Image (scene, x, y, texture, frame) { - if (!clone.hasOwnProperty(key)) - { - clone[key] = obj2[key]; - } + GameObject.call(this, scene, 'Image'); + + /** + * The internal crop data object, as used by `setCrop` and passed to the `Frame.setCropUVs` method. + * + * @name Phaser.GameObjects.Image#_crop + * @type {object} + * @private + * @since 3.11.0 + */ + this._crop = this.resetCropObject(); + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.setOriginFromFrame(); + this.initPipeline(); } - return clone; -}; +}); -module.exports = Merge; +module.exports = Image; /***/ }), /* 108 */ -/***/ (function(module, exports, __webpack_require__) { +/***/ (function(module, exports) { /** * @author Richard Davey @@ -22738,443 +23299,23 @@ module.exports = Merge; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Class = __webpack_require__(0); - /** - * @callback EachSetCallback + * Determine whether the source object has a property with the specified key. * - * @param {E} entry - The Set entry. - * @param {number} index - The index of the entry within the Set. - * - * @return {?boolean} The callback result. - */ - -/** - * @classdesc - * A Set is a collection of unique elements. - * - * @class Set - * @memberof Phaser.Structs - * @constructor + * @function Phaser.Utils.Objects.HasValue * @since 3.0.0 * - * @generic T - * @genericUse {T[]} - [elements] + * @param {object} source - The source object to be checked. + * @param {string} key - The property to check for within the object * - * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set. + * @return {boolean} `true` if the provided `key` exists on the `source` object, otherwise `false`. */ -var Set = new Class({ +var HasValue = function (source, key) +{ + return (source.hasOwnProperty(key)); +}; - initialize: - - function Set (elements) - { - /** - * The entries of this Set. Stored internally as an array. - * - * @genericUse {T[]} - [$type] - * - * @name Phaser.Structs.Set#entries - * @type {Array.<*>} - * @default [] - * @since 3.0.0 - */ - this.entries = []; - - if (Array.isArray(elements)) - { - for (var i = 0; i < elements.length; i++) - { - this.set(elements[i]); - } - } - }, - - /** - * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect. - * - * @method Phaser.Structs.Set#set - * @since 3.0.0 - * - * @genericUse {T} - [value] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {*} value - The value to insert into this Set. - * - * @return {Phaser.Structs.Set} This Set object. - */ - set: function (value) - { - if (this.entries.indexOf(value) === -1) - { - this.entries.push(value); - } - - return this; - }, - - /** - * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value. - * If no elements of this Set satisfy the condition then this method will return `null`. - * - * @method Phaser.Structs.Set#get - * @since 3.0.0 - * - * @genericUse {T} - [value,$return] - * - * @param {string} property - The property name to check on the elements of this Set. - * @param {*} value - The value to check for. - * - * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition. - */ - get: function (property, value) - { - for (var i = 0; i < this.entries.length; i++) - { - var entry = this.entries[i]; - - if (entry[property] === value) - { - return entry; - } - } - }, - - /** - * Returns an array containing all the values in this Set. - * - * @method Phaser.Structs.Set#getArray - * @since 3.0.0 - * - * @genericUse {T[]} - [$return] - * - * @return {Array.<*>} An array containing all the values in this Set. - */ - getArray: function () - { - return this.entries.slice(0); - }, - - /** - * Removes the given value from this Set if this Set contains that value. - * - * @method Phaser.Structs.Set#delete - * @since 3.0.0 - * - * @genericUse {T} - [value] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {*} value - The value to remove from the Set. - * - * @return {Phaser.Structs.Set} This Set object. - */ - delete: function (value) - { - var index = this.entries.indexOf(value); - - if (index > -1) - { - this.entries.splice(index, 1); - } - - return this; - }, - - /** - * Dumps the contents of this Set to the console via `console.group`. - * - * @method Phaser.Structs.Set#dump - * @since 3.0.0 - */ - dump: function () - { - // eslint-disable-next-line no-console - console.group('Set'); - - for (var i = 0; i < this.entries.length; i++) - { - var entry = this.entries[i]; - console.log(entry); - } - - // eslint-disable-next-line no-console - console.groupEnd(); - }, - - /** - * Passes each value in this Set to the given callback. - * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`. - * - * @method Phaser.Structs.Set#each - * @since 3.0.0 - * - * @genericUse {EachSetCallback.} - [callback] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. - * @param {*} [callbackScope] - The scope of the callback. - * - * @return {Phaser.Structs.Set} This Set object. - */ - each: function (callback, callbackScope) - { - var i; - var temp = this.entries.slice(); - var len = temp.length; - - if (callbackScope) - { - for (i = 0; i < len; i++) - { - if (callback.call(callbackScope, temp[i], i) === false) - { - break; - } - } - } - else - { - for (i = 0; i < len; i++) - { - if (callback(temp[i], i) === false) - { - break; - } - } - } - - return this; - }, - - /** - * Passes each value in this Set to the given callback. - * For when you absolutely know this Set won't be modified during the iteration. - * - * @method Phaser.Structs.Set#iterate - * @since 3.0.0 - * - * @genericUse {EachSetCallback.} - [callback] - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. - * @param {*} [callbackScope] - The scope of the callback. - * - * @return {Phaser.Structs.Set} This Set object. - */ - iterate: function (callback, callbackScope) - { - var i; - var len = this.entries.length; - - if (callbackScope) - { - for (i = 0; i < len; i++) - { - if (callback.call(callbackScope, this.entries[i], i) === false) - { - break; - } - } - } - else - { - for (i = 0; i < len; i++) - { - if (callback(this.entries[i], i) === false) - { - break; - } - } - } - - return this; - }, - - /** - * Goes through each entry in this Set and invokes the given function on them, passing in the arguments. - * - * @method Phaser.Structs.Set#iterateLocal - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @param {string} callbackKey - The key of the function to be invoked on each Set entry. - * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. - * - * @return {Phaser.Structs.Set} This Set object. - */ - iterateLocal: function (callbackKey) - { - var i; - var args = []; - - for (i = 1; i < arguments.length; i++) - { - args.push(arguments[i]); - } - - var len = this.entries.length; - - for (i = 0; i < len; i++) - { - var entry = this.entries[i]; - - entry[callbackKey].apply(entry, args); - } - - return this; - }, - - /** - * Clears this Set so that it no longer contains any values. - * - * @method Phaser.Structs.Set#clear - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [$return] - * - * @return {Phaser.Structs.Set} This Set object. - */ - clear: function () - { - this.entries.length = 0; - - return this; - }, - - /** - * Returns `true` if this Set contains the given value, otherwise returns `false`. - * - * @method Phaser.Structs.Set#contains - * @since 3.0.0 - * - * @genericUse {T} - [value] - * - * @param {*} value - The value to check for in this Set. - * - * @return {boolean} `true` if the given value was found in this Set, otherwise `false`. - */ - contains: function (value) - { - return (this.entries.indexOf(value) > -1); - }, - - /** - * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument. - * - * @method Phaser.Structs.Set#union - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to perform the union with. - * - * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument. - */ - union: function (set) - { - var newSet = new Set(); - - set.entries.forEach(function (value) - { - newSet.set(value); - }); - - this.entries.forEach(function (value) - { - newSet.set(value); - }); - - return newSet; - }, - - /** - * Returns a new Set that contains only the values which are in this Set and that are also in the given Set. - * - * @method Phaser.Structs.Set#intersect - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to intersect this set with. - * - * @return {Phaser.Structs.Set} The result of the intersection, as a new Set. - */ - intersect: function (set) - { - var newSet = new Set(); - - this.entries.forEach(function (value) - { - if (set.contains(value)) - { - newSet.set(value); - } - }); - - return newSet; - }, - - /** - * Returns a new Set containing all the values in this Set which are *not* also in the given Set. - * - * @method Phaser.Structs.Set#difference - * @since 3.0.0 - * - * @genericUse {Phaser.Structs.Set.} - [set,$return] - * - * @param {Phaser.Structs.Set} set - The Set to perform the difference with. - * - * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method. - */ - difference: function (set) - { - var newSet = new Set(); - - this.entries.forEach(function (value) - { - if (!set.contains(value)) - { - newSet.set(value); - } - }); - - return newSet; - }, - - /** - * The size of this Set. This is the number of entries within it. - * Changing the size will truncate the Set if the given value is smaller than the current size. - * Increasing the size larger than the current size has no effect. - * - * @name Phaser.Structs.Set#size - * @type {integer} - * @since 3.0.0 - */ - size: { - - get: function () - { - return this.entries.length; - }, - - set: function (value) - { - if (value < this.entries.length) - { - return this.entries.length = value; - } - else - { - return this.entries.length; - } - } - - } - -}); - -module.exports = Set; +module.exports = HasValue; /***/ }), @@ -23197,11 +23338,11 @@ var Bodies = {}; module.exports = Bodies; var Vertices = __webpack_require__(86); -var Common = __webpack_require__(37); +var Common = __webpack_require__(38); var Body = __webpack_require__(62); -var Bounds = __webpack_require__(102); -var Vector = __webpack_require__(101); -var decomp = __webpack_require__(1380); +var Bounds = __webpack_require__(100); +var Vector = __webpack_require__(99); +var decomp = __webpack_require__(1383); (function() { @@ -23550,9 +23691,9 @@ var Circle = __webpack_require__(65); var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(47); +var RectangleContains = __webpack_require__(48); /** * @classdesc @@ -23697,7 +23838,7 @@ var Zone = new Class({ * @param {number} height - The height of this Game Object. * @param {boolean} [resizeInput=true] - If this Zone has a Rectangle for a hit area this argument will resize the hit area as well. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setSize: function (width, height, resizeInput) { @@ -23729,7 +23870,7 @@ var Zone = new Class({ * @param {number} width - The width of this Game Object. * @param {number} height - The height of this Game Object. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setDisplaySize: function (width, height) { @@ -23748,7 +23889,7 @@ var Zone = new Class({ * * @param {number} radius - The radius of the Circle that will form the Drop Zone. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setCircleDropZone: function (radius) { @@ -23765,7 +23906,7 @@ var Zone = new Class({ * @param {number} width - The width of the rectangle drop zone. * @param {number} height - The height of the rectangle drop zone. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setRectangleDropZone: function (width, height) { @@ -23781,7 +23922,7 @@ var Zone = new Class({ * @param {object} shape - A Geometry shape instance, such as Phaser.Geom.Ellipse, or your own custom shape. * @param {Phaser.Types.Input.HitAreaCallback} callback - A function that will return `true` if the given x/y coords it is sent are within the shape. * - * @return {Phaser.GameObjects.Zone} This Game Object. + * @return {this} This Game Object. */ setDropZone: function (shape, callback) { @@ -23864,24 +24005,24 @@ module.exports = Zone; module.exports = { - 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) + ADD_ANIMATION: __webpack_require__(533), + ANIMATION_COMPLETE: __webpack_require__(534), + ANIMATION_REPEAT: __webpack_require__(535), + ANIMATION_RESTART: __webpack_require__(536), + ANIMATION_START: __webpack_require__(537), + PAUSE_ALL: __webpack_require__(538), + REMOVE_ANIMATION: __webpack_require__(539), + RESUME_ALL: __webpack_require__(540), + SPRITE_ANIMATION_COMPLETE: __webpack_require__(541), + SPRITE_ANIMATION_KEY_COMPLETE: __webpack_require__(542), + SPRITE_ANIMATION_KEY_REPEAT: __webpack_require__(543), + SPRITE_ANIMATION_KEY_RESTART: __webpack_require__(544), + SPRITE_ANIMATION_KEY_START: __webpack_require__(545), + SPRITE_ANIMATION_KEY_UPDATE: __webpack_require__(546), + SPRITE_ANIMATION_REPEAT: __webpack_require__(547), + SPRITE_ANIMATION_RESTART: __webpack_require__(548), + SPRITE_ANIMATION_START: __webpack_require__(549), + SPRITE_ANIMATION_UPDATE: __webpack_require__(550) }; @@ -23925,7 +24066,7 @@ module.exports = Perimeter; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(281); +var Events = __webpack_require__(284); /** * @callback DataEachCallback @@ -23948,7 +24089,7 @@ var Events = __webpack_require__(281); * @since 3.0.0 * * @param {object} parent - The object that this DataManager belongs to. - * @param {Phaser.Events.EventEmitter} eventEmitter - The DataManager's event emitter. + * @param {Phaser.Events.EventEmitter} [eventEmitter] - The DataManager's event emitter. */ var DataManager = new Class({ @@ -24175,7 +24316,7 @@ var DataManager = new Class({ * @param {(string|object)} key - The key to set the value for. Or an object or 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. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ set: function (key, data) { @@ -24199,6 +24340,72 @@ var DataManager = new Class({ return this; }, + /** + * Increase a value for the given key. If the key doesn't already exist in the Data Manager then it is increased from 0. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#inc + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to increase the value for. + * @param {*} [data] - The value to increase for the given key. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + inc: function (key, data) + { + if (this._frozen) + { + return this; + } + + if (data === undefined) + { + data = 1; + } + + var value = this.get(key); + if (value === undefined) + { + value = 0; + } + + this.set(key, (value + data)); + + return this; + }, + + /** + * Toggle a boolean value for the given key. If the key doesn't already exist in the Data Manager then it is toggled from false. + * + * When the value is first set, a `setdata` event is emitted. + * + * @method Phaser.Data.DataManager#toggle + * @fires Phaser.Data.Events#SET_DATA + * @fires Phaser.Data.Events#CHANGE_DATA + * @fires Phaser.Data.Events#CHANGE_DATA_KEY + * @since 3.23.0 + * + * @param {(string|object)} key - The key to toggle the value for. + * + * @return {Phaser.Data.DataManager} This DataManager object. + */ + toggle: function (key) + { + if (this._frozen) + { + return this; + } + + this.set(key, !this.get(key)); + + return this; + }, + /** * Internal value setter, called automatically by the `set` method. * @@ -24212,7 +24419,7 @@ var DataManager = new Class({ * @param {string} key - The key to set the value for. * @param {*} data - The value to set. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setValue: function (key, data) { @@ -24276,7 +24483,7 @@ var DataManager = new Class({ * @param {*} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the game object, key, and data. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ each: function (callback, context) { @@ -24313,7 +24520,7 @@ var DataManager = new Class({ * @param {Object.} data - The data to merge. * @param {boolean} [overwrite=true] - Whether to overwrite existing data. Defaults to true. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ merge: function (data, overwrite) { @@ -24349,7 +24556,7 @@ var DataManager = new Class({ * * @param {(string|string[])} key - The key to remove, or an array of keys to remove. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ remove: function (key) { @@ -24383,7 +24590,7 @@ var DataManager = new Class({ * * @param {string} key - The key to set the value for. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ removeValue: function (key) { @@ -24455,7 +24662,7 @@ var DataManager = new Class({ * * @param {boolean} value - Whether to freeze or unfreeze the Data Manager. * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ setFreeze: function (value) { @@ -24470,7 +24677,7 @@ var DataManager = new Class({ * @method Phaser.Data.DataManager#reset * @since 3.0.0 * - * @return {Phaser.Data.DataManager} This DataManager object. + * @return {this} This DataManager object. */ reset: function () { @@ -24598,6 +24805,87 @@ module.exports = Shuffle; /***/ }), /* 115 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @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); + +// EaseMap +module.exports = { + + Power0: Linear, + Power1: Quadratic.Out, + Power2: Cubic.Out, + Power3: Quartic.Out, + Power4: Quintic.Out, + + Linear: Linear, + Quad: Quadratic.Out, + Cubic: Cubic.Out, + Quart: Quartic.Out, + Quint: Quintic.Out, + Sine: Sine.Out, + Expo: Expo.Out, + Circ: Circular.Out, + Elastic: Elastic.Out, + Back: Back.Out, + Bounce: Bounce.Out, + Stepped: Stepped, + + 'Quad.easeIn': Quadratic.In, + 'Cubic.easeIn': Cubic.In, + 'Quart.easeIn': Quartic.In, + 'Quint.easeIn': Quintic.In, + 'Sine.easeIn': Sine.In, + 'Expo.easeIn': Expo.In, + 'Circ.easeIn': Circular.In, + 'Elastic.easeIn': Elastic.In, + 'Back.easeIn': Back.In, + 'Bounce.easeIn': Bounce.In, + + 'Quad.easeOut': Quadratic.Out, + 'Cubic.easeOut': Cubic.Out, + 'Quart.easeOut': Quartic.Out, + 'Quint.easeOut': Quintic.Out, + 'Sine.easeOut': Sine.Out, + 'Expo.easeOut': Expo.Out, + 'Circ.easeOut': Circular.Out, + 'Elastic.easeOut': Elastic.Out, + 'Back.easeOut': Back.Out, + 'Bounce.easeOut': Bounce.Out, + + 'Quad.easeInOut': Quadratic.InOut, + 'Cubic.easeInOut': Cubic.InOut, + 'Quart.easeInOut': Quartic.InOut, + 'Quint.easeInOut': Quintic.InOut, + 'Sine.easeInOut': Sine.InOut, + 'Expo.easeInOut': Expo.InOut, + 'Circ.easeInOut': Circular.InOut, + 'Elastic.easeInOut': Elastic.InOut, + 'Back.easeInOut': Back.InOut, + 'Bounce.easeInOut': Bounce.InOut + +}; + + +/***/ }), +/* 116 */ /***/ (function(module, exports) { /** @@ -24627,7 +24915,7 @@ module.exports = Linear; /***/ }), -/* 116 */ +/* 117 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {/** @@ -24796,10 +25084,10 @@ function init () module.exports = init(); -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(720))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(728))) /***/ }), -/* 117 */ +/* 118 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24808,7 +25096,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(116); +var OS = __webpack_require__(117); /** * Determines the browser type and version running this Phaser Game instance. @@ -24909,7 +25197,36 @@ module.exports = init(); /***/ }), -/* 118 */ +/* 119 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. + * + * @function Phaser.Math.FloatBetween + * @since 3.0.0 + * + * @param {number} min - The lower bound for the float, inclusive. + * @param {number} max - The upper bound for the float exclusive. + * + * @return {number} A random float within the given range. + */ +var FloatBetween = function (min, max) +{ + return Math.random() * (max - min) + min; +}; + +module.exports = FloatBetween; + + +/***/ }), +/* 120 */ /***/ (function(module, exports) { /** @@ -24939,7 +25256,7 @@ module.exports = IsSizePowerOfTwo; /***/ }), -/* 119 */ +/* 121 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -24954,17 +25271,17 @@ module.exports = IsSizePowerOfTwo; module.exports = { - ADD: __webpack_require__(771), - ERROR: __webpack_require__(772), - LOAD: __webpack_require__(773), - READY: __webpack_require__(774), - REMOVE: __webpack_require__(775) + ADD: __webpack_require__(780), + ERROR: __webpack_require__(781), + LOAD: __webpack_require__(782), + READY: __webpack_require__(783), + REMOVE: __webpack_require__(784) }; /***/ }), -/* 120 */ +/* 122 */ /***/ (function(module, exports) { /** @@ -25022,7 +25339,7 @@ module.exports = AddToDOM; /***/ }), -/* 121 */ +/* 123 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -25031,7 +25348,7 @@ module.exports = AddToDOM; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(79); +var SpliceOne = __webpack_require__(80); /** * Removes the given item, or array of items, from the array. @@ -25113,7 +25430,7 @@ module.exports = Remove; /***/ }), -/* 122 */ +/* 124 */ /***/ (function(module, exports) { /** @@ -26019,7 +26336,7 @@ module.exports = KeyCodes; /***/ }), -/* 123 */ +/* 125 */ /***/ (function(module, exports) { /** @@ -26142,7 +26459,52 @@ module.exports = CONST; /***/ }), -/* 124 */ +/* 126 */ +/***/ (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); + +/** + * Creates a new Object using all values from obj1 and obj2. + * If a value exists in both obj1 and obj2, the value in obj1 is used. + * + * This is only a shallow copy. Deeply nested objects are not cloned, so be sure to only use this + * function on shallow objects. + * + * @function Phaser.Utils.Objects.Merge + * @since 3.0.0 + * + * @param {object} obj1 - The first object. + * @param {object} obj2 - The second object. + * + * @return {object} A new object containing the union of obj1's and obj2's properties. + */ +var Merge = function (obj1, obj2) +{ + var clone = Clone(obj1); + + for (var key in obj2) + { + if (!clone.hasOwnProperty(key)) + { + clone[key] = obj2[key]; + } + } + + return clone; +}; + +module.exports = Merge; + + +/***/ }), +/* 127 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26154,19 +26516,16 @@ module.exports = CONST; var Class = __webpack_require__(0); var Clone = __webpack_require__(67); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(59); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); var NOOP = __webpack_require__(1); +var GetAll = __webpack_require__(381); +var GetFirst = __webpack_require__(382); /** * @classdesc - * The sound manager is responsible for playing back audio via Web Audio API or HTML Audio tag as fallback. - * The audio file type and the encoding of those files are extremely important. - * - * Not all browsers can play all audio formats. - * - * There is a good guide to what's supported [here](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). + * Base class for other Sound Manager classes. * * @class BaseSoundManager * @extends Phaser.Events.EventEmitter @@ -26175,6 +26534,10 @@ var NOOP = __webpack_require__(1); * @since 3.0.0 * * @param {Phaser.Game} game - Reference to the current game instance. + * + * @see Phaser.Sound.HTML5AudioSoundManager + * @see Phaser.Sound.NoAudioSoundManager + * @see Phaser.Sound.WebAudioSoundManager */ var BaseSoundManager = new Class({ @@ -26294,22 +26657,8 @@ var BaseSoundManager = new Class({ */ this.unlocked = false; - game.events.on(GameEvents.BLUR, function () - { - if (this.pauseOnBlur) - { - this.onBlur(); - } - }, this); - - game.events.on(GameEvents.FOCUS, function () - { - if (this.pauseOnBlur) - { - this.onFocus(); - } - }, this); - + game.events.on(GameEvents.BLUR, this.onGameBlur, this); + game.events.on(GameEvents.FOCUS, this.onGameFocus, this); game.events.on(GameEvents.PRE_STEP, this.update, this); game.events.once(GameEvents.DESTROY, this.destroy, this); }, @@ -26373,6 +26722,36 @@ var BaseSoundManager = new Class({ return sound; }, + /** + * Gets the first sound in the manager matching the given key, if any. + * + * @method Phaser.Sound.BaseSoundManager#get + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {?Phaser.Sound.BaseSound} - The sound, or null. + */ + get: function (key) + { + return GetFirst(this.sounds, 'key', key); + }, + + /** + * Gets any sounds in the manager matching the given key. + * + * @method Phaser.Sound.BaseSoundManager#getAll + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {Phaser.Sound.BaseSound[]} - The sounds, or an empty array. + */ + getAll: function (key) + { + return GetAll(this.sounds, 'key', key); + }, + /** * Adds a new sound to the sound manager and plays it. * The sound will be automatically removed (destroyed) once playback ends. @@ -26413,8 +26792,9 @@ var BaseSoundManager = new Class({ }, /** - * Enables playing audio sprite sound on the fly without the need to keep a reference to it. - * Sound will auto destroy once its playback ends. + * Adds a new audio sprite sound to the sound manager and plays it. + * The sprite 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#playAudioSprite * @listens Phaser.Sound.Events#COMPLETE @@ -26462,6 +26842,23 @@ var BaseSoundManager = new Class({ return false; }, + + /** + * Removes all sounds from the manager, destroying the sounds. + * + * @method Phaser.Sound.BaseSoundManager#removeAll + * @since 3.23.0 + */ + removeAll: function () + { + this.sounds.forEach(function (sound) + { + sound.destroy(); + }); + + this.sounds.length = 0; + }, + /** * Removes all sounds from the sound manager that have an asset key matching the given value. * The removed sounds are destroyed before removal. @@ -26545,6 +26942,29 @@ var BaseSoundManager = new Class({ this.emit(Events.STOP_ALL, this); }, + + /** + * Stops any sounds matching the given key. + * + * @method Phaser.Sound.BaseSoundManager#stopByKey + * @since 3.23.0 + * + * @param {string} key - Sound asset key. + * + * @return {number} - How many sounds were stopped. + */ + stopByKey: function (key) + { + var stopped = 0; + + this.getAll(key).forEach(function (sound) + { + if (sound.stop()) { stopped++; } + }); + + return stopped; + }, + /** * Method used internally for unlocking audio playback on devices that * require user interaction before any sound can be played on a web page. @@ -26580,6 +27000,36 @@ var BaseSoundManager = new Class({ */ onFocus: NOOP, + /** + * Internal handler for Phaser.Core.Events#BLUR. + * + * @method Phaser.Sound.BaseSoundManager#onGameBlur + * @private + * @since 3.23.0 + */ + onGameBlur: function () + { + if (this.pauseOnBlur) + { + this.onBlur(); + } + }, + + /** + * Internal handler for Phaser.Core.Events#FOCUS. + * + * @method Phaser.Sound.BaseSoundManager#onGameFocus + * @private + * @since 3.23.0 + */ + onGameFocus: function () + { + if (this.pauseOnBlur) + { + this.onFocus(); + } + }, + /** * Update method called on every game step. * Removes destroyed sounds and updates every active sound in the game. @@ -26624,12 +27074,13 @@ var BaseSoundManager = new Class({ */ destroy: function () { + this.game.events.off(GameEvents.BLUR, this.onGameBlur, this); + this.game.events.off(GameEvents.FOCUS, this.onGameFocus, this); + this.game.events.off(GameEvents.PRE_STEP, this.update, this); + this.removeAllListeners(); - this.forEachActiveSound(function (sound) - { - sound.destroy(); - }); + this.removeAll(); this.sounds.length = 0; this.sounds = null; @@ -26767,7 +27218,7 @@ module.exports = BaseSoundManager; /***/ }), -/* 125 */ +/* 128 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -26778,9 +27229,9 @@ module.exports = BaseSoundManager; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(59); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); var NOOP = __webpack_require__(1); /** @@ -27267,7 +27718,7 @@ module.exports = BaseSound; /***/ }), -/* 126 */ +/* 129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -27276,10 +27727,10 @@ module.exports = BaseSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(181); +var ArrayUtils = __webpack_require__(183); var Class = __webpack_require__(0); var NOOP = __webpack_require__(1); -var StableSort = __webpack_require__(128); +var StableSort = __webpack_require__(131); /** * @callback EachListCallback @@ -28083,7 +28534,7 @@ module.exports = List; /***/ }), -/* 127 */ +/* 130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28092,8 +28543,8 @@ module.exports = List; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CheckMatrix = __webpack_require__(182); -var TransposeMatrix = __webpack_require__(382); +var CheckMatrix = __webpack_require__(184); +var TransposeMatrix = __webpack_require__(389); /** * Rotates the array matrix based on the given rotation value. @@ -28155,7 +28606,7 @@ module.exports = RotateMatrix; /***/ }), -/* 128 */ +/* 131 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28300,7 +28751,7 @@ else {} })(); /***/ }), -/* 129 */ +/* 132 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -28311,11 +28762,11 @@ else {} var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var GetBitmapTextSize = __webpack_require__(938); -var ParseFromAtlas = __webpack_require__(939); -var ParseXMLBitmapFont = __webpack_require__(185); -var Render = __webpack_require__(940); +var GameObject = __webpack_require__(13); +var GetBitmapTextSize = __webpack_require__(943); +var ParseFromAtlas = __webpack_require__(944); +var ParseXMLBitmapFont = __webpack_require__(187); +var Render = __webpack_require__(945); /** * @classdesc @@ -29029,7 +29480,456 @@ module.exports = BitmapText; /***/ }), -/* 130 */ +/* 133 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Class = __webpack_require__(0); + +/** + * @callback EachSetCallback + * + * @param {E} entry - The Set entry. + * @param {number} index - The index of the entry within the Set. + * + * @return {?boolean} The callback result. + */ + +/** + * @classdesc + * A Set is a collection of unique elements. + * + * @class Set + * @memberof Phaser.Structs + * @constructor + * @since 3.0.0 + * + * @generic T + * @genericUse {T[]} - [elements] + * + * @param {Array.<*>} [elements] - An optional array of elements to insert into this Set. + */ +var Set = new Class({ + + initialize: + + function Set (elements) + { + /** + * The entries of this Set. Stored internally as an array. + * + * @genericUse {T[]} - [$type] + * + * @name Phaser.Structs.Set#entries + * @type {Array.<*>} + * @default [] + * @since 3.0.0 + */ + this.entries = []; + + if (Array.isArray(elements)) + { + for (var i = 0; i < elements.length; i++) + { + this.set(elements[i]); + } + } + }, + + /** + * Inserts the provided value into this Set. If the value is already contained in this Set this method will have no effect. + * + * @method Phaser.Structs.Set#set + * @since 3.0.0 + * + * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {*} value - The value to insert into this Set. + * + * @return {Phaser.Structs.Set} This Set object. + */ + set: function (value) + { + if (this.entries.indexOf(value) === -1) + { + this.entries.push(value); + } + + return this; + }, + + /** + * Get an element of this Set which has a property of the specified name, if that property is equal to the specified value. + * If no elements of this Set satisfy the condition then this method will return `null`. + * + * @method Phaser.Structs.Set#get + * @since 3.0.0 + * + * @genericUse {T} - [value,$return] + * + * @param {string} property - The property name to check on the elements of this Set. + * @param {*} value - The value to check for. + * + * @return {*} The first element of this Set that meets the required condition, or `null` if this Set contains no elements that meet the condition. + */ + get: function (property, value) + { + for (var i = 0; i < this.entries.length; i++) + { + var entry = this.entries[i]; + + if (entry[property] === value) + { + return entry; + } + } + }, + + /** + * Returns an array containing all the values in this Set. + * + * @method Phaser.Structs.Set#getArray + * @since 3.0.0 + * + * @genericUse {T[]} - [$return] + * + * @return {Array.<*>} An array containing all the values in this Set. + */ + getArray: function () + { + return this.entries.slice(0); + }, + + /** + * Removes the given value from this Set if this Set contains that value. + * + * @method Phaser.Structs.Set#delete + * @since 3.0.0 + * + * @genericUse {T} - [value] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {*} value - The value to remove from the Set. + * + * @return {Phaser.Structs.Set} This Set object. + */ + delete: function (value) + { + var index = this.entries.indexOf(value); + + if (index > -1) + { + this.entries.splice(index, 1); + } + + return this; + }, + + /** + * Dumps the contents of this Set to the console via `console.group`. + * + * @method Phaser.Structs.Set#dump + * @since 3.0.0 + */ + dump: function () + { + // eslint-disable-next-line no-console + console.group('Set'); + + for (var i = 0; i < this.entries.length; i++) + { + var entry = this.entries[i]; + console.log(entry); + } + + // eslint-disable-next-line no-console + console.groupEnd(); + }, + + /** + * Passes each value in this Set to the given callback. + * Use this function when you know this Set will be modified during the iteration, otherwise use `iterate`. + * + * @method Phaser.Structs.Set#each + * @since 3.0.0 + * + * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. + * @param {*} [callbackScope] - The scope of the callback. + * + * @return {Phaser.Structs.Set} This Set object. + */ + each: function (callback, callbackScope) + { + var i; + var temp = this.entries.slice(); + var len = temp.length; + + if (callbackScope) + { + for (i = 0; i < len; i++) + { + if (callback.call(callbackScope, temp[i], i) === false) + { + break; + } + } + } + else + { + for (i = 0; i < len; i++) + { + if (callback(temp[i], i) === false) + { + break; + } + } + } + + return this; + }, + + /** + * Passes each value in this Set to the given callback. + * For when you absolutely know this Set won't be modified during the iteration. + * + * @method Phaser.Structs.Set#iterate + * @since 3.0.0 + * + * @genericUse {EachSetCallback.} - [callback] + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {EachSetCallback} callback - The callback to be invoked and passed each value this Set contains. + * @param {*} [callbackScope] - The scope of the callback. + * + * @return {Phaser.Structs.Set} This Set object. + */ + iterate: function (callback, callbackScope) + { + var i; + var len = this.entries.length; + + if (callbackScope) + { + for (i = 0; i < len; i++) + { + if (callback.call(callbackScope, this.entries[i], i) === false) + { + break; + } + } + } + else + { + for (i = 0; i < len; i++) + { + if (callback(this.entries[i], i) === false) + { + break; + } + } + } + + return this; + }, + + /** + * Goes through each entry in this Set and invokes the given function on them, passing in the arguments. + * + * @method Phaser.Structs.Set#iterateLocal + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @param {string} callbackKey - The key of the function to be invoked on each Set entry. + * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. + * + * @return {Phaser.Structs.Set} This Set object. + */ + iterateLocal: function (callbackKey) + { + var i; + var args = []; + + for (i = 1; i < arguments.length; i++) + { + args.push(arguments[i]); + } + + var len = this.entries.length; + + for (i = 0; i < len; i++) + { + var entry = this.entries[i]; + + entry[callbackKey].apply(entry, args); + } + + return this; + }, + + /** + * Clears this Set so that it no longer contains any values. + * + * @method Phaser.Structs.Set#clear + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [$return] + * + * @return {Phaser.Structs.Set} This Set object. + */ + clear: function () + { + this.entries.length = 0; + + return this; + }, + + /** + * Returns `true` if this Set contains the given value, otherwise returns `false`. + * + * @method Phaser.Structs.Set#contains + * @since 3.0.0 + * + * @genericUse {T} - [value] + * + * @param {*} value - The value to check for in this Set. + * + * @return {boolean} `true` if the given value was found in this Set, otherwise `false`. + */ + contains: function (value) + { + return (this.entries.indexOf(value) > -1); + }, + + /** + * Returns a new Set containing all values that are either in this Set or in the Set provided as an argument. + * + * @method Phaser.Structs.Set#union + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to perform the union with. + * + * @return {Phaser.Structs.Set} A new Set containing all the values in this Set and the Set provided as an argument. + */ + union: function (set) + { + var newSet = new Set(); + + set.entries.forEach(function (value) + { + newSet.set(value); + }); + + this.entries.forEach(function (value) + { + newSet.set(value); + }); + + return newSet; + }, + + /** + * Returns a new Set that contains only the values which are in this Set and that are also in the given Set. + * + * @method Phaser.Structs.Set#intersect + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to intersect this set with. + * + * @return {Phaser.Structs.Set} The result of the intersection, as a new Set. + */ + intersect: function (set) + { + var newSet = new Set(); + + this.entries.forEach(function (value) + { + if (set.contains(value)) + { + newSet.set(value); + } + }); + + return newSet; + }, + + /** + * Returns a new Set containing all the values in this Set which are *not* also in the given Set. + * + * @method Phaser.Structs.Set#difference + * @since 3.0.0 + * + * @genericUse {Phaser.Structs.Set.} - [set,$return] + * + * @param {Phaser.Structs.Set} set - The Set to perform the difference with. + * + * @return {Phaser.Structs.Set} A new Set containing all the values in this Set that are not also in the Set provided as an argument to this method. + */ + difference: function (set) + { + var newSet = new Set(); + + this.entries.forEach(function (value) + { + if (!set.contains(value)) + { + newSet.set(value); + } + }); + + return newSet; + }, + + /** + * The size of this Set. This is the number of entries within it. + * Changing the size will truncate the Set if the given value is smaller than the current size. + * Increasing the size larger than the current size has no effect. + * + * @name Phaser.Structs.Set#size + * @type {integer} + * @since 3.0.0 + */ + size: { + + get: function () + { + return this.entries.length; + }, + + set: function (value) + { + if (value < this.entries.length) + { + return this.entries.length = value; + } + else + { + return this.entries.length; + } + } + + } + +}); + +module.exports = Set; + + +/***/ }), +/* 134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29040,8 +29940,8 @@ module.exports = BitmapText; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var MeshRender = __webpack_require__(1065); +var GameObject = __webpack_require__(13); +var MeshRender = __webpack_require__(1075); var NOOP = __webpack_require__(1); /** @@ -29200,7 +30100,7 @@ module.exports = Mesh; /***/ }), -/* 131 */ +/* 135 */ /***/ (function(module, exports) { /** @@ -29238,7 +30138,7 @@ module.exports = RectangleToRectangle; /***/ }), -/* 132 */ +/* 136 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29346,7 +30246,7 @@ module.exports = InputPluginCache; /***/ }), -/* 133 */ +/* 137 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29361,19 +30261,19 @@ module.exports = InputPluginCache; module.exports = { - 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) + ANY_KEY_DOWN: __webpack_require__(1215), + ANY_KEY_UP: __webpack_require__(1216), + COMBO_MATCH: __webpack_require__(1217), + DOWN: __webpack_require__(1218), + KEY_DOWN: __webpack_require__(1219), + KEY_UP: __webpack_require__(1220), + UP: __webpack_require__(1221) }; /***/ }), -/* 134 */ +/* 138 */ /***/ (function(module, exports) { /** @@ -29414,7 +30314,7 @@ module.exports = GetURL; /***/ }), -/* 135 */ +/* 139 */ /***/ (function(module, exports) { /** @@ -29434,16 +30334,18 @@ module.exports = GetURL; * @param {string} [user=''] - Optional username for the XHR request. * @param {string} [password=''] - Optional password for the XHR request. * @param {integer} [timeout=0] - Optional XHR timeout value. + * @param {boolean} [withCredentials=false] - Optional XHR withCredentials value. * * @return {Phaser.Types.Loader.XHRSettingsObject} The XHRSettings object as used by the Loader. */ -var XHRSettings = function (responseType, async, user, password, timeout) +var XHRSettings = function (responseType, async, user, password, timeout, withCredentials) { if (responseType === undefined) { responseType = ''; } if (async === undefined) { async = true; } if (user === undefined) { user = ''; } if (password === undefined) { password = ''; } if (timeout === undefined) { timeout = 0; } + if (withCredentials === undefined) { withCredentials = false; } // Before sending a request, set the xhr.responseType to "text", // "arraybuffer", "blob", or "document", depending on your data needs. @@ -29464,12 +30366,16 @@ var XHRSettings = function (responseType, async, user, password, timeout) timeout: timeout, // setRequestHeader + headers: undefined, header: undefined, headerValue: undefined, requestedWith: false, // overrideMimeType - overrideMimeType: undefined + overrideMimeType: undefined, + + // withCredentials + withCredentials: withCredentials }; }; @@ -29478,7 +30384,7 @@ module.exports = XHRSettings; /***/ }), -/* 136 */ +/* 140 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29488,8 +30394,8 @@ module.exports = XHRSettings; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(214); -var Sprite = __webpack_require__(69); +var Components = __webpack_require__(217); +var Sprite = __webpack_require__(75); /** * @classdesc @@ -29579,7 +30485,7 @@ module.exports = ArcadeSprite; /***/ }), -/* 137 */ +/* 141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29594,54 +30500,54 @@ module.exports = ArcadeSprite; module.exports = { - CalculateFacesAt: __webpack_require__(217), + CalculateFacesAt: __webpack_require__(220), CalculateFacesWithin: __webpack_require__(51), - 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), + Copy: __webpack_require__(1311), + CreateFromTiles: __webpack_require__(1312), + CullTiles: __webpack_require__(1313), + Fill: __webpack_require__(1314), + FilterTiles: __webpack_require__(1315), + FindByIndex: __webpack_require__(1316), + FindTile: __webpack_require__(1317), + ForEachTile: __webpack_require__(1318), + GetTileAt: __webpack_require__(142), + GetTileAtWorldXY: __webpack_require__(1319), GetTilesWithin: __webpack_require__(24), - GetTilesWithinShape: __webpack_require__(1310), - GetTilesWithinWorldXY: __webpack_require__(1311), - HasTileAt: __webpack_require__(470), - HasTileAtWorldXY: __webpack_require__(1312), - IsInLayerBounds: __webpack_require__(103), - 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), + GetTilesWithinShape: __webpack_require__(1320), + GetTilesWithinWorldXY: __webpack_require__(1321), + HasTileAt: __webpack_require__(475), + HasTileAtWorldXY: __webpack_require__(1322), + IsInLayerBounds: __webpack_require__(101), + PutTileAt: __webpack_require__(221), + PutTileAtWorldXY: __webpack_require__(1323), + PutTilesAt: __webpack_require__(1324), + Randomize: __webpack_require__(1325), + RemoveTileAt: __webpack_require__(476), + RemoveTileAtWorldXY: __webpack_require__(1326), + RenderDebug: __webpack_require__(1327), + ReplaceByIndex: __webpack_require__(474), + SetCollision: __webpack_require__(1328), + SetCollisionBetween: __webpack_require__(1329), + SetCollisionByExclusion: __webpack_require__(1330), + SetCollisionByProperty: __webpack_require__(1331), + SetCollisionFromCollisionGroup: __webpack_require__(1332), + SetTileIndexCallback: __webpack_require__(1333), + SetTileLocationCallback: __webpack_require__(1334), + Shuffle: __webpack_require__(1335), + SwapByIndex: __webpack_require__(1336), + TileToWorldX: __webpack_require__(143), + TileToWorldXY: __webpack_require__(1337), + TileToWorldY: __webpack_require__(144), + WeightedRandomize: __webpack_require__(1338), WorldToTileX: __webpack_require__(63), - WorldToTileXY: __webpack_require__(1329), + WorldToTileXY: __webpack_require__(1339), WorldToTileY: __webpack_require__(64) }; /***/ }), -/* 138 */ +/* 142 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -29650,7 +30556,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(103); +var IsInLayerBounds = __webpack_require__(101); /** * Gets a tile at the given tile coordinates from the given layer. @@ -29697,7 +30603,7 @@ module.exports = GetTileAt; /***/ }), -/* 139 */ +/* 143 */ /***/ (function(module, exports) { /** @@ -29742,7 +30648,7 @@ module.exports = TileToWorldX; /***/ }), -/* 140 */ +/* 144 */ /***/ (function(module, exports) { /** @@ -29787,411 +30693,7 @@ module.exports = TileToWorldY; /***/ }), -/* 141 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); - -/** - * @classdesc - * A Tileset is a combination of an image containing the tiles and a container for data about - * each tile. - * - * @class Tileset - * @memberof Phaser.Tilemaps - * @constructor - * @since 3.0.0 - * - * @param {string} name - The name of the tileset in the map data. - * @param {integer} firstgid - The first tile index this tileset contains. - * @param {integer} [tileWidth=32] - Width of each tile (in pixels). - * @param {integer} [tileHeight=32] - Height of each tile (in pixels). - * @param {integer} [tileMargin=0] - The margin around all tiles in the sheet (in pixels). - * @param {integer} [tileSpacing=0] - The spacing between each tile in the sheet (in pixels). - * @param {object} [tileProperties={}] - Custom properties defined per tile in the Tileset. - * These typically are custom properties created in Tiled when editing a tileset. - * @param {object} [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. - */ -var Tileset = new Class({ - - initialize: - - function Tileset (name, firstgid, tileWidth, tileHeight, tileMargin, tileSpacing, tileProperties, tileData) - { - if (tileWidth === undefined || tileWidth <= 0) { tileWidth = 32; } - if (tileHeight === undefined || tileHeight <= 0) { tileHeight = 32; } - if (tileMargin === undefined) { tileMargin = 0; } - if (tileSpacing === undefined) { tileSpacing = 0; } - if (tileProperties === undefined) { tileProperties = {}; } - if (tileData === undefined) { tileData = {}; } - - /** - * The name of the Tileset. - * - * @name Phaser.Tilemaps.Tileset#name - * @type {string} - * @since 3.0.0 - */ - this.name = name; - - /** - * The starting index of the first tile index this Tileset contains. - * - * @name Phaser.Tilemaps.Tileset#firstgid - * @type {integer} - * @since 3.0.0 - */ - this.firstgid = firstgid; - - /** - * The width of each tile (in pixels). Use setTileSize to change. - * - * @name Phaser.Tilemaps.Tileset#tileWidth - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileWidth = tileWidth; - - /** - * The height of each tile (in pixels). Use setTileSize to change. - * - * @name Phaser.Tilemaps.Tileset#tileHeight - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileHeight = tileHeight; - - /** - * The margin around the tiles in the sheet (in pixels). Use `setSpacing` to change. - * - * @name Phaser.Tilemaps.Tileset#tileMargin - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileMargin = tileMargin; - - /** - * The spacing between each the tile in the sheet (in pixels). Use `setSpacing` to change. - * - * @name Phaser.Tilemaps.Tileset#tileSpacing - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.tileSpacing = tileSpacing; - - /** - * Tileset-specific properties per tile that are typically defined in the Tiled editor in the - * Tileset editor. - * - * @name Phaser.Tilemaps.Tileset#tileProperties - * @type {object} - * @since 3.0.0 - */ - this.tileProperties = tileProperties; - - /** - * 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. - * - * @name Phaser.Tilemaps.Tileset#tileData - * @type {object} - * @since 3.0.0 - */ - this.tileData = tileData; - - /** - * The cached image that contains the individual tiles. Use setImage to set. - * - * @name Phaser.Tilemaps.Tileset#image - * @type {?Phaser.Textures.Texture} - * @readonly - * @since 3.0.0 - */ - this.image = null; - - /** - * The gl texture used by the WebGL renderer. - * - * @name Phaser.Tilemaps.Tileset#glTexture - * @type {?WebGLTexture} - * @readonly - * @since 3.11.0 - */ - this.glTexture = null; - - /** - * The number of tile rows in the the tileset. - * - * @name Phaser.Tilemaps.Tileset#rows - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.rows = 0; - - /** - * The number of tile columns in the tileset. - * - * @name Phaser.Tilemaps.Tileset#columns - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.columns = 0; - - /** - * The total number of tiles in the tileset. - * - * @name Phaser.Tilemaps.Tileset#total - * @type {integer} - * @readonly - * @since 3.0.0 - */ - this.total = 0; - - /** - * 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}. - * - * @name Phaser.Tilemaps.Tileset#texCoordinates - * @type {object[]} - * @readonly - * @since 3.0.0 - */ - this.texCoordinates = []; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileProperties - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?(object|undefined)} - */ - getTileProperties: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.tileProperties[tileIndex - this.firstgid]; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileData - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object|undefined} - */ - getTileData: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.tileData[tileIndex - this.firstgid]; - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileCollisionGroup - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object} - */ - getTileCollisionGroup: function (tileIndex) - { - var data = this.getTileData(tileIndex); - - return (data && data.objectgroup) ? data.objectgroup : null; - }, - - /** - * Returns true if and only if this Tileset contains the given tile index. - * - * @method Phaser.Tilemaps.Tileset#containsTileIndex - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {boolean} - */ - containsTileIndex: function (tileIndex) - { - return ( - tileIndex >= this.firstgid && - tileIndex < (this.firstgid + this.total) - ); - }, - - /** - * 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. - * - * @method Phaser.Tilemaps.Tileset#getTileTextureCoordinates - * @since 3.0.0 - * - * @param {integer} tileIndex - The unique id of the tile across all tilesets in the map. - * - * @return {?object} Object in the form { x, y } representing the top-left UV coordinate - * within the Tileset image. - */ - getTileTextureCoordinates: function (tileIndex) - { - if (!this.containsTileIndex(tileIndex)) { return null; } - - return this.texCoordinates[tileIndex - this.firstgid]; - }, - - /** - * Sets the image associated with this Tileset and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setImage - * @since 3.0.0 - * - * @param {Phaser.Textures.Texture} texture - The image that contains the tiles. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setImage: function (texture) - { - this.image = texture; - - this.glTexture = texture.get().source.glTexture; - - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - - return this; - }, - - /** - * Sets the tile width & height and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setTileSize - * @since 3.0.0 - * - * @param {integer} [tileWidth] - The width of a tile in pixels. - * @param {integer} [tileHeight] - The height of a tile in pixels. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setTileSize: function (tileWidth, tileHeight) - { - if (tileWidth !== undefined) { this.tileWidth = tileWidth; } - if (tileHeight !== undefined) { this.tileHeight = tileHeight; } - - if (this.image) - { - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - } - - return this; - }, - - /** - * Sets the tile margin & spacing and updates the tile data (rows, columns, etc.). - * - * @method Phaser.Tilemaps.Tileset#setSpacing - * @since 3.0.0 - * - * @param {integer} [margin] - The margin around the tiles in the sheet (in pixels). - * @param {integer} [spacing] - The spacing between the tiles in the sheet (in pixels). - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - setSpacing: function (margin, spacing) - { - if (margin !== undefined) { this.tileMargin = margin; } - if (spacing !== undefined) { this.tileSpacing = spacing; } - - if (this.image) - { - this.updateTileData(this.image.source[0].width, this.image.source[0].height); - } - - return this; - }, - - /** - * Updates tile texture coordinates and tileset data. - * - * @method Phaser.Tilemaps.Tileset#updateTileData - * @since 3.0.0 - * - * @param {integer} imageWidth - The (expected) width of the image to slice. - * @param {integer} imageHeight - The (expected) height of the image to slice. - * - * @return {Phaser.Tilemaps.Tileset} This Tileset object. - */ - updateTileData: function (imageWidth, imageHeight) - { - var rowCount = (imageHeight - this.tileMargin * 2 + this.tileSpacing) / (this.tileHeight + this.tileSpacing); - var colCount = (imageWidth - this.tileMargin * 2 + this.tileSpacing) / (this.tileWidth + this.tileSpacing); - - if (rowCount % 1 !== 0 || colCount % 1 !== 0) - { - console.warn('Image tile area not tile size multiple in: ' + this.name); - } - - // In Tiled a tileset image that is not an even multiple of the tile dimensions is truncated - // - hence the floor when calculating the rows/columns. - rowCount = Math.floor(rowCount); - colCount = Math.floor(colCount); - - this.rows = rowCount; - this.columns = colCount; - - // In Tiled, "empty" spaces in a tileset count as tiles and hence count towards the gid - this.total = rowCount * colCount; - - this.texCoordinates.length = 0; - - var tx = this.tileMargin; - var ty = this.tileMargin; - - for (var y = 0; y < this.rows; y++) - { - for (var x = 0; x < this.columns; x++) - { - this.texCoordinates.push({ x: tx, y: ty }); - tx += this.tileWidth + this.tileSpacing; - } - - tx = this.tileMargin; - ty += this.tileHeight + this.tileSpacing; - } - - return this; - } - -}); - -module.exports = Tileset; - - -/***/ }), -/* 142 */ +/* 145 */ /***/ (function(module, exports) { /** @@ -30255,7 +30757,7 @@ module.exports = GetNewValue; /***/ }), -/* 143 */ +/* 146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30264,17 +30766,17 @@ module.exports = GetNewValue; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(227); -var GetAdvancedValue = __webpack_require__(15); +var Defaults = __webpack_require__(230); +var GetAdvancedValue = __webpack_require__(14); var GetBoolean = __webpack_require__(88); -var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(142); -var GetProps = __webpack_require__(492); -var GetTargets = __webpack_require__(225); +var GetEaseFunction = __webpack_require__(69); +var GetNewValue = __webpack_require__(145); +var GetProps = __webpack_require__(497); +var GetTargets = __webpack_require__(228); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(226); -var Tween = __webpack_require__(228); -var TweenData = __webpack_require__(230); +var GetValueOp = __webpack_require__(229); +var Tween = __webpack_require__(231); +var TweenData = __webpack_require__(233); /** * Creates a new Tween. @@ -30388,41 +30890,776 @@ module.exports = TweenBuilder; /***/ }), -/* 144 */ -/***/ (function(module, exports) { +/* 147 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Class = __webpack_require__(0); +var Utils = __webpack_require__(9); + /** - * Check whether the given values are fuzzily equal. + * @classdesc + * WebGLPipeline is a class that describes the way elements will be renderered + * in WebGL, specially focused on batching vertices (batching is not provided). + * Pipelines are mostly used for describing 2D rendering passes but it's + * flexible enough to be used for any type of rendering including 3D. + * Internally WebGLPipeline will handle things like compiling shaders, + * creating vertex buffers, assigning primitive topology and binding + * vertex attributes. * - * Two numbers are fuzzily equal if their difference is less than `epsilon`. + * The config properties are: + * - game: Current game instance. + * - renderer: Current WebGL renderer. + * - gl: Current WebGL context. + * - 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. + * - vertices: An optional buffer of vertices + * - attributes: An array describing the vertex attributes * - * @function Phaser.Math.Fuzzy.Equal + * The vertex attributes properties are: + * - name : String - Name of the attribute in the vertex shader + * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 + * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) + * - normalized : boolean - Is the attribute normalized + * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C + * Here you can find more information of how to describe an attribute: + * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer + * + * @class WebGLPipeline + * @memberof Phaser.Renderer.WebGL + * @constructor * @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`. + * @param {object} config - The configuration object for this WebGL Pipeline, as described above. */ -var Equal = function (a, b, epsilon) -{ - if (epsilon === undefined) { epsilon = 0.0001; } +var WebGLPipeline = new Class({ - return Math.abs(a - b) < epsilon; -}; + initialize: -module.exports = Equal; + function WebGLPipeline (config) + { + /** + * Name of the Pipeline. Used for identifying + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#name + * @type {string} + * @since 3.0.0 + */ + this.name = 'WebGLPipeline'; + + /** + * The Game which owns this WebGL Pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#game + * @type {Phaser.Game} + * @since 3.0.0 + */ + this.game = config.game; + + /** + * The canvas which this WebGL Pipeline renders to. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#view + * @type {HTMLCanvasElement} + * @since 3.0.0 + */ + this.view = config.game.canvas; + + /** + * Used to store the current game resolution + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution + * @type {number} + * @since 3.0.0 + */ + this.resolution = 1; + + /** + * Width of the current viewport + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#width + * @type {number} + * @since 3.0.0 + */ + this.width = 0; + + /** + * Height of the current viewport + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#height + * @type {number} + * @since 3.0.0 + */ + this.height = 0; + + /** + * The WebGL context this WebGL Pipeline uses. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#gl + * @type {WebGLRenderingContext} + * @since 3.0.0 + */ + this.gl = config.gl; + + /** + * How many vertices have been fed to the current pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount + * @type {number} + * @default 0 + * @since 3.0.0 + */ + this.vertexCount = 0; + + /** + * The limit of vertices that the pipeline can hold + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity + * @type {integer} + * @since 3.0.0 + */ + this.vertexCapacity = config.vertexCapacity; + + /** + * The WebGL Renderer which owns this WebGL Pipeline. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer + * @type {Phaser.Renderer.WebGL.WebGLRenderer} + * @since 3.0.0 + */ + this.renderer = config.renderer; + + /** + * Raw byte buffer of vertices. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData + * @type {ArrayBuffer} + * @since 3.0.0 + */ + this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); + + /** + * The handle to a WebGL vertex buffer object. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer + * @type {WebGLBuffer} + * @since 3.0.0 + */ + this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); + + /** + * The handle to a WebGL program + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#program + * @type {WebGLProgram} + * @since 3.0.0 + */ + this.program = this.renderer.createProgram(config.vertShader, config.fragShader); + + /** + * Array of objects that describe the vertex attributes + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes + * @type {object} + * @since 3.0.0 + */ + this.attributes = config.attributes; + + /** + * The size in bytes of the vertex + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize + * @type {integer} + * @since 3.0.0 + */ + this.vertexSize = config.vertexSize; + + /** + * The primitive topology which the pipeline will use to submit draw calls + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#topology + * @type {integer} + * @since 3.0.0 + */ + this.topology = config.topology; + + /** + * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources + * to the GPU. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes + * @type {Uint8Array} + * @since 3.0.0 + */ + this.bytes = new Uint8Array(this.vertexData); + + /** + * This will store the amount of components of 32 bit length + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount + * @type {integer} + * @since 3.0.0 + */ + this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); + + /** + * Indicates if the current pipeline is flushing the contents to the GPU. + * When the variable is set the flush function will be locked. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked + * @type {boolean} + * @since 3.1.0 + */ + this.flushLocked = false; + + /** + * Indicates if the current pipeline is active or not for this frame only. + * Reset in the onRender method. + * + * @name Phaser.Renderer.WebGL.WebGLPipeline#active + * @type {boolean} + * @since 3.10.0 + */ + this.active = false; + }, + + /** + * Called when the Game has fully booted and the Renderer has finished setting up. + * + * By this stage all Game level systems are now in place and you can perform any final + * tasks that the pipeline may need that relied on game systems such as the Texture Manager. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#boot + * @since 3.11.0 + */ + boot: function () + { + }, + + /** + * Adds a description of vertex attribute to the pipeline + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute + * @since 3.2.0 + * + * @param {string} name - Name of the vertex attribute + * @param {integer} size - Vertex component size + * @param {integer} type - Type of the attribute + * @param {boolean} normalized - Is the value normalized to a range + * @param {integer} offset - Byte offset to the beginning of the first element in the vertex + * + * @return {this} This WebGLPipeline instance. + */ + addAttribute: function (name, size, type, normalized, offset) + { + this.attributes.push({ + name: name, + size: size, + type: this.renderer.glFormats[type], + normalized: normalized, + offset: offset + }); + + this.vertexComponentCount = Utils.getComponentCount( + this.attributes, + this.gl + ); + return this; + }, + + /** + * Check if the current batch of vertices is full. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush + * @since 3.0.0 + * + * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. + */ + shouldFlush: function () + { + return (this.vertexCount >= this.vertexCapacity); + }, + + /** + * Resizes the properties used to describe the viewport + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#resize + * @since 3.0.0 + * + * @param {number} width - The new width of this WebGL Pipeline. + * @param {number} height - The new height of this WebGL Pipeline. + * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. + * + * @return {this} This WebGLPipeline instance. + */ + resize: function (width, height, resolution) + { + this.width = width * resolution; + this.height = height * resolution; + this.resolution = resolution; + + return this; + }, + + /** + * Binds the pipeline resources, including programs, vertex buffers and binds attributes + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#bind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + bind: function () + { + var gl = this.gl; + var vertexBuffer = this.vertexBuffer; + var attributes = this.attributes; + var program = this.program; + var renderer = this.renderer; + var vertexSize = this.vertexSize; + + renderer.setProgram(program); + renderer.setVertexBuffer(vertexBuffer); + + for (var index = 0; index < attributes.length; ++index) + { + var element = attributes[index]; + var location = gl.getAttribLocation(program, element.name); + + if (location >= 0) + { + gl.enableVertexAttribArray(location); + gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); + } + else if (location !== -1) + { + gl.disableVertexAttribArray(location); + } + } + + return this; + }, + + /** + * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. + * + * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onBind: function () + { + // This is for updating uniform data it's called on each bind attempt. + return this; + }, + + /** + * Called before each frame is rendered, but after the canvas has been cleared. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPreRender: function () + { + // called once every frame + return this; + }, + + /** + * Called before a Scene's Camera is rendered. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender + * @since 3.0.0 + * + * @param {Phaser.Scene} scene - The Scene being rendered. + * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. + * + * @return {this} This WebGLPipeline instance. + */ + onRender: function () + { + // called for each camera + return this; + }, + + /** + * Called after each frame has been completely rendered and snapshots have been taken. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + onPostRender: function () + { + // called once every frame + return this; + }, + + /** + * Uploads the vertex data and emits a draw call + * for the current batch of vertices. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#flush + * @since 3.0.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; + + if (vertexCount === 0) + { + this.flushLocked = false; + return; + } + + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); + gl.drawArrays(topology, 0, vertexCount); + + this.vertexCount = 0; + this.flushLocked = false; + + return this; + }, + + /** + * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy + * @since 3.0.0 + * + * @return {this} This WebGLPipeline instance. + */ + destroy: function () + { + var gl = this.gl; + + gl.deleteProgram(this.program); + gl.deleteBuffer(this.vertexBuffer); + + delete this.program; + delete this.vertexBuffer; + delete this.gl; + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new value of the `float` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1: function (name, x) + { + this.renderer.setFloat1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec2` uniform. + * @param {number} y - The new Y component of the `vec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2: function (name, x, y) + { + this.renderer.setFloat2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - The new X component of the `vec3` uniform. + * @param {number} y - The new Y component of the `vec3` uniform. + * @param {number} z - The new Z component of the `vec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3: function (name, x, y, z) + { + this.renderer.setFloat3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {number} x - X component of the uniform + * @param {number} y - Y component of the uniform + * @param {number} z - Z component of the uniform + * @param {number} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4: function (name, x, y, z, w) + { + this.renderer.setFloat4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat1v: function (name, arr) + { + this.renderer.setFloat1v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat2v: function (name, arr) + { + this.renderer.setFloat2v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat3v: function (name, arr) + { + this.renderer.setFloat3v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v + * @since 3.13.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {Float32Array} arr - The new value to be used for the uniform variable. + * + * @return {this} This WebGLPipeline instance. + */ + setFloat4v: function (name, arr) + { + this.renderer.setFloat4v(this.program, name, arr); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new value of the `int` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt1: function (name, x) + { + this.renderer.setInt1(this.program, name, x); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec2` uniform. + * @param {integer} y - The new Y component of the `ivec2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt2: function (name, x, y) + { + this.renderer.setInt2(this.program, name, x, y); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - The new X component of the `ivec3` uniform. + * @param {integer} y - The new Y component of the `ivec3` uniform. + * @param {integer} z - The new Z component of the `ivec3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setInt3: function (name, x, y, z) + { + this.renderer.setInt3(this.program, name, x, y, z); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {integer} x - X component of the uniform + * @param {integer} y - Y component of the uniform + * @param {integer} z - Z component of the uniform + * @param {integer} w - W component of the uniform + * + * @return {this} This WebGLPipeline instance. + */ + setInt4: function (name, x, y, z, w) + { + this.renderer.setInt4(this.program, name, x, y, z, w); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat2` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix2: function (name, transpose, matrix) + { + this.renderer.setMatrix2(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. + * @param {Float32Array} matrix - The new values for the `mat3` uniform. + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix3: function (name, transpose, matrix) + { + this.renderer.setMatrix3(this.program, name, transpose, matrix); + + return this; + }, + + /** + * Set a uniform value of the current pipeline program. + * + * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 + * @since 3.2.0 + * + * @param {string} name - The name of the uniform to look-up and modify. + * @param {boolean} transpose - Should the matrix be transpose + * @param {Float32Array} matrix - Matrix data + * + * @return {this} This WebGLPipeline instance. + */ + setMatrix4: function (name, transpose, matrix) + { + this.renderer.setMatrix4(this.program, name, transpose, matrix); + + return this; + } + +}); + +module.exports = WebGLPipeline; /***/ }), -/* 145 */ +/* 148 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -30440,9 +31677,9 @@ var Composite = {}; module.exports = Composite; -var Events = __webpack_require__(237); -var Common = __webpack_require__(37); -var Bounds = __webpack_require__(102); +var Events = __webpack_require__(240); +var Common = __webpack_require__(38); +var Bounds = __webpack_require__(100); var Body = __webpack_require__(62); (function() { @@ -31116,7 +32353,7 @@ var Body = __webpack_require__(62); /***/ }), -/* 146 */ +/* 149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31155,7 +32392,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 147 */ +/* 150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31199,7 +32436,7 @@ module.exports = Random; /***/ }), -/* 148 */ +/* 151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -31208,12 +32445,12 @@ module.exports = Random; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(111); -var FindClosestInSorted = __webpack_require__(267); -var Frame = __webpack_require__(268); +var FindClosestInSorted = __webpack_require__(270); +var Frame = __webpack_require__(271); var GetValue = __webpack_require__(6); /** @@ -31428,9 +32665,9 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#addFrame * @since 3.0.0 * - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description] + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ addFrame: function (config) { @@ -31444,9 +32681,9 @@ var Animation = new Class({ * @since 3.0.0 * * @param {integer} index - The index to insert the frame at within the animation. - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - [description] + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} config - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ addFrameAt: function (index, config) { @@ -31492,13 +32729,14 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when this Animation completes playback. + * Optionally, hides the parent Game Object, then stops playback. * * @method Phaser.Animations.Animation#completeAnimation * @protected * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ completeAnimation: function (component) { @@ -31511,14 +32749,15 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when this Animation first starts to play. + * Sets the accumulator and nextTick properties. * * @method Phaser.Animations.Animation#getFirstTick * @protected * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] - * @param {boolean} [includeDelay=true] - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. + * @param {boolean} [includeDelay=true] - If `true` the Animation Components delay value will be added to the `nextTick` total. */ getFirstTick: function (component, includeDelay) { @@ -31551,16 +32790,16 @@ var Animation = new Class({ }, /** - * [description] + * Creates AnimationFrame instances based on the given frame data. * * @method Phaser.Animations.Animation#getFrames * @since 3.0.0 * - * @param {Phaser.Textures.TextureManager} textureManager - [description] - * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - [description] - * @param {string} [defaultTextureKey] - [description] + * @param {Phaser.Textures.TextureManager} textureManager - A reference to the global Texture Manager. + * @param {(string|Phaser.Types.Animations.AnimationFrame[])} frames - Either a string, in which case it will use all frames from a texture with the matching key, or an array of Animation Frame configuration objects. + * @param {string} [defaultTextureKey] - The key to use if no key is set in the frame configuration object. * - * @return {Phaser.Animations.AnimationFrame[]} [description] + * @return {Phaser.Animations.AnimationFrame[]} An array of newly created AnimationFrame instances. */ getFrames: function (textureManager, frames, defaultTextureKey) { @@ -31653,12 +32892,12 @@ var Animation = new Class({ }, /** - * [description] + * Called internally. Sets the accumulator and nextTick values of the current Animation. * * @method Phaser.Animations.Animation#getNextTick * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ getNextTick: function (component) { @@ -31793,7 +33032,11 @@ var Animation = new Class({ if (component._reverse === !isReverse && component.repeatCounter > 0) { - component.forward = isReverse; + if (!component._repeatDelay || component.pendingRepeat) + + { + component.forward = isReverse; + } this.repeatAnimation(component); @@ -31828,12 +33071,13 @@ var Animation = new Class({ }, /** - * [description] + * Called internally when the Animation is playing backwards. + * Sets the previous frame, causing a yoyo, repeat, complete or update, accordingly. * * @method Phaser.Animations.Animation#previousFrame * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ previousFrame: function (component) { @@ -31891,14 +33135,15 @@ var Animation = new Class({ }, /** - * [description] + * Removes the given AnimationFrame from this Animation instance. + * This is a global action. Any Game Object using this Animation will be impacted by this change. * * @method Phaser.Animations.Animation#removeFrame * @since 3.0.0 * - * @param {Phaser.Animations.AnimationFrame} frame - [description] + * @param {Phaser.Animations.AnimationFrame} frame - The AnimationFrame to be removed. * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ removeFrame: function (frame) { @@ -31921,7 +33166,7 @@ var Animation = new Class({ * * @param {integer} index - The index in the AnimationFrame array * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ removeFrameAt: function (index) { @@ -31933,7 +33178,8 @@ var Animation = new Class({ }, /** - * [description] + * Called internally during playback. Forces the animation to repeat, providing there are enough counts left + * in the repeat counter. * * @method Phaser.Animations.Animation#repeatAnimation * @fires Phaser.Animations.Events#ANIMATION_REPEAT @@ -31941,7 +33187,7 @@ var Animation = new Class({ * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_REPEAT * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ repeatAnimation: function (component) { @@ -31986,7 +33232,7 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#setFrame * @since 3.0.0 * - * @param {Phaser.GameObjects.Components.Animation} component - [description] + * @param {Phaser.GameObjects.Components.Animation} component - The Animation Component belonging to the Game Object invoking this call. */ setFrame: function (component) { @@ -32007,7 +33253,7 @@ var Animation = new Class({ * @method Phaser.Animations.Animation#toJSON * @since 3.0.0 * - * @return {Phaser.Types.Animations.JSONAnimation} [description] + * @return {Phaser.Types.Animations.JSONAnimation} The resulting JSONAnimation formatted object. */ toJSON: function () { @@ -32035,12 +33281,12 @@ var Animation = new Class({ }, /** - * [description] + * Called internally whenever frames are added to, or removed from, this Animation. * * @method Phaser.Animations.Animation#updateFrameSequence * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ updateFrameSequence: function () { @@ -32092,12 +33338,12 @@ var Animation = new Class({ }, /** - * [description] + * Pauses playback of this Animation. The paused state is set immediately. * * @method Phaser.Animations.Animation#pause * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ pause: function () { @@ -32107,12 +33353,12 @@ var Animation = new Class({ }, /** - * [description] + * Resumes playback of this Animation. The paused state is reset immediately. * * @method Phaser.Animations.Animation#resume * @since 3.0.0 * - * @return {Phaser.Animations.Animation} This Animation object. + * @return {this} This Animation object. */ resume: function () { @@ -32122,7 +33368,9 @@ var Animation = new Class({ }, /** - * [description] + * Destroys this Animation instance. It will remove all event listeners, + * remove this animation and its key from the global Animation Manager, + * and then destroy all Animation Frames in turn. * * @method Phaser.Animations.Animation#destroy * @since 3.0.0 @@ -32152,7 +33400,7 @@ module.exports = Animation; /***/ }), -/* 149 */ +/* 152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32165,18 +33413,22 @@ var Perimeter = __webpack_require__(112); var Point = __webpack_require__(4); /** - * Position is a value between 0 and 1 where 0 = the top-left of the rectangle and 0.5 = the bottom right. + * Calculates the coordinates of a point at a certain `position` on the Rectangle's perimeter. + * + * The `position` is a fraction between 0 and 1 which defines how far into the perimeter the point is. + * + * A value of 0 or 1 returns the point at the top left corner of the rectangle, while a value of 0.5 returns the point at the bottom right corner of the rectangle. Values between 0 and 0.5 are on the top or the right side and values between 0.5 and 1 are on the bottom or the left side. * * @function Phaser.Geom.Rectangle.GetPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rectangle - [description] - * @param {number} position - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {number} position - The normalized distance into the Rectangle's perimeter to return. + * @param {(Phaser.Geom.Point|object)} [out] - An object to update with the `x` and `y` coordinates of the point. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} The updated `output` object, or a new Point if no `output` object was given. */ var GetPoint = function (rectangle, position, out) { @@ -32229,7 +33481,7 @@ module.exports = GetPoint; /***/ }), -/* 150 */ +/* 153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32266,7 +33518,7 @@ var GetPoints = function (line, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Length(line) / stepRate; } @@ -32294,7 +33546,7 @@ module.exports = GetPoints; /***/ }), -/* 151 */ +/* 154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32334,7 +33586,7 @@ module.exports = Random; /***/ }), -/* 152 */ +/* 155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32372,7 +33624,7 @@ module.exports = Random; /***/ }), -/* 153 */ +/* 156 */ /***/ (function(module, exports) { /** @@ -32501,7 +33753,7 @@ module.exports = Pipeline; /***/ }), -/* 154 */ +/* 157 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32542,7 +33794,7 @@ module.exports = Random; /***/ }), -/* 155 */ +/* 158 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -32554,17 +33806,17 @@ module.exports = Random; var Point = __webpack_require__(4); /** - * [description] + * Returns a random Point from within the area of the given Triangle. * * @function Phaser.Geom.Triangle.Random * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Triangle} triangle - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get a random point from. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of a random position within the Triangle. */ var Random = function (triangle, out) { @@ -32598,7 +33850,7 @@ module.exports = Random; /***/ }), -/* 156 */ +/* 159 */ /***/ (function(module, exports) { /** @@ -32610,16 +33862,20 @@ module.exports = Random; /** * Rotate a `point` around `x` and `y` by the given `angle` and `distance`. * + * In polar notation, this maps a point from (r, t) to (distance, t + angle), vs. the origin (x, y). + * * @function Phaser.Math.RotateAroundDistance * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * @param {number} distance - The distance from (x, y) to place the point at. * - * @return {Phaser.Geom.Point} The given point. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAroundDistance = function (point, x, y, angle, distance) { @@ -32635,7 +33891,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 157 */ +/* 160 */ /***/ (function(module, exports) { /** @@ -32674,7 +33930,7 @@ module.exports = SmootherStep; /***/ }), -/* 158 */ +/* 161 */ /***/ (function(module, exports) { /** @@ -32721,7 +33977,7 @@ module.exports = SmoothStep; /***/ }), -/* 159 */ +/* 162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33094,7 +34350,7 @@ module.exports = Map; /***/ }), -/* 160 */ +/* 163 */ /***/ (function(module, exports) { /** @@ -33126,7 +34382,7 @@ module.exports = Map; * @function Phaser.Utils.String.Pad * @since 3.0.0 * - * @param {string} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. + * @param {string|number|object} str - The target string. `toString()` will be called on the string, which means you can also pass in common data types like numbers. * @param {integer} [len=0] - The number of characters to be added. * @param {string} [pad=" "] - The string to pad it out with (defaults to a space). * @param {integer} [dir=3] - The direction dir = 1 (left), 2 (right), 3 (both). @@ -33170,7 +34426,7 @@ module.exports = Pad; /***/ }), -/* 161 */ +/* 164 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33179,10 +34435,10 @@ module.exports = Pad; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HexStringToColor = __webpack_require__(291); -var IntegerToColor = __webpack_require__(294); -var ObjectToColor = __webpack_require__(296); -var RGBStringToColor = __webpack_require__(297); +var HexStringToColor = __webpack_require__(294); +var IntegerToColor = __webpack_require__(297); +var ObjectToColor = __webpack_require__(299); +var RGBStringToColor = __webpack_require__(300); /** * Converts the given source color value into an instance of a Color class. @@ -33226,7 +34482,7 @@ module.exports = ValueToColor; /***/ }), -/* 162 */ +/* 165 */ /***/ (function(module, exports) { /** @@ -33256,7 +34512,7 @@ module.exports = GetColor; /***/ }), -/* 163 */ +/* 166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33265,7 +34521,7 @@ module.exports = GetColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetColor = __webpack_require__(162); +var GetColor = __webpack_require__(165); /** * Converts an HSV (hue, saturation and value) color value to RGB. @@ -33357,7 +34613,7 @@ module.exports = HSVToRGB; /***/ }), -/* 164 */ +/* 167 */ /***/ (function(module, exports) { /** @@ -33489,7 +34745,7 @@ module.exports = Smoothing(); /***/ }), -/* 165 */ +/* 168 */ /***/ (function(module, exports) { /** @@ -33526,7 +34782,7 @@ module.exports = CenterOn; /***/ }), -/* 166 */ +/* 169 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33535,89 +34791,8 @@ module.exports = CenterOn; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -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 = { - - Power0: Linear, - Power1: Quadratic.Out, - Power2: Cubic.Out, - Power3: Quartic.Out, - Power4: Quintic.Out, - - Linear: Linear, - Quad: Quadratic.Out, - Cubic: Cubic.Out, - Quart: Quartic.Out, - Quint: Quintic.Out, - Sine: Sine.Out, - Expo: Expo.Out, - Circ: Circular.Out, - Elastic: Elastic.Out, - Back: Back.Out, - Bounce: Bounce.Out, - Stepped: Stepped, - - 'Quad.easeIn': Quadratic.In, - 'Cubic.easeIn': Cubic.In, - 'Quart.easeIn': Quartic.In, - 'Quint.easeIn': Quintic.In, - 'Sine.easeIn': Sine.In, - 'Expo.easeIn': Expo.In, - 'Circ.easeIn': Circular.In, - 'Elastic.easeIn': Elastic.In, - 'Back.easeIn': Back.In, - 'Bounce.easeIn': Bounce.In, - - 'Quad.easeOut': Quadratic.Out, - 'Cubic.easeOut': Cubic.Out, - 'Quart.easeOut': Quartic.Out, - 'Quint.easeOut': Quintic.Out, - 'Sine.easeOut': Sine.Out, - 'Expo.easeOut': Expo.Out, - 'Circ.easeOut': Circular.Out, - 'Elastic.easeOut': Elastic.Out, - 'Back.easeOut': Back.Out, - 'Bounce.easeOut': Bounce.Out, - - 'Quad.easeInOut': Quadratic.InOut, - 'Cubic.easeInOut': Cubic.InOut, - 'Quart.easeInOut': Quartic.InOut, - 'Quint.easeInOut': Quintic.InOut, - 'Sine.easeInOut': Sine.InOut, - 'Expo.easeInOut': Expo.InOut, - 'Circ.easeInOut': Circular.InOut, - 'Elastic.easeInOut': Elastic.InOut, - 'Back.easeInOut': Back.InOut, - 'Bounce.easeInOut': Bounce.InOut - -}; - - -/***/ }), -/* 167 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var OS = __webpack_require__(116); -var Browser = __webpack_require__(117); +var OS = __webpack_require__(117); +var Browser = __webpack_require__(118); var CanvasPool = __webpack_require__(26); /** @@ -33799,7 +34974,7 @@ module.exports = init(); /***/ }), -/* 168 */ +/* 170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33808,8 +34983,8 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(15); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Math @@ -33818,62 +34993,62 @@ var Extend = __webpack_require__(17); var PhaserMath = { // Collections of functions - 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), + Angle: __webpack_require__(733), + Distance: __webpack_require__(743), + Easing: __webpack_require__(748), + Fuzzy: __webpack_require__(749), + Interpolation: __webpack_require__(752), + Pow2: __webpack_require__(757), + Snap: __webpack_require__(759), // Expose the RNG Class - RandomDataGenerator: __webpack_require__(752), + RandomDataGenerator: __webpack_require__(761), // Single functions - Average: __webpack_require__(753), - Bernstein: __webpack_require__(319), - Between: __webpack_require__(170), - CatmullRom: __webpack_require__(169), - CeilTo: __webpack_require__(754), - Clamp: __webpack_require__(22), + Average: __webpack_require__(762), + Bernstein: __webpack_require__(323), + Between: __webpack_require__(172), + CatmullRom: __webpack_require__(171), + CeilTo: __webpack_require__(763), + Clamp: __webpack_require__(19), DegToRad: __webpack_require__(35), - Difference: __webpack_require__(755), - Factorial: __webpack_require__(320), - FloatBetween: __webpack_require__(326), - FloorTo: __webpack_require__(756), + Difference: __webpack_require__(764), + Factorial: __webpack_require__(324), + FloatBetween: __webpack_require__(119), + FloorTo: __webpack_require__(765), FromPercent: __webpack_require__(87), - 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), + GetSpeed: __webpack_require__(766), + IsEven: __webpack_require__(767), + IsEvenStrict: __webpack_require__(768), + Linear: __webpack_require__(116), + MaxAdd: __webpack_require__(769), + MinSub: __webpack_require__(770), + Percent: __webpack_require__(771), + RadToDeg: __webpack_require__(173), + RandomXY: __webpack_require__(772), + RandomXYZ: __webpack_require__(773), + RandomXYZW: __webpack_require__(774), + Rotate: __webpack_require__(330), + RotateAround: __webpack_require__(276), + RotateAroundDistance: __webpack_require__(159), + RoundAwayFromZero: __webpack_require__(331), + RoundTo: __webpack_require__(775), + SinCosTableGenerator: __webpack_require__(776), + SmootherStep: __webpack_require__(160), + SmoothStep: __webpack_require__(161), + ToXY: __webpack_require__(777), + TransformXY: __webpack_require__(332), + Within: __webpack_require__(778), Wrap: __webpack_require__(58), // Vector classes Vector2: __webpack_require__(3), - Vector3: __webpack_require__(172), - Vector4: __webpack_require__(330), - Matrix3: __webpack_require__(331), - Matrix4: __webpack_require__(332), - Quaternion: __webpack_require__(333), - RotateVec3: __webpack_require__(770) + Vector3: __webpack_require__(174), + Vector4: __webpack_require__(333), + Matrix3: __webpack_require__(334), + Matrix4: __webpack_require__(335), + Quaternion: __webpack_require__(336), + RotateVec3: __webpack_require__(779) }; @@ -33887,7 +35062,7 @@ module.exports = PhaserMath; /***/ }), -/* 169 */ +/* 171 */ /***/ (function(module, exports) { /** @@ -33897,16 +35072,16 @@ module.exports = PhaserMath; */ /** - * Calculates a Catmull-Rom value. + * Calculates a Catmull-Rom value from the given points, based on an alpha of 0.5. * * @function Phaser.Math.CatmullRom * @since 3.0.0 * - * @param {number} t - [description] - * @param {number} p0 - [description] - * @param {number} p1 - [description] - * @param {number} p2 - [description] - * @param {number} p3 - [description] + * @param {number} t - The amount to interpolate by. + * @param {number} p0 - The first control point. + * @param {number} p1 - The second control point. + * @param {number} p2 - The third control point. + * @param {number} p3 - The fourth control point. * * @return {number} The Catmull-Rom value. */ @@ -33924,7 +35099,7 @@ module.exports = CatmullRom; /***/ }), -/* 170 */ +/* 172 */ /***/ (function(module, exports) { /** @@ -33953,7 +35128,7 @@ module.exports = Between; /***/ }), -/* 171 */ +/* 173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -33962,7 +35137,7 @@ module.exports = Between; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(15); /** * Convert the given angle in radians, to the equivalent angle in degrees. @@ -33983,7 +35158,7 @@ module.exports = RadToDeg; /***/ }), -/* 172 */ +/* 174 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34793,7 +35968,7 @@ module.exports = Vector3; /***/ }), -/* 173 */ +/* 175 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34894,7 +36069,7 @@ module.exports = DefaultPlugins; /***/ }), -/* 174 */ +/* 176 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34904,7 +36079,7 @@ module.exports = DefaultPlugins; */ var Rectangle = __webpack_require__(11); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); // points is an array of Point-like objects, // either 2 dimensional arrays, or objects with public x/y properties: @@ -34980,7 +36155,7 @@ module.exports = FromPoints; /***/ }), -/* 175 */ +/* 177 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -34991,10 +36166,10 @@ module.exports = FromPoints; var CONST = { - CENTER: __webpack_require__(353), - ORIENTATION: __webpack_require__(354), - SCALE_MODE: __webpack_require__(355), - ZOOM: __webpack_require__(356) + CENTER: __webpack_require__(358), + ORIENTATION: __webpack_require__(359), + SCALE_MODE: __webpack_require__(360), + ZOOM: __webpack_require__(361) }; @@ -35002,7 +36177,7 @@ module.exports = CONST; /***/ }), -/* 176 */ +/* 178 */ /***/ (function(module, exports) { /** @@ -35031,7 +36206,7 @@ module.exports = RemoveFromDOM; /***/ }), -/* 177 */ +/* 179 */ /***/ (function(module, exports) { /** @@ -35129,7 +36304,7 @@ module.exports = INPUT_CONST; /***/ }), -/* 178 */ +/* 180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35139,13 +36314,13 @@ module.exports = INPUT_CONST; */ var Class = __webpack_require__(0); -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 CONST = __webpack_require__(125); +var DefaultPlugins = __webpack_require__(175); +var Events = __webpack_require__(22); +var GetPhysicsPlugins = __webpack_require__(878); +var GetScenePlugins = __webpack_require__(879); var NOOP = __webpack_require__(1); -var Settings = __webpack_require__(369); +var Settings = __webpack_require__(374); /** * @classdesc @@ -35239,7 +36414,7 @@ var Systems = new Class({ /** * A reference to the global Animations Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.anims` property. * * @name Phaser.Scenes.Systems#anims @@ -35251,7 +36426,7 @@ var Systems = new Class({ /** * A reference to the global Cache. The Cache stores all files bought in to Phaser via * the Loader, with the exception of images. Images are stored in the Texture Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.cache` property. * * @name Phaser.Scenes.Systems#cache @@ -35262,7 +36437,7 @@ var Systems = new Class({ /** * A reference to the global Plugins Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.plugins` property. * * @name Phaser.Scenes.Systems#plugins @@ -35274,7 +36449,7 @@ var Systems = new Class({ /** * A reference to the global registry. This is a game-wide instance of the Data Manager, allowing * you to exchange data between Scenes via a universal and shared point. - * + * * In the default set-up you can access this from within a Scene via the `this.registry` property. * * @name Phaser.Scenes.Systems#registry @@ -35285,7 +36460,7 @@ var Systems = new Class({ /** * A reference to the global Scale Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.scale` property. * * @name Phaser.Scenes.Systems#scale @@ -35296,7 +36471,7 @@ var Systems = new Class({ /** * A reference to the global Sound Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.sound` property. * * @name Phaser.Scenes.Systems#sound @@ -35307,7 +36482,7 @@ var Systems = new Class({ /** * A reference to the global Texture Manager. - * + * * In the default set-up you can access this from within a Scene via the `this.textures` property. * * @name Phaser.Scenes.Systems#textures @@ -35320,9 +36495,9 @@ var Systems = new Class({ /** * A reference to the Scene's Game Object Factory. - * + * * Use this to quickly and easily create new Game Object's. - * + * * In the default set-up you can access this from within a Scene via the `this.add` property. * * @name Phaser.Scenes.Systems#add @@ -35333,9 +36508,9 @@ var Systems = new Class({ /** * A reference to the Scene's Camera Manager. - * + * * Use this to manipulate and create Cameras for this specific Scene. - * + * * In the default set-up you can access this from within a Scene via the `this.cameras` property. * * @name Phaser.Scenes.Systems#cameras @@ -35346,9 +36521,9 @@ var Systems = new Class({ /** * A reference to the Scene's Display List. - * + * * Use this to organize the children contained in the display list. - * + * * In the default set-up you can access this from within a Scene via the `this.children` property. * * @name Phaser.Scenes.Systems#displayList @@ -35359,9 +36534,9 @@ var Systems = new Class({ /** * A reference to the Scene's Event Manager. - * + * * Use this to listen for Scene specific events, such as `pause` and `shutdown`. - * + * * In the default set-up you can access this from within a Scene via the `this.events` property. * * @name Phaser.Scenes.Systems#events @@ -35372,11 +36547,11 @@ var Systems = new Class({ /** * A reference to the Scene's Game Object Creator. - * + * * Use this to quickly and easily create new Game Object's. The difference between this and the * Game Object Factory, is that the Creator just creates and returns Game Object instances, it * doesn't then add them to the Display List or Update List. - * + * * In the default set-up you can access this from within a Scene via the `this.make` property. * * @name Phaser.Scenes.Systems#make @@ -35387,10 +36562,10 @@ var Systems = new Class({ /** * A reference to the Scene Manager Plugin. - * + * * Use this to manipulate both this and other Scene's in your game, for example to launch a parallel Scene, * or pause or resume a Scene, or switch from this Scene to another. - * + * * In the default set-up you can access this from within a Scene via the `this.scene` property. * * @name Phaser.Scenes.Systems#scenePlugin @@ -35401,12 +36576,12 @@ var Systems = new Class({ /** * A reference to the Scene's Update List. - * + * * Use this to organize the children contained in the update list. - * + * * The Update List is responsible for managing children that need their `preUpdate` methods called, * in order to process so internal components, such as Sprites with Animations. - * + * * In the default set-up there is no reference to this from within the Scene itself. * * @name Phaser.Scenes.Systems#updateList @@ -35490,7 +36665,7 @@ var Systems = new Class({ * * @method Phaser.Scenes.Systems#step * @fires Phaser.Scenes.Events#PRE_UPDATE - * @fires Phaser.Scenes.Events#_UPDATE + * @fires Phaser.Scenes.Events#UPDATE * @fires Phaser.Scenes.Events#POST_UPDATE * @since 3.0.0 * @@ -35558,7 +36733,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#pause * @fires Phaser.Scenes.Events#PAUSE * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'pause' event. * * @return {Phaser.Scenes.Systems} This Systems object. @@ -35613,7 +36788,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#sleep * @fires Phaser.Scenes.Events#SLEEP * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'sleep' event. * * @return {Phaser.Scenes.Systems} This Systems object. @@ -35662,14 +36837,14 @@ var Systems = new Class({ /** * 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} + * @return {any} */ getData: function () { @@ -35787,7 +36962,7 @@ var Systems = new Class({ /** * Set the active state of this Scene. - * + * * An active Scene will run its core update loop. * * @method Phaser.Scenes.Systems#setActive @@ -35850,7 +37025,7 @@ var Systems = new Class({ * @method Phaser.Scenes.Systems#shutdown * @fires Phaser.Scenes.Events#SHUTDOWN * @since 3.0.0 - * + * * @param {object} [data] - A data object that will be passed in the 'shutdown' event. */ shutdown: function (data) @@ -35903,7 +37078,7 @@ module.exports = Systems; /***/ }), -/* 179 */ +/* 181 */ /***/ (function(module, exports) { /** @@ -35940,7 +37115,7 @@ module.exports = UppercaseFirst; /***/ }), -/* 180 */ +/* 182 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -35951,7 +37126,7 @@ module.exports = UppercaseFirst; var Class = __webpack_require__(0); var Frame = __webpack_require__(94); -var TextureSource = __webpack_require__(372); +var TextureSource = __webpack_require__(377); var TEXTURE_MISSING_ERROR = 'Texture.frame missing: '; @@ -36460,7 +37635,7 @@ module.exports = Texture; /***/ }), -/* 181 */ +/* 183 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36475,45 +37650,45 @@ module.exports = Texture; module.exports = { - Matrix: __webpack_require__(907), + Matrix: __webpack_require__(914), - 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), + Add: __webpack_require__(921), + AddAt: __webpack_require__(922), + BringToTop: __webpack_require__(923), + CountAllMatching: __webpack_require__(924), + Each: __webpack_require__(925), + EachInRange: __webpack_require__(926), + FindClosestInSorted: __webpack_require__(270), + GetAll: __webpack_require__(381), + GetFirst: __webpack_require__(382), + GetRandom: __webpack_require__(185), + MoveDown: __webpack_require__(927), + MoveTo: __webpack_require__(928), + MoveUp: __webpack_require__(929), + NumberArray: __webpack_require__(930), + NumberArrayStep: __webpack_require__(931), + QuickSelect: __webpack_require__(390), + Range: __webpack_require__(391), + Remove: __webpack_require__(123), + RemoveAt: __webpack_require__(932), + RemoveBetween: __webpack_require__(933), + RemoveRandomElement: __webpack_require__(934), + Replace: __webpack_require__(935), + RotateLeft: __webpack_require__(286), + RotateRight: __webpack_require__(287), SafeRange: __webpack_require__(68), - SendToBack: __webpack_require__(931), - SetAll: __webpack_require__(932), + SendToBack: __webpack_require__(936), + SetAll: __webpack_require__(937), Shuffle: __webpack_require__(114), - SpliceOne: __webpack_require__(79), - StableSort: __webpack_require__(128), - Swap: __webpack_require__(933) + SpliceOne: __webpack_require__(80), + StableSort: __webpack_require__(131), + Swap: __webpack_require__(938) }; /***/ }), -/* 182 */ +/* 184 */ /***/ (function(module, exports) { /** @@ -36574,7 +37749,7 @@ module.exports = CheckMatrix; /***/ }), -/* 183 */ +/* 185 */ /***/ (function(module, exports) { /** @@ -36609,7 +37784,7 @@ module.exports = GetRandom; /***/ }), -/* 184 */ +/* 186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -36619,8 +37794,8 @@ module.exports = GetRandom; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(935); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(940); /** * @classdesc @@ -36900,7 +38075,7 @@ module.exports = ProcessQueue; /***/ }), -/* 185 */ +/* 187 */ /***/ (function(module, exports) { /** @@ -37039,7 +38214,7 @@ module.exports = ParseXMLBitmapFont; /***/ }), -/* 186 */ +/* 188 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37048,13 +38223,13 @@ module.exports = ParseXMLBitmapFont; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BlitterRender = __webpack_require__(943); -var Bob = __webpack_require__(946); +var BlitterRender = __webpack_require__(948); +var Bob = __webpack_require__(951); var Class = __webpack_require__(0); var Components = __webpack_require__(12); var Frame = __webpack_require__(94); -var GameObject = __webpack_require__(14); -var List = __webpack_require__(126); +var GameObject = __webpack_require__(13); +var List = __webpack_require__(129); /** * @callback CreateCallback @@ -37338,7 +38513,7 @@ module.exports = Blitter; /***/ }), -/* 187 */ +/* 189 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -37348,15 +38523,15 @@ module.exports = Blitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayUtils = __webpack_require__(181); +var ArrayUtils = __webpack_require__(183); 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 GameObject = __webpack_require__(13); var Rectangle = __webpack_require__(11); -var Render = __webpack_require__(947); -var Union = __webpack_require__(386); +var Render = __webpack_require__(952); +var Union = __webpack_require__(393); var Vector2 = __webpack_require__(3); /** @@ -37369,6 +38544,10 @@ var Vector2 = __webpack_require__(3); * * The position of the Game Object automatically becomes relative to the position of the Container. * + * The origin of a Container is 0x0 (in local space) and that cannot be changed. The children you add to the + * Container should be positioned with this value in mind. I.e. you should treat 0x0 as being the center of + * the Container, and position children positively and negative around it as required. + * * When the Container is rendered, all of its children are rendered as well, in the order in which they exist * within the Container. Container children can be repositioned using methods such as `MoveUp`, `MoveDown` and `SendToBack`. * @@ -37690,7 +38869,7 @@ var Container = new Class({ * * @param {boolean} [value=true] - The exclusive state of this Container. * - * @return {Phaser.GameObjects.Container} This Container. + * @return {this} This Container. */ setExclusive: function (value) { @@ -37727,12 +38906,21 @@ var Container = new Class({ output.setTo(this.x, this.y, 0, 0); + if (this.parentContainer) + { + var parentMatrix = this.parentContainer.getBoundsTransformMatrix(); + var transformedPosition = parentMatrix.transformPoint(this.x, this.y); + output.setTo(transformedPosition.x, transformedPosition.y, 0, 0); + } + if (this.list.length > 0) { var children = this.list; var tempRect = new Rectangle(); - for (var i = 0; i < children.length; i++) + var firstChildBounds = children[0].getBounds(); + output.setTo(firstChildBounds.x, firstChildBounds.y, firstChildBounds.width, firstChildBounds.height); + for (var i = 1; i < children.length; i++) { var entry = children[i]; @@ -37811,7 +38999,11 @@ var Container = new Class({ if (this.parentContainer) { - return this.parentContainer.pointToContainer(source, output); + this.parentContainer.pointToContainer(source, output); + } + else + { + output = new Vector2(source.x, source.y); } var tempMatrix = this.tempTransformMatrix; @@ -37851,7 +39043,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ add: function (child) { @@ -37873,7 +39065,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to add to the Container. * @param {integer} [index=0] - The position to insert the Game Object/s at. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ addAt: function (child, index) { @@ -37922,7 +39114,7 @@ var Container = new Class({ * @param {string} property - The property to lexically sort by. * @param {function} [handler] - Provide your own custom handler function. Will receive 2 children which it should compare and return a boolean. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ sort: function (property, handler) { @@ -38064,7 +39256,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} child1 - The first Game Object to swap. * @param {Phaser.GameObjects.GameObject} child2 - The second Game Object to swap. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ swap: function (child1, child2) { @@ -38087,7 +39279,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} child - The Game Object to move. * @param {integer} index - The new position of the Game Object in this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveTo: function (child, index) { @@ -38109,7 +39301,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Object, or array of Game Objects, to be removed from the Container. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each child successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ remove: function (child, destroyChild) { @@ -38142,7 +39334,7 @@ var Container = new Class({ * @param {integer} index - The index of the Game Object to be removed. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeAt: function (index, destroyChild) { @@ -38168,7 +39360,7 @@ var Container = new Class({ * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeBetween: function (startIndex, endIndex, destroyChild) { @@ -38195,7 +39387,7 @@ var Container = new Class({ * * @param {boolean} [destroyChild=false] - Optionally call `destroy` on each Game Object successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ removeAll: function (destroyChild) { @@ -38221,7 +39413,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to bring to the top of the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ bringToTop: function (child) { @@ -38239,7 +39431,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to send to the bottom of the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ sendToBack: function (child) { @@ -38256,7 +39448,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveUp: function (child) { @@ -38273,7 +39465,7 @@ var Container = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to be moved in the Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ moveDown: function (child) { @@ -38288,7 +39480,7 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#reverse * @since 3.4.0 * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ reverse: function () { @@ -38303,7 +39495,7 @@ var Container = new Class({ * @method Phaser.GameObjects.Container#shuffle * @since 3.4.0 * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ shuffle: function () { @@ -38323,7 +39515,7 @@ var Container = new Class({ * @param {Phaser.GameObjects.GameObject} newChild - The Game Object to be added to this Container. * @param {boolean} [destroyChild=false] - Optionally call `destroy` on the Game Object if successfully removed from this Container. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ replace: function (oldChild, newChild, destroyChild) { @@ -38375,7 +39567,7 @@ var Container = new Class({ * @param {integer} [startIndex=0] - An optional start index to search from. * @param {integer} [endIndex=Container.length] - An optional end index to search up to (but not included) * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ setAll: function (property, value, startIndex, endIndex) { @@ -38408,7 +39600,7 @@ var Container = new Class({ * @param {object} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ each: function (callback, context) { @@ -38445,7 +39637,7 @@ var Container = new Class({ * @param {object} [context] - Value to use as `this` when executing callback. * @param {...*} [args] - Additional arguments that will be passed to the callback, after the child. * - * @return {Phaser.GameObjects.Container} This Container instance. + * @return {this} This Container instance. */ iterate: function (callback, context) { @@ -38663,7 +39855,7 @@ module.exports = Container; /***/ }), -/* 188 */ +/* 190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38672,9 +39864,9 @@ module.exports = Container; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(129); +var BitmapText = __webpack_require__(132); var Class = __webpack_require__(0); -var Render = __webpack_require__(952); +var Render = __webpack_require__(957); /** * @classdesc @@ -38823,7 +40015,7 @@ var DynamicBitmapText = new Class({ * @param {number} width - The width of the crop. * @param {number} height - The height of the crop. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setSize: function (width, height) { @@ -38847,7 +40039,7 @@ var DynamicBitmapText = new Class({ * * @param {Phaser.Types.GameObjects.BitmapText.DisplayCallback} callback - The display callback to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setDisplayCallback: function (callback) { @@ -38864,7 +40056,7 @@ var DynamicBitmapText = new Class({ * * @param {number} value - The horizontal scroll position to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setScrollX: function (value) { @@ -38881,7 +40073,7 @@ var DynamicBitmapText = new Class({ * * @param {number} value - The vertical scroll position to set. * - * @return {Phaser.GameObjects.DynamicBitmapText} This Game Object. + * @return {this} This Game Object. */ setScrollY: function (value) { @@ -38896,7 +40088,7 @@ module.exports = DynamicBitmapText; /***/ }), -/* 189 */ +/* 191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -38907,24 +40099,24 @@ module.exports = DynamicBitmapText; var BaseCamera = __webpack_require__(91); var Class = __webpack_require__(0); -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 Commands = __webpack_require__(192); +var ComponentsAlpha = __webpack_require__(269); +var ComponentsBlendMode = __webpack_require__(272); +var ComponentsDepth = __webpack_require__(273); +var ComponentsMask = __webpack_require__(277); +var ComponentsPipeline = __webpack_require__(156); +var ComponentsTransform = __webpack_require__(282); +var ComponentsVisible = __webpack_require__(283); +var ComponentsScrollFactor = __webpack_require__(280); -var TransformMatrix = __webpack_require__(32); +var TransformMatrix = __webpack_require__(29); var Ellipse = __webpack_require__(95); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -var MATH_CONST = __webpack_require__(13); -var Render = __webpack_require__(958); +var MATH_CONST = __webpack_require__(15); +var Render = __webpack_require__(963); /** * @classdesc @@ -39144,7 +40336,7 @@ var Graphics = new Class({ * * @param {Phaser.Types.GameObjects.Graphics.Styles} options - The styles to set as defaults. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ setDefaultStyles: function (options) { @@ -39178,7 +40370,7 @@ var Graphics = new Class({ * @param {number} color - The stroke color. * @param {number} [alpha=1] - The stroke alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineStyle: function (lineWidth, color, alpha) { @@ -39203,7 +40395,7 @@ var Graphics = new Class({ * @param {number} color - The fill color. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillStyle: function (color, alpha) { @@ -39242,7 +40434,7 @@ var Graphics = new Class({ * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillGradientStyle: function (topLeft, topRight, bottomLeft, bottomRight, alpha) { @@ -39280,7 +40472,7 @@ var Graphics = new Class({ * @param {integer} bottomRight - The tint being applied to the bottom-right of the Game Object. * @param {number} [alpha=1] - The fill alpha. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineGradientStyle: function (lineWidth, topLeft, topRight, bottomLeft, bottomRight, alpha) { @@ -39356,7 +40548,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#beginPath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ beginPath: function () { @@ -39373,7 +40565,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#closePath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ closePath: function () { @@ -39390,7 +40582,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#fillPath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPath: function () { @@ -39410,7 +40602,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#fill * @since 3.16.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fill: function () { @@ -39427,7 +40619,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#strokePath * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokePath: function () { @@ -39447,7 +40639,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#stroke * @since 3.16.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ stroke: function () { @@ -39466,7 +40658,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Circle} circle - The circle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillCircleShape: function (circle) { @@ -39481,7 +40673,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Circle} circle - The circle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeCircleShape: function (circle) { @@ -39498,7 +40690,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the center of the circle. * @param {number} radius - The radius of the circle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillCircle: function (x, y, radius) { @@ -39519,7 +40711,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the center of the circle. * @param {number} radius - The radius of the circle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeCircle: function (x, y, radius) { @@ -39538,7 +40730,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Rectangle} rect - The rectangle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRectShape: function (rect) { @@ -39553,7 +40745,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Rectangle} rect - The rectangle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRectShape: function (rect) { @@ -39571,7 +40763,7 @@ var Graphics = new Class({ * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRect: function (x, y, width, height) { @@ -39594,7 +40786,7 @@ var Graphics = new Class({ * @param {number} width - The width of the rectangle. * @param {number} height - The height of the rectangle. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRect: function (x, y, width, height) { @@ -39637,7 +40829,7 @@ var Graphics = new Class({ * @param {number} height - The height of the rectangle. * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillRoundedRect: function (x, y, width, height, radius) { @@ -39683,7 +40875,7 @@ var Graphics = new Class({ * @param {number} height - The height of the rectangle. * @param {(Phaser.Types.GameObjects.Graphics.RoundedRectRadius|number)} [radius=20] - The corner radius; It can also be an object to specify different radii for corners. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeRoundedRect: function (x, y, width, height, radius) { @@ -39728,7 +40920,7 @@ var Graphics = new Class({ * @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - The point to fill. * @param {number} [size=1] - The size of the square to draw. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPointShape: function (point, size) { @@ -39747,7 +40939,7 @@ var Graphics = new Class({ * @param {number} y - The y coordinate of the point. * @param {number} [size=1] - The size of the square to draw. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPoint: function (x, y, size) { @@ -39777,7 +40969,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Triangle} triangle - The triangle to fill. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillTriangleShape: function (triangle) { @@ -39792,7 +40984,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Triangle} triangle - The triangle to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeTriangleShape: function (triangle) { @@ -39812,7 +41004,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the third point. * @param {number} y2 - The y coordinate of the third point. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillTriangle: function (x0, y0, x1, y1, x2, y2) { @@ -39837,7 +41029,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the third point. * @param {number} y2 - The y coordinate of the third point. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeTriangle: function (x0, y0, x1, y1, x2, y2) { @@ -39857,7 +41049,7 @@ var Graphics = new Class({ * * @param {Phaser.Geom.Line} line - The line to stroke. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeLineShape: function (line) { @@ -39875,7 +41067,7 @@ var Graphics = new Class({ * @param {number} x2 - The x coordinate of the end point of the line. * @param {number} y2 - The y coordinate of the end point of the line. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineBetween: function (x1, y1, x2, y2) { @@ -39898,7 +41090,7 @@ var Graphics = new Class({ * @param {number} x - The x coordinate to draw the line to. * @param {number} y - The y coordinate to draw the line to. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ lineTo: function (x, y) { @@ -39919,7 +41111,7 @@ var Graphics = new Class({ * @param {number} x - The x coordinate to move to. * @param {number} y - The y coordinate to move to. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ moveTo: function (x, y) { @@ -39946,7 +41138,7 @@ var Graphics = new Class({ * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked. * @param {integer} [endIndex] - The index of `points` to stop drawing at. Defaults to `points.length`. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokePoints: function (points, closeShape, closePath, endIndex) { @@ -39993,7 +41185,7 @@ var Graphics = new Class({ * @param {boolean} [closePath=false] - When `true`, the path is closed before being stroked. * @param {integer} [endIndex] - The index of `points` to stop at. Defaults to `points.length`. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillPoints: function (points, closeShape, closePath, endIndex) { @@ -40034,7 +41226,7 @@ var Graphics = new Class({ * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to stroke. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeEllipseShape: function (ellipse, smoothness) { @@ -40057,7 +41249,7 @@ var Graphics = new Class({ * @param {number} height - The height of the ellipse. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ strokeEllipse: function (x, y, width, height, smoothness) { @@ -40079,7 +41271,7 @@ var Graphics = new Class({ * @param {Phaser.Geom.Ellipse} ellipse - The ellipse to fill. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillEllipseShape: function (ellipse, smoothness) { @@ -40102,7 +41294,7 @@ var Graphics = new Class({ * @param {number} height - The height of the ellipse. * @param {integer} [smoothness=32] - The number of points to draw the ellipse with. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ fillEllipse: function (x, y, width, height, smoothness) { @@ -40141,7 +41333,7 @@ var Graphics = new Class({ * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise. * @param {number} [overshoot=0] - This value allows you to increase the segment iterations in WebGL rendering. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. Use small numbers such as 0.01 to start with and increase as needed. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ arc: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot) { @@ -40177,7 +41369,7 @@ var Graphics = new Class({ * @param {boolean} [anticlockwise=false] - Whether the drawing should be anticlockwise or clockwise. * @param {number} [overshoot=0] - This value allows you to overshoot the endAngle by this amount. Useful if the arc has a thick stroke and needs to overshoot to join-up cleanly. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ slice: function (x, y, radius, startAngle, endAngle, anticlockwise, overshoot) { @@ -40203,7 +41395,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#save * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ save: function () { @@ -40224,7 +41416,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#restore * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ restore: function () { @@ -40250,7 +41442,7 @@ var Graphics = new Class({ * @param {number} x - The horizontal translation to apply. * @param {number} y - The vertical translation to apply. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ translateCanvas: function (x, y) { @@ -40277,7 +41469,7 @@ var Graphics = new Class({ * @param {number} x - The horizontal scale to apply. * @param {number} y - The vertical scale to apply. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ scaleCanvas: function (x, y) { @@ -40303,7 +41495,7 @@ var Graphics = new Class({ * * @param {number} radians - The rotation angle, in radians. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ rotateCanvas: function (radians) { @@ -40321,7 +41513,7 @@ var Graphics = new Class({ * @method Phaser.GameObjects.Graphics#clear * @since 3.0.0 * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ clear: function () { @@ -40356,7 +41548,7 @@ var Graphics = new Class({ * @param {integer} [width] - The width of the graphics to generate. * @param {integer} [height] - The height of the graphics to generate. * - * @return {Phaser.GameObjects.Graphics} This Game Object. + * @return {this} This Game Object. */ generateTexture: function (key, width, height) { @@ -40446,7 +41638,7 @@ module.exports = Graphics; /***/ }), -/* 190 */ +/* 192 */ /***/ (function(module, exports) { /** @@ -40483,7 +41675,7 @@ module.exports = { /***/ }), -/* 191 */ +/* 193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40525,7 +41717,7 @@ module.exports = CircumferencePoint; /***/ }), -/* 192 */ +/* 194 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -40536,11 +41728,11 @@ module.exports = CircumferencePoint; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var GravityWell = __webpack_require__(394); -var List = __webpack_require__(126); -var ParticleEmitter = __webpack_require__(396); -var Render = __webpack_require__(968); +var GameObject = __webpack_require__(13); +var GravityWell = __webpack_require__(401); +var List = __webpack_require__(129); +var ParticleEmitter = __webpack_require__(403); +var Render = __webpack_require__(973); /** * @classdesc @@ -40690,7 +41882,7 @@ var ParticleEmitterManager = new Class({ * @param {string} key - The key of the texture to be used, as stored in the Texture Manager. * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setTexture: function (key, frame) { @@ -40711,7 +41903,7 @@ var ParticleEmitterManager = new Class({ * * @param {(string|integer)} [frame] - The name or index of the frame within the Texture. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setFrame: function (frame) { @@ -40742,7 +41934,7 @@ var ParticleEmitterManager = new Class({ * @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - The texture frames. * @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - The particle emitter to modify. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ setEmitterFrames: function (frames, emitter) { @@ -40862,7 +42054,7 @@ var ParticleEmitterManager = new Class({ * @param {number} [x] - The x-coordinate to to emit particles from. The default is the x-coordinate of the emitter's current location. * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ emitParticle: function (count, x, y) { @@ -40891,7 +42083,7 @@ var ParticleEmitterManager = new Class({ * @param {number} [y] - The y-coordinate to to emit particles from. The default is the y-coordinate of the emitter's current location. * @param {integer} [count] - The number of particles to release from each emitter. The default is the emitter's own {@link Phaser.GameObjects.Particles.ParticleEmitter#quantity}. * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ emitParticleAt: function (x, y, count) { @@ -40908,7 +42100,7 @@ var ParticleEmitterManager = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitterManager#pause * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ pause: function () { @@ -40923,7 +42115,7 @@ var ParticleEmitterManager = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitterManager#resume * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Emitter Manager. + * @return {this} This Emitter Manager. */ resume: function () { @@ -41014,7 +42206,7 @@ module.exports = ParticleEmitterManager; /***/ }), -/* 193 */ +/* 195 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -41028,12 +42220,12 @@ var Camera = __webpack_require__(91); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var CONST = __webpack_require__(29); +var CONST = __webpack_require__(33); var Frame = __webpack_require__(94); -var GameObject = __webpack_require__(14); -var Render = __webpack_require__(972); -var Utils = __webpack_require__(10); -var UUID = __webpack_require__(194); +var GameObject = __webpack_require__(13); +var Render = __webpack_require__(977); +var Utils = __webpack_require__(9); +var UUID = __webpack_require__(196); /** * @classdesc @@ -42253,7 +43445,7 @@ module.exports = RenderTexture; /***/ }), -/* 194 */ +/* 196 */ /***/ (function(module, exports) { /** @@ -42288,7 +43480,7 @@ module.exports = UUID; /***/ }), -/* 195 */ +/* 197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -42297,17 +43489,1130 @@ module.exports = UUID; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(120); +var Class = __webpack_require__(0); +var Components = __webpack_require__(12); +var GameObject = __webpack_require__(13); +var RopeRender = __webpack_require__(983); +var Vector2 = __webpack_require__(3); + +/** + * @classdesc + * A Rope Game Object. + * + * The Rope object is WebGL only and does not have a Canvas counterpart. + * + * A Rope is a special kind of Game Object that has a texture that repeats along its entire length. + * Unlike a Sprite, it isn't restricted to using just a quad and can have as many vertices as you define + * when creating it. The vertices can be arranged in a horizontal or vertical strip and have their own + * color and alpha values as well. + * + * A Ropes origin is always 0.5 x 0.5 and cannot be changed. + * + * @class Rope + * @extends Phaser.GameObjects.GameObject + * @memberof Phaser.GameObjects + * @constructor + * @webglOnly + * @since 3.23.0 + * + * @extends Phaser.GameObjects.Components.AlphaSingle + * @extends Phaser.GameObjects.Components.BlendMode + * @extends Phaser.GameObjects.Components.Depth + * @extends Phaser.GameObjects.Components.Flip + * @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=0] - The horizontal position of this Game Object in the world. + * @param {number} [y=0] - 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. If not given, `__DEFAULT` is used. + * @param {(string|integer|null)} [frame] - An optional frame from the Texture this Game Object is rendering with. + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. See `setPoints` to set this post-creation. + * @param {boolean} [horizontal=true] - Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)? + * @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.AlphaSingle, + Components.BlendMode, + Components.Depth, + Components.Flip, + Components.Mask, + Components.Pipeline, + Components.Size, + Components.Texture, + Components.Transform, + Components.Visible, + Components.ScrollFactor, + RopeRender + ], + + initialize: + + function Rope (scene, x, y, texture, frame, points, horizontal, colors, alphas) + { + if (texture === undefined) { texture = '__DEFAULT'; } + if (points === undefined) { points = 2; } + if (horizontal === undefined) { horizontal = true; } + + GameObject.call(this, scene, 'Rope'); + + /** + * The Animation Controller of this Rope. + * + * @name Phaser.GameObjects.Rope#anims + * @type {Phaser.GameObjects.Components.Animation} + * @since 3.23.0 + */ + this.anims = new Components.Animation(this); + + /** + * 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.Types.Math.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; + + /** + * The tint fill mode. + * + * 0 = An additive tint (the default), where vertices colors are blended with the texture. + * 1 = A fill tint, where the vertices colors replace the texture, but respects texture alpha. + * 2 = A complete tint, where the vertices colors replace the texture, including alpha, entirely. + * + * @name Phaser.GameObjects.Rope#tintFill + * @type {integer} + * @since 3.23.0 + */ + this.tintFill = (texture === '__DEFAULT') ? 2 : 0; + + /** + * 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; + + /** + * Are the Rope vertices aligned horizontally, in a strip, or vertically, in a column? + * + * This property is set during instantiation and cannot be changed directly. + * See the `setVertical` and `setHorizontal` methods. + * + * @name Phaser.GameObjects.Rope#horizontal + * @type {boolean} + * @readonly + * @since 3.23.0 + */ + this.horizontal = horizontal; + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#_flipX + * @type {boolean} + * @default false + * @private + * @since 3.23.0 + */ + this._flipX = false; + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipY + * @type {boolean} + * @default false + * @private + * @since 3.23.0 + */ + this._flipY = 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(); + + /** + * You can optionally choose to render the vertices of this Rope to a Graphics instance. + * + * Achieve this by setting the `debugCallback` and the `debugGraphic` properties. + * + * You can do this in a single call via the `Rope.setDebug` method, which will use the + * built-in debug function. You can also set it to your own callback. The callback + * will be invoked _once per render_ and sent the following parameters: + * + * `debugCallback(src, meshLength, verts)` + * + * `src` is the Rope instance being debugged. + * `meshLength` is the number of mesh vertices in total. + * `verts` is an array of the translated vertex coordinates. + * + * To disable rendering, set this property back to `null`. + * + * @name Phaser.GameObjects.Rope#debugCallback + * @type {function} + * @since 3.23.0 + */ + this.debugCallback = null; + + /** + * The Graphics instance that the debug vertices will be drawn to, if `setDebug` has + * been called. + * + * @name Phaser.GameObjects.Rope#debugGraphic + * @type {Phaser.GameObjects.Graphics} + * @since 3.23.0 + */ + this.debugGraphic = null; + + this.setTexture(texture, frame); + this.setPosition(x, y); + this.setSizeToFrame(); + this.initPipeline('TextureTintStripPipeline'); + + if (Array.isArray(points)) + { + this.resizeArrays(points.length); + } + + this.setPoints(points, colors, alphas); + + this.updateVertices(); + }, + + /** + * The Rope update loop. + * + * @method Phaser.GameObjects.Rope#preUpdate + * @protected + * @since 3.23.0 + * + * @param {number} time - The current timestamp. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + preUpdate: function (time, delta) + { + var prevFrame = this.anims.currentFrame; + + this.anims.update(time, delta); + + if (this.anims.currentFrame !== prevFrame) + { + this.updateUVs(); + this.updateVertices(); + } + }, + + /** + * Start playing the given animation. + * + * @method Phaser.GameObjects.Rope#play + * @since 3.23.0 + * + * @param {string} key - The string-based key of the animation to play. + * @param {boolean} [ignoreIfPlaying=false] - If an animation is already playing then ignore this call. + * @param {integer} [startFrame=0] - Optionally start the animation playing from this frame index. + * + * @return {this} This Game Object. + */ + play: function (key, ignoreIfPlaying, startFrame) + { + this.anims.play(key, ignoreIfPlaying, startFrame); + + return this; + }, + + /** + * 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; + }, + + /** + * Sets the alignment of the points in this Rope to be horizontal, in a strip format. + * + * Calling this method will reset this Rope. The current points, vertices, colors and alpha + * values will be reset to thoes values given as parameters. + * + * @method Phaser.GameObjects.Rope#setHorizontal + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. + * @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. + */ + setHorizontal: function (points, colors, alphas) + { + if (points === undefined) { points = this.points.length; } + + if (this.horizontal) + { + return this; + } + + this.horizontal = true; + + return this.setPoints(points, colors, alphas); + }, + + /** + * Sets the alignment of the points in this Rope to be vertical, in a column format. + * + * Calling this method will reset this Rope. The current points, vertices, colors and alpha + * values will be reset to thoes values given as parameters. + * + * @method Phaser.GameObjects.Rope#setVertical + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided the current points length is used. + * @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. + */ + setVertical: function (points, colors, alphas) + { + if (points === undefined) { points = this.points.length; } + + if (!this.horizontal) + { + return this; + } + + this.horizontal = false; + + return this.setPoints(points, colors, alphas); + }, + + /** + * Sets the tint fill mode. + * + * Mode 0 is an additive tint, the default, which blends the vertices colors with the texture. + * This mode respects the texture alpha. + * + * Mode 1 is a fill 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. This mode respects the texture alpha. + * + * Mode 2 is a complete tint. The texture colors and alpha are replaced entirely by the vertices colors. + * + * See the `setColors` method for details of how to color each of the vertices. + * + * @method Phaser.GameObjects.Rope#setTintFill + * @webglOnly + * @since 3.23.0 + * + * @param {integer} [value=0] - Set to 0 for an Additive tint, 1 for a fill tint with alpha, or 2 for a fill tint without alpha. + * + * @return {this} This Game Object instance. + */ + setTintFill: function (value) + { + if (value === undefined) { value = 0; } + + this.tintFill = value; + + 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`. + * + * @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: + * + * * One single numeric value: `setColors(0xff0000)` - This will set a single color tint for the whole Rope. + * * 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 } + * ]); + * ``` + * + * Or, you can provide an integer to do the same thing: + * + * ```javascript + * rope.setPoints(4); + * ``` + * + * Which will divide the Rope into 4 equally sized segments based on the frame width. + * + * 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. + * + * @method Phaser.GameObjects.Rope#setPoints + * @since 3.23.0 + * + * @param {(integer|Phaser.Types.Math.Vector2Like[])} [points=2] - An array containing the vertices data for this Rope, or a number that indicates how many segments to split the texture frame into. If none is provided a simple quad is created. + * @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) + { + if (points === undefined) { points = 2; } + + if (typeof points === 'number') + { + // Generate an array based on the points + var segments = points; + + if (segments < 2) + { + segments = 2; + } + + points = []; + + var s; + var frameSegment; + var offset; + + if (this.horizontal) + { + offset = -(this.frame.halfWidth); + frameSegment = this.frame.width / (segments - 1); + + for (s = 0; s < segments; s++) + { + points.push({ x: offset + s * frameSegment, y: 0 }); + } + } + else + { + offset = -(this.frame.halfHeight); + frameSegment = this.frame.height / (segments - 1); + + for (s = 0; s < segments; s++) + { + points.push({ x: 0, y: offset + s * frameSegment }); + } + } + } + + var total = points.length; + var currentTotal = this.points.length; + + if (total < 1) + { + console.warn('Rope: Not enough points given'); + + return this; + } + else if (total === 1) + { + points.unshift({ x: 0, y: 0 }); + total++; + } + + if (currentTotal !== total) + { + this.resizeArrays(total); + } + + this.points = points; + + this.updateUVs(); + + if (colors !== undefined && colors !== null) + { + this.setColors(colors); + } + + if (alphas !== undefined && alphas !== null) + { + this.setAlphas(alphas); + } + + return this; + }, + + /** + * Updates all of the UVs based on the Rope.points and `flipX` and `flipY` settings. + * + * @method Phaser.GameObjects.Rope#updateUVs + * @since 3.23.0 + * + * @return {this} This Game Object instance. + */ + updateUVs: function () + { + var currentUVs = this.uv; + var total = this.points.length; + + var u0 = this.frame.u0; + var v0 = this.frame.v0; + var u1 = this.frame.u1; + var v1 = this.frame.v1; + + var partH = (u1 - u0) / (total - 1); + var partV = (v1 - v0) / (total - 1); + + for (var i = 0; i < total; i++) + { + var index = i * 4; + + var uv0; + var uv1; + var uv2; + var uv3; + + if (this.horizontal) + { + if (this._flipX) + { + uv0 = u1 - (i * partH); + uv2 = u1 - (i * partH); + } + else + { + uv0 = u0 + (i * partH); + uv2 = u0 + (i * partH); + } + + if (this._flipY) + { + uv1 = v1; + uv3 = v0; + } + else + { + uv1 = v0; + uv3 = v1; + } + } + else + { + if (this._flipX) + { + uv0 = u0; + uv2 = u1; + } + else + { + uv0 = u1; + uv2 = u0; + } + + if (this._flipY) + { + uv1 = v1 - (i * partV); + uv3 = v1 - (i * partV); + } + else + { + uv1 = v0 + (i * partV); + uv3 = v0 + (i * partV); + } + } + + currentUVs[index + 0] = uv0; + currentUVs[index + 1] = uv1; + currentUVs[index + 2] = uv2; + currentUVs[index + 3] = uv3; + } + + 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 nextPoint; + var lastPoint = points[0]; + + var frameSize = (this.horizontal) ? this.frame.halfHeight : this.frame.halfWidth; + + 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 perpLength = perp.length(); + + perp.x /= perpLength; + perp.y /= perpLength; + + perp.x *= frameSize; + perp.y *= frameSize; + + 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; + }, + + /** + * This method enables rendering of the Rope vertices to the given Graphics instance. + * + * If you enable this feature, you must call `Graphics.clear()` in your Scene `update`, + * otherwise the Graphics instance will fill-in with draw calls. This is not done automatically + * to allow for you to debug render multiple Rope objects to a single Graphics instance. + * + * The Rope class has a built-in debug rendering callback `Rope.renderDebugVerts`, however + * you can also provide your own callback to be used instead. Do this by setting the `callback` parameter. + * + * The callback is invoked _once per render_ and sent the following parameters: + * + * `callback(src, meshLength, verts)` + * + * `src` is the Rope instance being debugged. + * `meshLength` is the number of mesh vertices in total. + * `verts` is an array of the translated vertex coordinates. + * + * If using your own callback you do not have to provide a Graphics instance to this method. + * + * To disable debug rendering, to either your own callback or the built-in one, call this method + * with no arguments. + * + * @method Phaser.GameObjects.Rope#setDebug + * @since 3.23.0 + * + * @param {Phaser.GameObjects.Graphics} [graphic] - The Graphic instance to render to if using the built-in callback. + * @param {function} [callback] - The callback to invoke during debug render. Leave as undefined to use the built-in callback. + * + * @return {this} This Game Object instance. + */ + setDebug: function (graphic, callback) + { + this.debugGraphic = graphic; + + if (!graphic && !callback) + { + this.debugCallback = null; + } + else if (!callback) + { + this.debugCallback = this.renderDebugVerts; + } + else + { + this.debugCallback = callback; + } + + return this; + }, + + /** + * The built-in Rope vertices debug rendering method. + * + * See `Rope.setDebug` for more details. + * + * @method Phaser.GameObjects.Rope#renderDebugVerts + * @since 3.23.0 + * + * @param {Phaser.GameObjects.Rope} src - The Rope object being rendered. + * @param {integer} meshLength - The number of vertices in the mesh. + * @param {number[]} verts - An array of translated vertex coordinates. + */ + renderDebugVerts: function (src, meshLength, verts) + { + var graphic = src.debugGraphic; + + var px0 = verts[0]; + var py0 = verts[1]; + var px1 = verts[2]; + var py1 = verts[3]; + + graphic.lineBetween(px0, py0, px1, py1); + + for (var i = 4; i < meshLength; i += 4) + { + var x0 = verts[i + 0]; + var y0 = verts[i + 1]; + var x1 = verts[i + 2]; + var y1 = verts[i + 3]; + + graphic.lineBetween(px0, py0, x0, y0); + graphic.lineBetween(px1, py1, x1, y1); + graphic.lineBetween(px1, py1, x0, y0); + graphic.lineBetween(x0, y0, x1, y1); + + px0 = x0; + py0 = y0; + px1 = x1; + py1 = y1; + } + }, + + /** + * Handles the pre-destroy step for the Rope, which removes the Animation component and typed arrays. + * + * @method Phaser.GameObjects.Rope#preDestroy + * @private + * @since 3.23.0 + */ + preDestroy: function () + { + this.anims.destroy(); + + this.anims = undefined; + + this.points = null; + this.vertices = null; + this.uv = null; + this.colors = null; + this.alphas = null; + + this.debugCallback = null; + this.debugGraphic = null; + }, + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipX + * @type {boolean} + * @default false + * @since 3.23.0 + */ + flipX: { + + get: function () + { + return this._flipX; + }, + + set: function (value) + { + this._flipX = value; + + return this.updateUVs(); + } + + }, + + /** + * 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. + * + * @name Phaser.GameObjects.Rope#flipY + * @type {boolean} + * @default false + * @since 3.23.0 + */ + flipY: { + + get: function () + { + return this._flipY; + }, + + set: function (value) + { + this._flipY = value; + + return this.updateUVs(); + } + + } + +}); + +module.exports = Rope; + + +/***/ }), +/* 198 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var AddToDOM = __webpack_require__(122); 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__(978); +var GameEvents = __webpack_require__(20); +var GameObject = __webpack_require__(13); +var GetTextSize = __webpack_require__(986); var GetValue = __webpack_require__(6); -var RemoveFromDOM = __webpack_require__(176); -var TextRender = __webpack_require__(979); -var TextStyle = __webpack_require__(982); +var RemoveFromDOM = __webpack_require__(178); +var TextRender = __webpack_require__(987); +var TextStyle = __webpack_require__(990); /** * @classdesc @@ -42320,20 +44625,17 @@ var TextStyle = __webpack_require__(982); * 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. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes, either - * when creating the Text object, or when setting the font via `setFont` or `setFontFamily`. I.e.: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters, either when creating the Text object, or when setting the font via `setFont` + * or `setFontFamily`, e.g.: + * * ```javascript - * this.add.text(0, 0, 'Hello World', { fontFamily: '"Roboto Condensed"' }); + * this.add.text(0, 0, 'Hello World', { fontFamily: 'Georgia, "Goudy Bookletter 1911", Times, serif' }); * ``` - * - * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all - * quoted properly, too: - * + * * ```javascript - * this.add.text(0, 0, 'Hello World', { fontFamily: 'Verdana, "Times New Roman", Tahoma, serif' }); + * this.add.text(0, 0, 'Hello World', { font: '"Press Start 2P"' }); * ``` * * You can only display fonts that are currently loaded and available to the browser: therefore fonts must @@ -42375,6 +44677,8 @@ var TextStyle = __webpack_require__(982); * @param {number} y - The vertical position of this Game Object in the world. * @param {(string|string[])} text - The text this Text object will display. * @param {Phaser.Types.GameObjects.Text.TextStyle} style - The text style configuration object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ var Text = new Class({ @@ -42881,7 +45185,7 @@ var Text = new Class({ * * @param {(string|string[])} value - The string, or array of strings, to be set as the content of this Text object. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setText: function (value) { @@ -42922,7 +45226,7 @@ var Text = new Class({ * * @param {object} style - The style settings to set. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setStyle: function (style) { @@ -42936,19 +45240,19 @@ var Text = new Class({ * * If an object is given, the `fontFamily`, `fontSize` and `fontStyle` * properties of that object are set. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters: + * * ```javascript - * Text.setFont('"Roboto Condensed"'); + * Text.setFont('"Press Start 2P"'); * ``` - * + * * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all * quoted properly, too: - * + * * ```javascript - * Text.setFont('Verdana, "Times New Roman", Tahoma, serif'); + * Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif'); * ``` * * @method Phaser.GameObjects.Text#setFont @@ -42956,7 +45260,9 @@ var Text = new Class({ * * @param {string} font - The font family or font settings to set. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ setFont: function (font) { @@ -42965,19 +45271,19 @@ var Text = new Class({ /** * Set the font family. - * - * **Important:** If the font you wish to use has a space or digit in its name, such as - * 'Press Start 2P' or 'Roboto Condensed', then you _must_ put the font name in quotes: - * + * + * **Important:** The font name must be quoted if it contains certain combinations of digits or + * special characters: + * * ```javascript - * Text.setFont('"Roboto Condensed"'); + * Text.setFont('"Press Start 2P"'); * ``` * * Equally, if you wish to provide a list of fallback fonts, then you should ensure they are all * quoted properly, too: * * ```javascript - * Text.setFont('Verdana, "Times New Roman", Tahoma, serif'); + * Text.setFont('Georgia, "Goudy Bookletter 1911", Times, serif'); * ``` * * @method Phaser.GameObjects.Text#setFontFamily @@ -42985,7 +45291,9 @@ var Text = new Class({ * * @param {string} family - The font family. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. + * + * @see https://developer.mozilla.org/en-US/docs/Web/CSS/font-family#Valid_family_names */ setFontFamily: function (family) { @@ -43000,7 +45308,7 @@ var Text = new Class({ * * @param {number} size - The font size. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFontSize: function (size) { @@ -43015,7 +45323,7 @@ var Text = new Class({ * * @param {string} style - The font style. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFontStyle: function (style) { @@ -43033,7 +45341,7 @@ var Text = new Class({ * @param {number} width - The fixed width to set. `0` disables fixed width. * @param {number} height - The fixed height to set. `0` disables fixed height. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFixedSize: function (width, height) { @@ -43048,7 +45356,7 @@ var Text = new Class({ * * @param {string} color - The background color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setBackgroundColor: function (color) { @@ -43068,7 +45376,7 @@ var Text = new Class({ * * @param {(string|any)} color - The text fill style. Can be any valid CanvasRenderingContext `fillStyle` value. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setFill: function (fillStyle) { @@ -43083,7 +45391,7 @@ var Text = new Class({ * * @param {string} color - The text fill color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setColor: function (color) { @@ -43099,7 +45407,7 @@ var Text = new Class({ * @param {string} color - The stroke color. * @param {number} thickness - The stroke thickness. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setStroke: function (color, thickness) { @@ -43119,7 +45427,7 @@ var Text = new Class({ * @param {boolean} [shadowStroke=false] - Whether to stroke the shadow. * @param {boolean} [shadowFill=true] - Whether to fill the shadow. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadow: function (x, y, color, blur, shadowStroke, shadowFill) { @@ -43135,7 +45443,7 @@ var Text = new Class({ * @param {number} x - The horizontal shadow offset. * @param {number} y - The vertical shadow offset. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowOffset: function (x, y) { @@ -43150,7 +45458,7 @@ var Text = new Class({ * * @param {string} color - The shadow color. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowColor: function (color) { @@ -43165,7 +45473,7 @@ var Text = new Class({ * * @param {number} blur - The shadow blur radius. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowBlur: function (blur) { @@ -43180,7 +45488,7 @@ var Text = new Class({ * * @param {boolean} enabled - Whether shadow stroke is enabled or not. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowStroke: function (enabled) { @@ -43195,7 +45503,7 @@ var Text = new Class({ * * @param {boolean} enabled - Whether shadow fill is enabled or not. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setShadowFill: function (enabled) { @@ -43213,7 +45521,7 @@ var Text = new Class({ * algorithm. If true, spaces are collapsed and whitespace is trimmed from lines. If false, * spaces and whitespace are left as is. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setWordWrapWidth: function (width, useAdvancedWrap) { @@ -43232,7 +45540,7 @@ var Text = new Class({ * newline characters in place to indicate where breaks should happen. * @param {object} [scope=null] - The scope that will be applied when the callback is invoked. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setWordWrapCallback: function (callback, scope) { @@ -43251,7 +45559,7 @@ var Text = new Class({ * * @param {string} [align='left'] - The text alignment for multi-line text. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setAlign: function (align) { @@ -43274,7 +45582,7 @@ var Text = new Class({ * * @param {number} value - The resolution for this Text object to use. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setResolution: function (value) { @@ -43292,7 +45600,7 @@ var Text = new Class({ * * @param {number} value - The amount to add to the font height to achieve the overall line height. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setLineSpacing: function (value) { @@ -43316,7 +45624,7 @@ var Text = new Class({ * @param {number} right - The right padding value. * @param {number} bottom - The bottom padding value. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setPadding: function (left, top, right, bottom) { @@ -43375,7 +45683,7 @@ var Text = new Class({ * * @param {integer} [max=0] - The maximum number of lines to draw. * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ setMaxLines: function (max) { @@ -43388,7 +45696,7 @@ var Text = new Class({ * @method Phaser.GameObjects.Text#updateText * @since 3.0.0 * - * @return {Phaser.GameObjects.Text} This Text object. + * @return {this} This Text object. */ updateText: function () { @@ -43563,7 +45871,7 @@ var Text = new Class({ context.restore(); - if (this.renderer.gl) + if (this.renderer && this.renderer.gl) { this.frame.source.glTexture = this.renderer.canvasToTexture(canvas, this.frame.source.glTexture, true); @@ -43697,7 +46005,7 @@ module.exports = Text; /***/ }), -/* 196 */ +/* 199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -43709,11 +46017,11 @@ module.exports = Text; 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 GetPowerOfTwo = __webpack_require__(324); -var Smoothing = __webpack_require__(164); -var TileSpriteRender = __webpack_require__(984); +var GameEvents = __webpack_require__(20); +var GameObject = __webpack_require__(13); +var GetPowerOfTwo = __webpack_require__(328); +var Smoothing = __webpack_require__(167); +var TileSpriteRender = __webpack_require__(992); var Vector2 = __webpack_require__(3); // bitmask flag for GameObject.renderMask @@ -44349,7 +46657,7 @@ module.exports = TileSprite; /***/ }), -/* 197 */ +/* 200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -44359,15 +46667,15 @@ module.exports = TileSprite; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Components = __webpack_require__(12); var Events = __webpack_require__(90); -var GameEvents = __webpack_require__(18); -var GameObject = __webpack_require__(14); +var GameEvents = __webpack_require__(20); +var GameObject = __webpack_require__(13); var SoundEvents = __webpack_require__(59); -var UUID = __webpack_require__(194); -var VideoRender = __webpack_require__(987); -var MATH_CONST = __webpack_require__(13); +var UUID = __webpack_require__(196); +var VideoRender = __webpack_require__(995); +var MATH_CONST = __webpack_require__(15); /** * @classdesc @@ -46118,7 +48426,7 @@ module.exports = Video; /***/ }), -/* 198 */ +/* 201 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46128,9 +48436,9 @@ module.exports = Video; */ var Class = __webpack_require__(0); -var Contains = __webpack_require__(199); -var GetPoints = __webpack_require__(411); -var GEOM_CONST = __webpack_require__(46); +var Contains = __webpack_require__(202); +var GetPoints = __webpack_require__(418); +var GEOM_CONST = __webpack_require__(47); /** * @classdesc @@ -46230,7 +48538,7 @@ var Polygon = new Class({ * * @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats. * - * @return {Phaser.Geom.Polygon} This Polygon object. + * @return {this} This Polygon object. */ setTo: function (points) { @@ -46352,7 +48660,7 @@ module.exports = Polygon; /***/ }), -/* 199 */ +/* 202 */ /***/ (function(module, exports) { /** @@ -46401,7 +48709,7 @@ module.exports = Contains; /***/ }), -/* 200 */ +/* 203 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -46411,7 +48719,7 @@ module.exports = Contains; */ var Class = __webpack_require__(0); -var Mesh = __webpack_require__(130); +var Mesh = __webpack_require__(134); /** * @classdesc @@ -46905,7 +49213,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setTopLeft: function (x, y) { @@ -46924,7 +49232,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setTopRight: function (x, y) { @@ -46943,7 +49251,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setBottomLeft: function (x, y) { @@ -46962,7 +49270,7 @@ var Quad = new Class({ * @param {number} x - The horizontal coordinate of the vertex. * @param {number} y - The vertical coordinate of the vertex. * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ setBottomRight: function (x, y) { @@ -46978,7 +49286,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetPosition * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetPosition: function () { @@ -47001,7 +49309,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetAlpha * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetAlpha: function () { @@ -47023,7 +49331,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#resetColors * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ resetColors: function () { @@ -47045,7 +49353,7 @@ var Quad = new Class({ * @method Phaser.GameObjects.Quad#reset * @since 3.0.0 * - * @return {Phaser.GameObjects.Quad} This Game Object. + * @return {this} This Game Object. */ reset: function () { @@ -47062,7 +49370,7 @@ module.exports = Quad; /***/ }), -/* 201 */ +/* 204 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -47073,12 +49381,12 @@ module.exports = Quad; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); +var GameObject = __webpack_require__(13); var GetFastValue = __webpack_require__(2); -var Extend = __webpack_require__(17); -var SetValue = __webpack_require__(419); -var ShaderRender = __webpack_require__(1068); -var TransformMatrix = __webpack_require__(32); +var Extend = __webpack_require__(18); +var SetValue = __webpack_require__(426); +var ShaderRender = __webpack_require__(1078); +var TransformMatrix = __webpack_require__(29); /** * @classdesc @@ -48285,7 +50593,7 @@ module.exports = Shader; /***/ }), -/* 202 */ +/* 205 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48316,7 +50624,7 @@ module.exports = CircleToCircle; /***/ }), -/* 203 */ +/* 206 */ /***/ (function(module, exports) { /** @@ -48370,7 +50678,7 @@ module.exports = CircleToRectangle; /***/ }), -/* 204 */ +/* 207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48381,7 +50689,7 @@ module.exports = CircleToRectangle; */ var Point = __webpack_require__(4); -var LineToCircle = __webpack_require__(205); +var LineToCircle = __webpack_require__(208); /** * Checks for intersection between the line segment and circle, @@ -48462,7 +50770,7 @@ module.exports = GetLineToCircle; /***/ }), -/* 205 */ +/* 208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48546,7 +50854,7 @@ module.exports = LineToCircle; /***/ }), -/* 206 */ +/* 209 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48558,7 +50866,7 @@ module.exports = LineToCircle; var Point = __webpack_require__(4); var LineToLine = __webpack_require__(84); -var LineToRectangle = __webpack_require__(424); +var LineToRectangle = __webpack_require__(431); /** * Checks for intersection between the Line and a Rectangle shape, @@ -48606,7 +50914,7 @@ module.exports = GetLineToRectangle; /***/ }), -/* 207 */ +/* 210 */ /***/ (function(module, exports) { /** @@ -48693,7 +51001,7 @@ module.exports = ContainsArray; /***/ }), -/* 208 */ +/* 211 */ /***/ (function(module, exports) { /** @@ -48741,7 +51049,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 209 */ +/* 212 */ /***/ (function(module, exports) { /** @@ -48769,7 +51077,7 @@ module.exports = GetAspectRatio; /***/ }), -/* 210 */ +/* 213 */ /***/ (function(module, exports) { /** @@ -48823,7 +51131,7 @@ module.exports = RotateAroundXY; /***/ }), -/* 211 */ +/* 214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48838,18 +51146,18 @@ module.exports = RotateAroundXY; module.exports = { - 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) + BUTTON_DOWN: __webpack_require__(1201), + BUTTON_UP: __webpack_require__(1202), + CONNECTED: __webpack_require__(1203), + DISCONNECTED: __webpack_require__(1204), + GAMEPAD_BUTTON_DOWN: __webpack_require__(1205), + GAMEPAD_BUTTON_UP: __webpack_require__(1206) }; /***/ }), -/* 212 */ +/* 215 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48858,8 +51166,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); -var XHRSettings = __webpack_require__(135); +var Extend = __webpack_require__(18); +var XHRSettings = __webpack_require__(139); /** * Takes two XHRSettings Objects and creates a new XHRSettings object from them. @@ -48897,7 +51205,7 @@ module.exports = MergeXHRSettings; /***/ }), -/* 213 */ +/* 216 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -48907,12 +51215,12 @@ module.exports = MergeXHRSettings; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var ParseXML = __webpack_require__(358); +var ParseXML = __webpack_require__(363); /** * @classdesc @@ -49051,14 +51359,14 @@ var XMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#xml - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.XMLFileConfig|Phaser.Types.Loader.FileTypes.XMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('xml', function (key, url, xhrSettings) { @@ -49082,7 +51390,7 @@ module.exports = XMLFile; /***/ }), -/* 214 */ +/* 217 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49097,24 +51405,24 @@ module.exports = XMLFile; module.exports = { - 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) + Acceleration: __webpack_require__(1261), + Angular: __webpack_require__(1262), + Bounce: __webpack_require__(1263), + Debug: __webpack_require__(1264), + Drag: __webpack_require__(1265), + Enable: __webpack_require__(1266), + Friction: __webpack_require__(1267), + Gravity: __webpack_require__(1268), + Immovable: __webpack_require__(1269), + Mass: __webpack_require__(1270), + Size: __webpack_require__(1271), + Velocity: __webpack_require__(1272) }; /***/ }), -/* 215 */ +/* 218 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49129,20 +51437,20 @@ module.exports = { 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) + COLLIDE: __webpack_require__(1274), + OVERLAP: __webpack_require__(1275), + PAUSE: __webpack_require__(1276), + RESUME: __webpack_require__(1277), + TILE_COLLIDE: __webpack_require__(1278), + TILE_OVERLAP: __webpack_require__(1279), + WORLD_BOUNDS: __webpack_require__(1280), + WORLD_STEP: __webpack_require__(1281) }; /***/ }), -/* 216 */ +/* 219 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49160,11 +51468,11 @@ var Constraint = {}; module.exports = Constraint; var Vertices = __webpack_require__(86); -var Vector = __webpack_require__(101); -var Sleeping = __webpack_require__(236); -var Bounds = __webpack_require__(102); -var Axes = __webpack_require__(507); -var Common = __webpack_require__(37); +var Vector = __webpack_require__(99); +var Sleeping = __webpack_require__(239); +var Bounds = __webpack_require__(100); +var Axes = __webpack_require__(512); +var Common = __webpack_require__(38); (function() { @@ -49631,7 +51939,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 217 */ +/* 220 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49640,7 +51948,7 @@ var Common = __webpack_require__(37); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(138); +var GetTileAt = __webpack_require__(142); /** * Calculates interesting faces at the given tile coordinates of the specified layer. Interesting @@ -49707,7 +52015,7 @@ module.exports = CalculateFacesAt; /***/ }), -/* 218 */ +/* 221 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49717,8 +52025,8 @@ module.exports = CalculateFacesAt; */ var Tile = __webpack_require__(74); -var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(217); +var IsInLayerBounds = __webpack_require__(101); +var CalculateFacesAt = __webpack_require__(220); var SetTileCollision = __webpack_require__(73); /** @@ -49787,7 +52095,7 @@ module.exports = PutTileAt; /***/ }), -/* 219 */ +/* 222 */ /***/ (function(module, exports) { /** @@ -49826,7 +52134,7 @@ module.exports = SetLayerCollisionIndex; /***/ }), -/* 220 */ +/* 223 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -49835,9 +52143,9 @@ module.exports = SetLayerCollisionIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var LayerData = __webpack_require__(104); -var MapData = __webpack_require__(105); +var Formats = __webpack_require__(32); +var LayerData = __webpack_require__(102); +var MapData = __webpack_require__(103); var Tile = __webpack_require__(74); /** @@ -49857,7 +52165,7 @@ var Tile = __webpack_require__(74); * consumption. However if your map is small or you need to update the tiles dynamically, then leave * the default value set. * - * @return {Phaser.Tilemaps.MapData} [description] + * @return {Phaser.Tilemaps.MapData} The MapData object. */ var Parse2DArray = function (name, data, tileWidth, tileHeight, insertNull) { @@ -49918,7 +52226,7 @@ module.exports = Parse2DArray; /***/ }), -/* 221 */ +/* 224 */ /***/ (function(module, exports) { /** @@ -49938,9 +52246,9 @@ var FLIPPED_ANTI_DIAGONAL = 0x20000000; // Top-right is swapped with bottom-left * @function Phaser.Tilemaps.Parsers.Tiled.ParseGID * @since 3.0.0 * - * @param {number} gid - [description] + * @param {number} gid - A Tiled GID. * - * @return {object} [description] + * @return {Phaser.Types.Tilemaps.GIDData} The GID Data. */ var ParseGID = function (gid) { @@ -50008,7 +52316,7 @@ module.exports = ParseGID; /***/ }), -/* 222 */ +/* 225 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50069,7 +52377,7 @@ module.exports = CreateGroupLayer; /***/ }), -/* 223 */ +/* 226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50078,8 +52386,8 @@ module.exports = CreateGroupLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pick = __webpack_require__(480); -var ParseGID = __webpack_require__(221); +var Pick = __webpack_require__(485); +var ParseGID = __webpack_require__(224); var copyPoints = function (p) { return { x: p.x, y: p.y }; }; @@ -50127,21 +52435,19 @@ var ParseObject = function (tiledObject, offsetX, offsetY) else if (tiledObject.ellipse) { parsedObject.ellipse = tiledObject.ellipse; - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; } else if (tiledObject.text) { - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; parsedObject.text = tiledObject.text; } + else if (tiledObject.point) + { + parsedObject.point = true; + } else { // Otherwise, assume it is a rectangle parsedObject.rectangle = true; - parsedObject.width = tiledObject.width; - parsedObject.height = tiledObject.height; } return parsedObject; @@ -50151,7 +52457,7 @@ module.exports = ParseObject; /***/ }), -/* 224 */ +/* 227 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50160,10 +52466,10 @@ module.exports = ParseObject; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var MapData = __webpack_require__(105); -var Parse = __webpack_require__(472); -var Tilemap = __webpack_require__(488); +var Formats = __webpack_require__(32); +var MapData = __webpack_require__(103); +var Parse = __webpack_require__(477); +var Tilemap = __webpack_require__(493); /** * Create a Tilemap from the given key or data. If neither is given, make a blank Tilemap. When @@ -50237,7 +52543,7 @@ module.exports = ParseToTilemap; /***/ }), -/* 225 */ +/* 228 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50286,7 +52592,7 @@ module.exports = GetTargets; /***/ }), -/* 226 */ +/* 229 */ /***/ (function(module, exports) { /** @@ -50554,7 +52860,7 @@ module.exports = GetValueOp; /***/ }), -/* 227 */ +/* 230 */ /***/ (function(module, exports) { /** @@ -50598,7 +52904,7 @@ module.exports = TWEEN_DEFAULTS; /***/ }), -/* 228 */ +/* 231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -50608,12 +52914,12 @@ module.exports = TWEEN_DEFAULTS; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(229); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(232); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var TWEEN_CONST = __webpack_require__(89); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * @classdesc @@ -52242,7 +54548,7 @@ module.exports = Tween; /***/ }), -/* 229 */ +/* 232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52257,25 +54563,25 @@ module.exports = Tween; module.exports = { - 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) + TIMELINE_COMPLETE: __webpack_require__(1356), + TIMELINE_LOOP: __webpack_require__(1357), + TIMELINE_PAUSE: __webpack_require__(1358), + TIMELINE_RESUME: __webpack_require__(1359), + TIMELINE_START: __webpack_require__(1360), + TIMELINE_UPDATE: __webpack_require__(1361), + TWEEN_ACTIVE: __webpack_require__(1362), + TWEEN_COMPLETE: __webpack_require__(1363), + TWEEN_LOOP: __webpack_require__(1364), + TWEEN_REPEAT: __webpack_require__(1365), + TWEEN_START: __webpack_require__(1366), + TWEEN_UPDATE: __webpack_require__(1367), + TWEEN_YOYO: __webpack_require__(1368) }; /***/ }), -/* 230 */ +/* 233 */ /***/ (function(module, exports) { /** @@ -52402,7 +54708,7 @@ module.exports = TweenData; /***/ }), -/* 231 */ +/* 234 */ /***/ (function(module, exports) { /** @@ -52456,7 +54762,7 @@ module.exports = ScaleModes; /***/ }), -/* 232 */ +/* 235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52488,7 +54794,7 @@ module.exports = Wrap; /***/ }), -/* 233 */ +/* 236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -52520,776 +54826,7 @@ module.exports = WrapDegrees; /***/ }), -/* 234 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @author Felipe Alfonso <@bitnenfer> - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Utils = __webpack_require__(10); - -/** - * @classdesc - * WebGLPipeline is a class that describes the way elements will be renderered - * in WebGL, specially focused on batching vertices (batching is not provided). - * Pipelines are mostly used for describing 2D rendering passes but it's - * flexible enough to be used for any type of rendering including 3D. - * Internally WebGLPipeline will handle things like compiling shaders, - * creating vertex buffers, assigning primitive topology and binding - * vertex attributes. - * - * The config properties are: - * - game: Current game instance. - * - renderer: Current WebGL renderer. - * - gl: Current WebGL context. - * - 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. - * - vertices: An optional buffer of vertices - * - attributes: An array describing the vertex attributes - * - * The vertex attributes properties are: - * - name : String - Name of the attribute in the vertex shader - * - size : integer - How many components describe the attribute. For ex: vec3 = size of 3, float = size of 1 - * - type : GLenum - WebGL type (gl.BYTE, gl.SHORT, gl.UNSIGNED_BYTE, gl.UNSIGNED_SHORT, gl.FLOAT) - * - normalized : boolean - Is the attribute normalized - * - offset : integer - The offset in bytes to the current attribute in the vertex. Equivalent to offsetof(vertex, attrib) in C - * Here you can find more information of how to describe an attribute: - * - https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/vertexAttribPointer - * - * @class WebGLPipeline - * @memberof Phaser.Renderer.WebGL - * @constructor - * @since 3.0.0 - * - * @param {object} config - The configuration object for this WebGL Pipeline, as described above. - */ -var WebGLPipeline = new Class({ - - initialize: - - function WebGLPipeline (config) - { - /** - * Name of the Pipeline. Used for identifying - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#name - * @type {string} - * @since 3.0.0 - */ - this.name = 'WebGLPipeline'; - - /** - * The Game which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#game - * @type {Phaser.Game} - * @since 3.0.0 - */ - this.game = config.game; - - /** - * The canvas which this WebGL Pipeline renders to. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#view - * @type {HTMLCanvasElement} - * @since 3.0.0 - */ - this.view = config.game.canvas; - - /** - * Used to store the current game resolution - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#resolution - * @type {number} - * @since 3.0.0 - */ - this.resolution = 1; - - /** - * Width of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#width - * @type {number} - * @since 3.0.0 - */ - this.width = 0; - - /** - * Height of the current viewport - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#height - * @type {number} - * @since 3.0.0 - */ - this.height = 0; - - /** - * The WebGL context this WebGL Pipeline uses. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#gl - * @type {WebGLRenderingContext} - * @since 3.0.0 - */ - this.gl = config.gl; - - /** - * How many vertices have been fed to the current pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCount - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.vertexCount = 0; - - /** - * The limit of vertices that the pipeline can hold - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexCapacity - * @type {integer} - * @since 3.0.0 - */ - this.vertexCapacity = config.vertexCapacity; - - /** - * The WebGL Renderer which owns this WebGL Pipeline. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#renderer - * @type {Phaser.Renderer.WebGL.WebGLRenderer} - * @since 3.0.0 - */ - this.renderer = config.renderer; - - /** - * Raw byte buffer of vertices. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexData - * @type {ArrayBuffer} - * @since 3.0.0 - */ - this.vertexData = (config.vertices ? config.vertices : new ArrayBuffer(config.vertexCapacity * config.vertexSize)); - - /** - * The handle to a WebGL vertex buffer object. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexBuffer - * @type {WebGLBuffer} - * @since 3.0.0 - */ - this.vertexBuffer = this.renderer.createVertexBuffer((config.vertices ? config.vertices : this.vertexData.byteLength), this.gl.STREAM_DRAW); - - /** - * The handle to a WebGL program - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#program - * @type {WebGLProgram} - * @since 3.0.0 - */ - this.program = this.renderer.createProgram(config.vertShader, config.fragShader); - - /** - * Array of objects that describe the vertex attributes - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#attributes - * @type {object} - * @since 3.0.0 - */ - this.attributes = config.attributes; - - /** - * The size in bytes of the vertex - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexSize - * @type {integer} - * @since 3.0.0 - */ - this.vertexSize = config.vertexSize; - - /** - * The primitive topology which the pipeline will use to submit draw calls - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#topology - * @type {integer} - * @since 3.0.0 - */ - this.topology = config.topology; - - /** - * Uint8 view to the vertex raw buffer. Used for uploading vertex buffer resources - * to the GPU. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#bytes - * @type {Uint8Array} - * @since 3.0.0 - */ - this.bytes = new Uint8Array(this.vertexData); - - /** - * This will store the amount of components of 32 bit length - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#vertexComponentCount - * @type {integer} - * @since 3.0.0 - */ - this.vertexComponentCount = Utils.getComponentCount(config.attributes, this.gl); - - /** - * Indicates if the current pipeline is flushing the contents to the GPU. - * When the variable is set the flush function will be locked. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#flushLocked - * @type {boolean} - * @since 3.1.0 - */ - this.flushLocked = false; - - /** - * Indicates if the current pipeline is active or not for this frame only. - * Reset in the onRender method. - * - * @name Phaser.Renderer.WebGL.WebGLPipeline#active - * @type {boolean} - * @since 3.10.0 - */ - this.active = false; - }, - - /** - * Called when the Game has fully booted and the Renderer has finished setting up. - * - * By this stage all Game level systems are now in place and you can perform any final - * tasks that the pipeline may need that relied on game systems such as the Texture Manager. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#boot - * @since 3.11.0 - */ - boot: function () - { - }, - - /** - * Adds a description of vertex attribute to the pipeline - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#addAttribute - * @since 3.2.0 - * - * @param {string} name - Name of the vertex attribute - * @param {integer} size - Vertex component size - * @param {integer} type - Type of the attribute - * @param {boolean} normalized - Is the value normalized to a range - * @param {integer} offset - Byte offset to the beginning of the first element in the vertex - * - * @return {this} This WebGLPipeline instance. - */ - addAttribute: function (name, size, type, normalized, offset) - { - this.attributes.push({ - name: name, - size: size, - type: this.renderer.glFormats[type], - normalized: normalized, - offset: offset - }); - - this.vertexComponentCount = Utils.getComponentCount( - this.attributes, - this.gl - ); - return this; - }, - - /** - * Check if the current batch of vertices is full. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#shouldFlush - * @since 3.0.0 - * - * @return {boolean} `true` if the current batch should be flushed, otherwise `false`. - */ - shouldFlush: function () - { - return (this.vertexCount >= this.vertexCapacity); - }, - - /** - * Resizes the properties used to describe the viewport - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#resize - * @since 3.0.0 - * - * @param {number} width - The new width of this WebGL Pipeline. - * @param {number} height - The new height of this WebGL Pipeline. - * @param {number} resolution - The resolution this WebGL Pipeline should be resized to. - * - * @return {this} This WebGLPipeline instance. - */ - resize: function (width, height, resolution) - { - this.width = width * resolution; - this.height = height * resolution; - this.resolution = resolution; - - return this; - }, - - /** - * Binds the pipeline resources, including programs, vertex buffers and binds attributes - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#bind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - bind: function () - { - var gl = this.gl; - var vertexBuffer = this.vertexBuffer; - var attributes = this.attributes; - var program = this.program; - var renderer = this.renderer; - var vertexSize = this.vertexSize; - - renderer.setProgram(program); - renderer.setVertexBuffer(vertexBuffer); - - for (var index = 0; index < attributes.length; ++index) - { - var element = attributes[index]; - var location = gl.getAttribLocation(program, element.name); - - if (location >= 0) - { - gl.enableVertexAttribArray(location); - gl.vertexAttribPointer(location, element.size, element.type, element.normalized, vertexSize, element.offset); - } - else if (location !== -1) - { - gl.disableVertexAttribArray(location); - } - } - - return this; - }, - - /** - * Set whenever this WebGL Pipeline is bound to a WebGL Renderer. - * - * This method is called every time the WebGL Pipeline is attempted to be bound, even if it already is the current pipeline. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onBind - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onBind: function () - { - // This is for updating uniform data it's called on each bind attempt. - return this; - }, - - /** - * Called before each frame is rendered, but after the canvas has been cleared. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPreRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPreRender: function () - { - // called once every frame - return this; - }, - - /** - * Called before a Scene's Camera is rendered. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onRender - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene being rendered. - * @param {Phaser.Cameras.Scene2D.Camera} camera - The Scene Camera being rendered with. - * - * @return {this} This WebGLPipeline instance. - */ - onRender: function () - { - // called for each camera - return this; - }, - - /** - * Called after each frame has been completely rendered and snapshots have been taken. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#onPostRender - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - onPostRender: function () - { - // called once every frame - return this; - }, - - /** - * Uploads the vertex data and emits a draw call - * for the current batch of vertices. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#flush - * @since 3.0.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; - - if (vertexCount === 0) - { - this.flushLocked = false; - return; - } - - gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - gl.drawArrays(topology, 0, vertexCount); - - this.vertexCount = 0; - this.flushLocked = false; - - return this; - }, - - /** - * Removes all object references in this WebGL Pipeline and removes its program from the WebGL context. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#destroy - * @since 3.0.0 - * - * @return {this} This WebGLPipeline instance. - */ - destroy: function () - { - var gl = this.gl; - - gl.deleteProgram(this.program); - gl.deleteBuffer(this.vertexBuffer); - - delete this.program; - delete this.vertexBuffer; - delete this.gl; - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new value of the `float` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1: function (name, x) - { - this.renderer.setFloat1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec2` uniform. - * @param {number} y - The new Y component of the `vec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2: function (name, x, y) - { - this.renderer.setFloat2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - The new X component of the `vec3` uniform. - * @param {number} y - The new Y component of the `vec3` uniform. - * @param {number} z - The new Z component of the `vec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3: function (name, x, y, z) - { - this.renderer.setFloat3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - X component of the uniform - * @param {number} y - Y component of the uniform - * @param {number} z - Z component of the uniform - * @param {number} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4: function (name, x, y, z, w) - { - this.renderer.setFloat4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat1v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat1v: function (name, arr) - { - this.renderer.setFloat1v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat2v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat2v: function (name, arr) - { - this.renderer.setFloat2v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat3v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat3v: function (name, arr) - { - this.renderer.setFloat3v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setFloat4v - * @since 3.13.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {Float32Array} arr - The new value to be used for the uniform variable. - * - * @return {this} This WebGLPipeline instance. - */ - setFloat4v: function (name, arr) - { - this.renderer.setFloat4v(this.program, name, arr); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt1 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new value of the `int` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt1: function (name, x) - { - this.renderer.setInt1(this.program, name, x); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec2` uniform. - * @param {integer} y - The new Y component of the `ivec2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt2: function (name, x, y) - { - this.renderer.setInt2(this.program, name, x, y); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component of the `ivec3` uniform. - * @param {integer} y - The new Y component of the `ivec3` uniform. - * @param {integer} z - The new Z component of the `ivec3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setInt3: function (name, x, y, z) - { - this.renderer.setInt3(this.program, name, x, y, z); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setInt4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - X component of the uniform - * @param {integer} y - Y component of the uniform - * @param {integer} z - Z component of the uniform - * @param {integer} w - W component of the uniform - * - * @return {this} This WebGLPipeline instance. - */ - setInt4: function (name, x, y, z, w) - { - this.renderer.setInt4(this.program, name, x, y, z, w); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix2 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat2` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix2: function (name, transpose, matrix) - { - this.renderer.setMatrix2(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix3 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Whether to transpose the matrix. Should be `false`. - * @param {Float32Array} matrix - The new values for the `mat3` uniform. - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix3: function (name, transpose, matrix) - { - this.renderer.setMatrix3(this.program, name, transpose, matrix); - - return this; - }, - - /** - * Set a uniform value of the current pipeline program. - * - * @method Phaser.Renderer.WebGL.WebGLPipeline#setMatrix4 - * @since 3.2.0 - * - * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Should the matrix be transpose - * @param {Float32Array} matrix - Matrix data - * - * @return {this} This WebGLPipeline instance. - */ - setMatrix4: function (name, transpose, matrix) - { - this.renderer.setMatrix4(this.program, name, transpose, matrix); - - return this; - } - -}); - -module.exports = WebGLPipeline; - - -/***/ }), -/* 235 */ +/* 237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -53302,12 +54839,12 @@ module.exports = WebGLPipeline; var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var GetFastValue = __webpack_require__(2); -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__(234); +var ModelViewProjection = __webpack_require__(238); +var ShaderSourceFS = __webpack_require__(339); +var ShaderSourceVS = __webpack_require__(340); +var TransformMatrix = __webpack_require__(29); +var Utils = __webpack_require__(9); +var WebGLPipeline = __webpack_require__(147); /** * @classdesc @@ -54797,7 +56334,757 @@ module.exports = TextureTintPipeline; /***/ }), -/* 236 */ +/* 238 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * Implements a model view projection matrices. + * Pipelines can implement this for doing 2D and 3D rendering. + * + * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection + * @since 3.0.0 + */ +var ModelViewProjection = { + + /** + * Dirty flag for checking if model matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + modelMatrixDirty: false, + + /** + * Dirty flag for checking if view matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + viewMatrixDirty: false, + + /** + * Dirty flag for checking if projection matrix needs to be updated on GPU. + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty + * @type {boolean} + * @since 3.0.0 + */ + projectionMatrixDirty: false, + + /** + * Model matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + modelMatrix: null, + + /** + * View matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + viewMatrix: null, + + /** + * Projection matrix + * + * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix + * @type {?Float32Array} + * @since 3.0.0 + */ + projectionMatrix: null, + + /** + * Initializes MVP matrices with an identity matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit + * @since 3.0.0 + */ + mvpInit: function () + { + this.modelMatrixDirty = true; + this.viewMatrixDirty = true; + this.projectionMatrixDirty = true; + + 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 + ]); + + return this; + }, + + /** + * If dirty flags are set then the matrices are uploaded to the GPU. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate + * @since 3.0.0 + */ + mvpUpdate: function () + { + var program = this.program; + + if (this.modelMatrixDirty) + { + this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); + this.modelMatrixDirty = false; + } + + if (this.viewMatrixDirty) + { + this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); + this.viewMatrixDirty = false; + } + + if (this.projectionMatrixDirty) + { + this.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); + this.projectionMatrixDirty = false; + } + + return this; + }, + + /** + * Loads an identity matrix to the model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity + * @since 3.0.0 + */ + modelIdentity: function () + { + var modelMatrix = this.modelMatrix; + + modelMatrix[0] = 1; + modelMatrix[1] = 0; + modelMatrix[2] = 0; + modelMatrix[3] = 0; + modelMatrix[4] = 0; + modelMatrix[5] = 1; + modelMatrix[6] = 0; + modelMatrix[7] = 0; + modelMatrix[8] = 0; + modelMatrix[9] = 0; + modelMatrix[10] = 1; + modelMatrix[11] = 0; + modelMatrix[12] = 0; + modelMatrix[13] = 0; + modelMatrix[14] = 0; + modelMatrix[15] = 1; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Scale model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + modelScale: function (x, y, z) + { + var modelMatrix = this.modelMatrix; + + modelMatrix[0] = modelMatrix[0] * x; + modelMatrix[1] = modelMatrix[1] * x; + modelMatrix[2] = modelMatrix[2] * x; + modelMatrix[3] = modelMatrix[3] * x; + modelMatrix[4] = modelMatrix[4] * y; + modelMatrix[5] = modelMatrix[5] * y; + modelMatrix[6] = modelMatrix[6] * y; + modelMatrix[7] = modelMatrix[7] * y; + modelMatrix[8] = modelMatrix[8] * z; + modelMatrix[9] = modelMatrix[9] * z; + modelMatrix[10] = modelMatrix[10] * z; + modelMatrix[11] = modelMatrix[11] * z; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Translate model matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + modelTranslate: function (x, y, z) + { + var modelMatrix = this.modelMatrix; + + modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12]; + modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13]; + modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14]; + modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15]; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the X axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateX: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a10 = modelMatrix[4]; + var a11 = modelMatrix[5]; + var a12 = modelMatrix[6]; + var a13 = modelMatrix[7]; + var a20 = modelMatrix[8]; + var a21 = modelMatrix[9]; + var a22 = modelMatrix[10]; + var a23 = modelMatrix[11]; + + modelMatrix[4] = a10 * c + a20 * s; + modelMatrix[5] = a11 * c + a21 * s; + modelMatrix[6] = a12 * c + a22 * s; + modelMatrix[7] = a13 * c + a23 * s; + modelMatrix[8] = a20 * c - a10 * s; + modelMatrix[9] = a21 * c - a11 * s; + modelMatrix[10] = a22 * c - a12 * s; + modelMatrix[11] = a23 * c - a13 * s; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the Y axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateY: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = modelMatrix[0]; + var a01 = modelMatrix[1]; + var a02 = modelMatrix[2]; + var a03 = modelMatrix[3]; + var a20 = modelMatrix[8]; + var a21 = modelMatrix[9]; + var a22 = modelMatrix[10]; + var a23 = modelMatrix[11]; + + modelMatrix[0] = a00 * c - a20 * s; + modelMatrix[1] = a01 * c - a21 * s; + modelMatrix[2] = a02 * c - a22 * s; + modelMatrix[3] = a03 * c - a23 * s; + modelMatrix[8] = a00 * s + a20 * c; + modelMatrix[9] = a01 * s + a21 * c; + modelMatrix[10] = a02 * s + a22 * c; + modelMatrix[11] = a03 * s + a23 * c; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Rotates the model matrix in the Z axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + modelRotateZ: function (radians) + { + var modelMatrix = this.modelMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = modelMatrix[0]; + var a01 = modelMatrix[1]; + var a02 = modelMatrix[2]; + var a03 = modelMatrix[3]; + var a10 = modelMatrix[4]; + var a11 = modelMatrix[5]; + var a12 = modelMatrix[6]; + var a13 = modelMatrix[7]; + + modelMatrix[0] = a00 * c + a10 * s; + modelMatrix[1] = a01 * c + a11 * s; + modelMatrix[2] = a02 * c + a12 * s; + modelMatrix[3] = a03 * c + a13 * s; + modelMatrix[4] = a10 * c - a00 * s; + modelMatrix[5] = a11 * c - a01 * s; + modelMatrix[6] = a12 * c - a02 * s; + modelMatrix[7] = a13 * c - a03 * s; + + this.modelMatrixDirty = true; + + return this; + }, + + /** + * Loads identity matrix into the view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity + * @since 3.0.0 + * + * @return {this} This Model View Projection. + */ + viewIdentity: function () + { + var viewMatrix = this.viewMatrix; + + viewMatrix[0] = 1; + viewMatrix[1] = 0; + viewMatrix[2] = 0; + viewMatrix[3] = 0; + viewMatrix[4] = 0; + viewMatrix[5] = 1; + viewMatrix[6] = 0; + viewMatrix[7] = 0; + viewMatrix[8] = 0; + viewMatrix[9] = 0; + viewMatrix[10] = 1; + viewMatrix[11] = 0; + viewMatrix[12] = 0; + viewMatrix[13] = 0; + viewMatrix[14] = 0; + viewMatrix[15] = 1; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Scales view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + viewScale: function (x, y, z) + { + var viewMatrix = this.viewMatrix; + + viewMatrix[0] = viewMatrix[0] * x; + viewMatrix[1] = viewMatrix[1] * x; + viewMatrix[2] = viewMatrix[2] * x; + viewMatrix[3] = viewMatrix[3] * x; + viewMatrix[4] = viewMatrix[4] * y; + viewMatrix[5] = viewMatrix[5] * y; + viewMatrix[6] = viewMatrix[6] * y; + viewMatrix[7] = viewMatrix[7] * y; + viewMatrix[8] = viewMatrix[8] * z; + viewMatrix[9] = viewMatrix[9] * z; + viewMatrix[10] = viewMatrix[10] * z; + viewMatrix[11] = viewMatrix[11] * z; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Translates view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate + * @since 3.0.0 + * + * @param {number} x - The x component. + * @param {number} y - The y component. + * @param {number} z - The z component. + * + * @return {this} This Model View Projection. + */ + viewTranslate: function (x, y, z) + { + var viewMatrix = this.viewMatrix; + + viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12]; + viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13]; + viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14]; + viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15]; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the X axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateX: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a10 = viewMatrix[4]; + var a11 = viewMatrix[5]; + var a12 = viewMatrix[6]; + var a13 = viewMatrix[7]; + var a20 = viewMatrix[8]; + var a21 = viewMatrix[9]; + var a22 = viewMatrix[10]; + var a23 = viewMatrix[11]; + + viewMatrix[4] = a10 * c + a20 * s; + viewMatrix[5] = a11 * c + a21 * s; + viewMatrix[6] = a12 * c + a22 * s; + viewMatrix[7] = a13 * c + a23 * s; + viewMatrix[8] = a20 * c - a10 * s; + viewMatrix[9] = a21 * c - a11 * s; + viewMatrix[10] = a22 * c - a12 * s; + viewMatrix[11] = a23 * c - a13 * s; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the Y axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateY: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = viewMatrix[0]; + var a01 = viewMatrix[1]; + var a02 = viewMatrix[2]; + var a03 = viewMatrix[3]; + var a20 = viewMatrix[8]; + var a21 = viewMatrix[9]; + var a22 = viewMatrix[10]; + var a23 = viewMatrix[11]; + + viewMatrix[0] = a00 * c - a20 * s; + viewMatrix[1] = a01 * c - a21 * s; + viewMatrix[2] = a02 * c - a22 * s; + viewMatrix[3] = a03 * c - a23 * s; + viewMatrix[8] = a00 * s + a20 * c; + viewMatrix[9] = a01 * s + a21 * c; + viewMatrix[10] = a02 * s + a22 * c; + viewMatrix[11] = a03 * s + a23 * c; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Rotates view matrix in the Z axis. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ + * @since 3.0.0 + * + * @param {number} radians - The amount to rotate by. + * + * @return {this} This Model View Projection. + */ + viewRotateZ: function (radians) + { + var viewMatrix = this.viewMatrix; + var s = Math.sin(radians); + var c = Math.cos(radians); + var a00 = viewMatrix[0]; + var a01 = viewMatrix[1]; + var a02 = viewMatrix[2]; + var a03 = viewMatrix[3]; + var a10 = viewMatrix[4]; + var a11 = viewMatrix[5]; + var a12 = viewMatrix[6]; + var a13 = viewMatrix[7]; + + viewMatrix[0] = a00 * c + a10 * s; + viewMatrix[1] = a01 * c + a11 * s; + viewMatrix[2] = a02 * c + a12 * s; + viewMatrix[3] = a03 * c + a13 * s; + viewMatrix[4] = a10 * c - a00 * s; + viewMatrix[5] = a11 * c - a01 * s; + viewMatrix[6] = a12 * c - a02 * s; + viewMatrix[7] = a13 * c - a03 * s; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D + * @since 3.0.0 + * + * @param {Float32Array} matrix2D - The Matrix2D. + * + * @return {this} This Model View Projection. + */ + viewLoad2D: function (matrix2D) + { + var vm = this.viewMatrix; + + vm[0] = matrix2D[0]; + vm[1] = matrix2D[1]; + vm[2] = 0.0; + vm[3] = 0.0; + vm[4] = matrix2D[2]; + vm[5] = matrix2D[3]; + vm[6] = 0.0; + vm[7] = 0.0; + vm[8] = matrix2D[4]; + vm[9] = matrix2D[5]; + vm[10] = 1.0; + vm[11] = 0.0; + vm[12] = 0.0; + vm[13] = 0.0; + vm[14] = 0.0; + vm[15] = 1.0; + + this.viewMatrixDirty = true; + + return this; + }, + + + /** + * Copies a 4x4 matrix into the view matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad + * @since 3.0.0 + * + * @param {Float32Array} matrix - The Matrix2D. + * + * @return {this} This Model View Projection. + */ + viewLoad: function (matrix) + { + var vm = this.viewMatrix; + + vm[0] = matrix[0]; + vm[1] = matrix[1]; + vm[2] = matrix[2]; + vm[3] = matrix[3]; + vm[4] = matrix[4]; + vm[5] = matrix[5]; + vm[6] = matrix[6]; + vm[7] = matrix[7]; + vm[8] = matrix[8]; + vm[9] = matrix[9]; + vm[10] = matrix[10]; + vm[11] = matrix[11]; + vm[12] = matrix[12]; + vm[13] = matrix[13]; + vm[14] = matrix[14]; + vm[15] = matrix[15]; + + this.viewMatrixDirty = true; + + return this; + }, + + /** + * Loads identity matrix into the projection matrix. + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity + * @since 3.0.0 + * + * @return {this} This Model View Projection. + */ + projIdentity: function () + { + var projectionMatrix = this.projectionMatrix; + + projectionMatrix[0] = 1; + projectionMatrix[1] = 0; + projectionMatrix[2] = 0; + projectionMatrix[3] = 0; + projectionMatrix[4] = 0; + projectionMatrix[5] = 1; + projectionMatrix[6] = 0; + projectionMatrix[7] = 0; + projectionMatrix[8] = 0; + projectionMatrix[9] = 0; + projectionMatrix[10] = 1; + projectionMatrix[11] = 0; + projectionMatrix[12] = 0; + projectionMatrix[13] = 0; + projectionMatrix[14] = 0; + projectionMatrix[15] = 1; + + this.projectionMatrixDirty = true; + + return this; + }, + + /** + * Sets up an orthographic projection matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho + * @since 3.0.0 + * + * @param {number} left - The left value. + * @param {number} right - The right value. + * @param {number} bottom - The bottom value. + * @param {number} top - The top value. + * @param {number} near - The near value. + * @param {number} far - The far value. + * + * @return {this} This Model View Projection. + */ + projOrtho: function (left, right, bottom, top, near, far) + { + var projectionMatrix = this.projectionMatrix; + var leftRight = 1.0 / (left - right); + var bottomTop = 1.0 / (bottom - top); + var nearFar = 1.0 / (near - far); + + projectionMatrix[0] = -2.0 * leftRight; + projectionMatrix[1] = 0.0; + projectionMatrix[2] = 0.0; + projectionMatrix[3] = 0.0; + projectionMatrix[4] = 0.0; + projectionMatrix[5] = -2.0 * bottomTop; + projectionMatrix[6] = 0.0; + projectionMatrix[7] = 0.0; + projectionMatrix[8] = 0.0; + projectionMatrix[9] = 0.0; + projectionMatrix[10] = 2.0 * nearFar; + projectionMatrix[11] = 0.0; + projectionMatrix[12] = (left + right) * leftRight; + projectionMatrix[13] = (top + bottom) * bottomTop; + projectionMatrix[14] = (far + near) * nearFar; + projectionMatrix[15] = 1.0; + + this.projectionMatrixDirty = true; + + return this; + }, + + /** + * Sets up a perspective projection matrix + * + * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp + * @since 3.0.0 + * + * @param {number} fovY - The fov value. + * @param {number} aspectRatio - The aspectRatio value. + * @param {number} near - The near value. + * @param {number} far - The far value. + * + * @return {this} This Model View Projection. + */ + projPersp: function (fovY, aspectRatio, near, far) + { + var projectionMatrix = this.projectionMatrix; + var fov = 1.0 / Math.tan(fovY / 2.0); + var nearFar = 1.0 / (near - far); + + projectionMatrix[0] = fov / aspectRatio; + projectionMatrix[1] = 0.0; + projectionMatrix[2] = 0.0; + projectionMatrix[3] = 0.0; + projectionMatrix[4] = 0.0; + projectionMatrix[5] = fov; + projectionMatrix[6] = 0.0; + projectionMatrix[7] = 0.0; + projectionMatrix[8] = 0.0; + projectionMatrix[9] = 0.0; + projectionMatrix[10] = (far + near) * nearFar; + projectionMatrix[11] = -1.0; + projectionMatrix[12] = 0.0; + projectionMatrix[13] = 0.0; + projectionMatrix[14] = (2.0 * far * near) * nearFar; + projectionMatrix[15] = 0.0; + + this.projectionMatrixDirty = true; + + return this; + } +}; + +module.exports = ModelViewProjection; + + +/***/ }), +/* 239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54810,7 +57097,7 @@ var Sleeping = {}; module.exports = Sleeping; -var Events = __webpack_require__(237); +var Events = __webpack_require__(240); (function() { @@ -54932,7 +57219,7 @@ var Events = __webpack_require__(237); /***/ }), -/* 237 */ +/* 240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -54947,7 +57234,7 @@ var Events = {}; module.exports = Events; -var Common = __webpack_require__(37); +var Common = __webpack_require__(38); (function() { @@ -55050,7 +57337,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 238 */ +/* 241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55065,65 +57352,65 @@ var Common = __webpack_require__(37); module.exports = { - 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), + AlignTo: __webpack_require__(526), + Angle: __webpack_require__(527), + Call: __webpack_require__(528), + GetFirst: __webpack_require__(529), + GetLast: __webpack_require__(530), + GridAlign: __webpack_require__(531), + IncAlpha: __webpack_require__(592), + IncX: __webpack_require__(593), + IncXY: __webpack_require__(594), + IncY: __webpack_require__(595), + PlaceOnCircle: __webpack_require__(596), + PlaceOnEllipse: __webpack_require__(597), + PlaceOnLine: __webpack_require__(598), + PlaceOnRectangle: __webpack_require__(599), + PlaceOnTriangle: __webpack_require__(600), + PlayAnimation: __webpack_require__(601), PropertyValueInc: __webpack_require__(34), PropertyValueSet: __webpack_require__(25), - 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) + RandomCircle: __webpack_require__(602), + RandomEllipse: __webpack_require__(603), + RandomLine: __webpack_require__(604), + RandomRectangle: __webpack_require__(605), + RandomTriangle: __webpack_require__(606), + Rotate: __webpack_require__(607), + RotateAround: __webpack_require__(608), + RotateAroundDistance: __webpack_require__(609), + ScaleX: __webpack_require__(610), + ScaleXY: __webpack_require__(611), + ScaleY: __webpack_require__(612), + SetAlpha: __webpack_require__(613), + SetBlendMode: __webpack_require__(614), + SetDepth: __webpack_require__(615), + SetHitArea: __webpack_require__(616), + SetOrigin: __webpack_require__(617), + SetRotation: __webpack_require__(618), + SetScale: __webpack_require__(619), + SetScaleX: __webpack_require__(620), + SetScaleY: __webpack_require__(621), + SetScrollFactor: __webpack_require__(622), + SetScrollFactorX: __webpack_require__(623), + SetScrollFactorY: __webpack_require__(624), + SetTint: __webpack_require__(625), + SetVisible: __webpack_require__(626), + SetX: __webpack_require__(627), + SetXY: __webpack_require__(628), + SetY: __webpack_require__(629), + ShiftPosition: __webpack_require__(630), + Shuffle: __webpack_require__(631), + SmootherStep: __webpack_require__(632), + SmoothStep: __webpack_require__(633), + Spread: __webpack_require__(634), + ToggleVisible: __webpack_require__(635), + WrapInRectangle: __webpack_require__(636) }; /***/ }), -/* 239 */ +/* 242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55132,22 +57419,22 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); +var ALIGN_CONST = __webpack_require__(105); 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); +AlignToMap[ALIGN_CONST.BOTTOM_CENTER] = __webpack_require__(243); +AlignToMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(244); +AlignToMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(245); +AlignToMap[ALIGN_CONST.LEFT_BOTTOM] = __webpack_require__(246); +AlignToMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(247); +AlignToMap[ALIGN_CONST.LEFT_TOP] = __webpack_require__(248); +AlignToMap[ALIGN_CONST.RIGHT_BOTTOM] = __webpack_require__(249); +AlignToMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(250); +AlignToMap[ALIGN_CONST.RIGHT_TOP] = __webpack_require__(251); +AlignToMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(252); +AlignToMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(253); +AlignToMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(254); /** * Takes a Game Object and aligns it next to another, at the given position. @@ -55175,7 +57462,7 @@ module.exports = QuickSet; /***/ }), -/* 240 */ +/* 243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55184,10 +57471,10 @@ module.exports = QuickSet; * @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__(39); +var GetBottom = __webpack_require__(39); +var GetCenterX = __webpack_require__(76); +var SetCenterX = __webpack_require__(77); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom center position of the other. @@ -55219,7 +57506,7 @@ module.exports = BottomCenter; /***/ }), -/* 241 */ +/* 244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55228,10 +57515,10 @@ module.exports = BottomCenter; * @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); +var GetBottom = __webpack_require__(39); +var GetLeft = __webpack_require__(41); +var SetLeft = __webpack_require__(42); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom left position of the other. @@ -55263,7 +57550,7 @@ module.exports = BottomLeft; /***/ }), -/* 242 */ +/* 245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55272,10 +57559,10 @@ module.exports = BottomLeft; * @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); +var GetBottom = __webpack_require__(39); +var GetRight = __webpack_require__(43); +var SetRight = __webpack_require__(44); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the bottom right position of the other. @@ -55307,7 +57594,7 @@ module.exports = BottomRight; /***/ }), -/* 243 */ +/* 246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55316,10 +57603,10 @@ module.exports = BottomRight; * @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); +var GetBottom = __webpack_require__(39); +var GetLeft = __webpack_require__(41); +var SetBottom = __webpack_require__(45); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the left bottom position of the other. @@ -55351,7 +57638,7 @@ module.exports = LeftBottom; /***/ }), -/* 244 */ +/* 247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55360,10 +57647,10 @@ module.exports = LeftBottom; * @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); +var GetCenterY = __webpack_require__(78); +var GetLeft = __webpack_require__(41); +var SetCenterY = __webpack_require__(79); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the left center position of the other. @@ -55395,7 +57682,7 @@ module.exports = LeftCenter; /***/ }), -/* 245 */ +/* 248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55404,10 +57691,10 @@ module.exports = LeftCenter; * @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); +var GetLeft = __webpack_require__(41); +var GetTop = __webpack_require__(46); +var SetRight = __webpack_require__(44); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the left top position of the other. @@ -55439,7 +57726,7 @@ module.exports = LeftTop; /***/ }), -/* 246 */ +/* 249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55448,10 +57735,10 @@ module.exports = LeftTop; * @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); +var GetBottom = __webpack_require__(39); +var GetRight = __webpack_require__(43); +var SetBottom = __webpack_require__(45); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned next to the right bottom position of the other. @@ -55483,7 +57770,7 @@ module.exports = RightBottom; /***/ }), -/* 247 */ +/* 250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55492,10 +57779,10 @@ module.exports = RightBottom; * @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); +var GetCenterY = __webpack_require__(78); +var GetRight = __webpack_require__(43); +var SetCenterY = __webpack_require__(79); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned next to the right center position of the other. @@ -55527,7 +57814,7 @@ module.exports = RightCenter; /***/ }), -/* 248 */ +/* 251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55536,10 +57823,10 @@ module.exports = RightCenter; * @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); +var GetRight = __webpack_require__(43); +var GetTop = __webpack_require__(46); +var SetLeft = __webpack_require__(42); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned next to the right top position of the other. @@ -55571,7 +57858,7 @@ module.exports = RightTop; /***/ }), -/* 249 */ +/* 252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55580,10 +57867,10 @@ module.exports = RightTop; * @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); +var GetCenterX = __webpack_require__(76); +var GetTop = __webpack_require__(46); +var SetBottom = __webpack_require__(45); +var SetCenterX = __webpack_require__(77); /** * Takes given Game Object and aligns it so that it is positioned next to the top center position of the other. @@ -55615,7 +57902,7 @@ module.exports = TopCenter; /***/ }), -/* 250 */ +/* 253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55624,10 +57911,10 @@ module.exports = TopCenter; * @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); +var GetLeft = __webpack_require__(41); +var GetTop = __webpack_require__(46); +var SetBottom = __webpack_require__(45); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned next to the top left position of the other. @@ -55659,7 +57946,7 @@ module.exports = TopLeft; /***/ }), -/* 251 */ +/* 254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55668,10 +57955,10 @@ module.exports = TopLeft; * @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); +var GetRight = __webpack_require__(43); +var GetTop = __webpack_require__(46); +var SetBottom = __webpack_require__(45); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned next to the top right position of the other. @@ -55703,7 +57990,7 @@ module.exports = TopRight; /***/ }), -/* 252 */ +/* 255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55712,19 +57999,19 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); +var ALIGN_CONST = __webpack_require__(105); var AlignInMap = []; -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.BOTTOM_CENTER] = __webpack_require__(256); +AlignInMap[ALIGN_CONST.BOTTOM_LEFT] = __webpack_require__(257); +AlignInMap[ALIGN_CONST.BOTTOM_RIGHT] = __webpack_require__(258); +AlignInMap[ALIGN_CONST.CENTER] = __webpack_require__(259); +AlignInMap[ALIGN_CONST.LEFT_CENTER] = __webpack_require__(261); +AlignInMap[ALIGN_CONST.RIGHT_CENTER] = __webpack_require__(262); +AlignInMap[ALIGN_CONST.TOP_CENTER] = __webpack_require__(263); +AlignInMap[ALIGN_CONST.TOP_LEFT] = __webpack_require__(264); +AlignInMap[ALIGN_CONST.TOP_RIGHT] = __webpack_require__(265); 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]; @@ -55756,7 +58043,7 @@ module.exports = QuickSet; /***/ }), -/* 253 */ +/* 256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55765,10 +58052,10 @@ module.exports = QuickSet; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetBottom = __webpack_require__(38); -var GetCenterX = __webpack_require__(75); -var SetBottom = __webpack_require__(44); -var SetCenterX = __webpack_require__(76); +var GetBottom = __webpack_require__(39); +var GetCenterX = __webpack_require__(76); +var SetBottom = __webpack_require__(45); +var SetCenterX = __webpack_require__(77); /** * Takes given Game Object and aligns it so that it is positioned in the bottom center of the other. @@ -55800,7 +58087,7 @@ module.exports = BottomCenter; /***/ }), -/* 254 */ +/* 257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55809,10 +58096,10 @@ module.exports = BottomCenter; * @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 SetLeft = __webpack_require__(41); +var GetBottom = __webpack_require__(39); +var GetLeft = __webpack_require__(41); +var SetBottom = __webpack_require__(45); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned in the bottom left of the other. @@ -55844,7 +58131,7 @@ module.exports = BottomLeft; /***/ }), -/* 255 */ +/* 258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55853,10 +58140,10 @@ module.exports = BottomLeft; * @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 SetRight = __webpack_require__(43); +var GetBottom = __webpack_require__(39); +var GetRight = __webpack_require__(43); +var SetBottom = __webpack_require__(45); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the bottom right of the other. @@ -55888,7 +58175,7 @@ module.exports = BottomRight; /***/ }), -/* 256 */ +/* 259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55897,9 +58184,9 @@ module.exports = BottomRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(257); -var GetCenterX = __webpack_require__(75); -var GetCenterY = __webpack_require__(77); +var CenterOn = __webpack_require__(260); +var GetCenterX = __webpack_require__(76); +var GetCenterY = __webpack_require__(78); /** * Takes given Game Object and aligns it so that it is positioned in the center of the other. @@ -55930,7 +58217,7 @@ module.exports = Center; /***/ }), -/* 257 */ +/* 260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55939,8 +58226,8 @@ module.exports = Center; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetCenterX = __webpack_require__(76); -var SetCenterY = __webpack_require__(78); +var SetCenterX = __webpack_require__(77); +var SetCenterY = __webpack_require__(79); /** * Positions the Game Object so that it is centered on the given coordinates. @@ -55967,7 +58254,7 @@ module.exports = CenterOn; /***/ }), -/* 258 */ +/* 261 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -55976,10 +58263,10 @@ module.exports = CenterOn; * @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 SetLeft = __webpack_require__(41); +var GetCenterY = __webpack_require__(78); +var GetLeft = __webpack_require__(41); +var SetCenterY = __webpack_require__(79); +var SetLeft = __webpack_require__(42); /** * Takes given Game Object and aligns it so that it is positioned in the left center of the other. @@ -56011,7 +58298,7 @@ module.exports = LeftCenter; /***/ }), -/* 259 */ +/* 262 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56020,10 +58307,10 @@ module.exports = LeftCenter; * @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 SetRight = __webpack_require__(43); +var GetCenterY = __webpack_require__(78); +var GetRight = __webpack_require__(43); +var SetCenterY = __webpack_require__(79); +var SetRight = __webpack_require__(44); /** * Takes given Game Object and aligns it so that it is positioned in the right center of the other. @@ -56055,7 +58342,7 @@ module.exports = RightCenter; /***/ }), -/* 260 */ +/* 263 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56064,10 +58351,10 @@ module.exports = RightCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetCenterX = __webpack_require__(75); -var GetTop = __webpack_require__(45); -var SetCenterX = __webpack_require__(76); -var SetTop = __webpack_require__(39); +var GetCenterX = __webpack_require__(76); +var GetTop = __webpack_require__(46); +var SetCenterX = __webpack_require__(77); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned in the top center of the other. @@ -56099,7 +58386,7 @@ module.exports = TopCenter; /***/ }), -/* 261 */ +/* 264 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56108,10 +58395,10 @@ module.exports = TopCenter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLeft = __webpack_require__(40); -var GetTop = __webpack_require__(45); -var SetLeft = __webpack_require__(41); -var SetTop = __webpack_require__(39); +var GetLeft = __webpack_require__(41); +var GetTop = __webpack_require__(46); +var SetLeft = __webpack_require__(42); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned in the top left of the other. @@ -56143,7 +58430,7 @@ module.exports = TopLeft; /***/ }), -/* 262 */ +/* 265 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56152,10 +58439,10 @@ module.exports = TopLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetRight = __webpack_require__(42); -var GetTop = __webpack_require__(45); -var SetRight = __webpack_require__(43); -var SetTop = __webpack_require__(39); +var GetRight = __webpack_require__(43); +var GetTop = __webpack_require__(46); +var SetRight = __webpack_require__(44); +var SetTop = __webpack_require__(40); /** * Takes given Game Object and aligns it so that it is positioned in the top right of the other. @@ -56187,7 +58474,7 @@ module.exports = TopRight; /***/ }), -/* 263 */ +/* 266 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56196,9 +58483,9 @@ module.exports = TopRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(146); +var CircumferencePoint = __webpack_require__(149); var FromPercent = __webpack_require__(87); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Point = __webpack_require__(4); /** @@ -56230,7 +58517,7 @@ module.exports = GetPoint; /***/ }), -/* 264 */ +/* 267 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56239,10 +58526,10 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(265); -var CircumferencePoint = __webpack_require__(146); +var Circumference = __webpack_require__(268); +var CircumferencePoint = __webpack_require__(149); var FromPercent = __webpack_require__(87); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * Returns an array of Point objects containing the coordinates of the points around the circumference of the Circle, @@ -56263,7 +58550,7 @@ var GetPoints = function (circle, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Circumference(circle) / stepRate; } @@ -56282,7 +58569,7 @@ module.exports = GetPoints; /***/ }), -/* 265 */ +/* 268 */ /***/ (function(module, exports) { /** @@ -56310,7 +58597,7 @@ module.exports = Circumference; /***/ }), -/* 266 */ +/* 269 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56319,7 +58606,7 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 @@ -56420,7 +58707,7 @@ module.exports = AlphaSingle; /***/ }), -/* 267 */ +/* 270 */ /***/ (function(module, exports) { /** @@ -56504,7 +58791,7 @@ module.exports = FindClosestInSorted; /***/ }), -/* 268 */ +/* 271 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56678,7 +58965,7 @@ module.exports = AnimationFrame; /***/ }), -/* 269 */ +/* 272 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56800,7 +59087,7 @@ module.exports = BlendMode; /***/ }), -/* 270 */ +/* 273 */ /***/ (function(module, exports) { /** @@ -56893,7 +59180,7 @@ module.exports = Depth; /***/ }), -/* 271 */ +/* 274 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56902,7 +59189,7 @@ module.exports = Depth; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoint = __webpack_require__(149); +var GetPoint = __webpack_require__(152); var Perimeter = __webpack_require__(112); // Return an array of points from the perimeter of the rectangle @@ -56928,7 +59215,7 @@ var GetPoints = function (rectangle, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Perimeter(rectangle) / stepRate; } @@ -56947,7 +59234,7 @@ module.exports = GetPoints; /***/ }), -/* 272 */ +/* 275 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -56986,7 +59273,7 @@ module.exports = GetPoint; /***/ }), -/* 273 */ +/* 276 */ /***/ (function(module, exports) { /** @@ -56996,17 +59283,21 @@ module.exports = GetPoint; */ /** - * Rotate a `point` around `x` and `y` by the given `angle`. + * Rotate a `point` around `x` and `y` to the given `angle`, at the same distance. + * + * In polar notation, this maps a point from (r, t) to (r, angle), vs. the origin (x, y). * * @function Phaser.Math.RotateAround * @since 3.0.0 * + * @generic {Phaser.Types.Math.Vector2Like} T - [point,$return] + * * @param {(Phaser.Geom.Point|object)} point - The point to be rotated. * @param {number} x - The horizontal coordinate to rotate around. * @param {number} y - The vertical coordinate to rotate around. * @param {number} angle - The angle of rotation in radians. * - * @return {Phaser.Geom.Point} The given point, rotated by the given angle around the given coordinates. + * @return {Phaser.Types.Math.Vector2Like} The given point. */ var RotateAround = function (point, x, y, angle) { @@ -57026,7 +59317,7 @@ module.exports = RotateAround; /***/ }), -/* 274 */ +/* 277 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57035,8 +59326,8 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapMask = __webpack_require__(275); -var GeometryMask = __webpack_require__(276); +var BitmapMask = __webpack_require__(278); +var GeometryMask = __webpack_require__(279); /** * Provides methods used for getting and setting the mask of a Game Object. @@ -57173,7 +59464,7 @@ module.exports = Mask; /***/ }), -/* 275 */ +/* 278 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57183,7 +59474,7 @@ module.exports = Mask; */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); /** * @classdesc @@ -57466,7 +59757,7 @@ module.exports = BitmapMask; /***/ }), -/* 276 */ +/* 279 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57781,7 +60072,7 @@ module.exports = GeometryMask; /***/ }), -/* 277 */ +/* 280 */ /***/ (function(module, exports) { /** @@ -57888,7 +60179,7 @@ module.exports = ScrollFactor; /***/ }), -/* 278 */ +/* 281 */ /***/ (function(module, exports) { /** @@ -57949,7 +60240,7 @@ module.exports = ToJSON; /***/ }), -/* 279 */ +/* 282 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -57958,10 +60249,10 @@ module.exports = ToJSON; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); -var TransformMatrix = __webpack_require__(32); -var WrapAngle = __webpack_require__(232); -var WrapAngleDegrees = __webpack_require__(233); +var MATH_CONST = __webpack_require__(15); +var TransformMatrix = __webpack_require__(29); +var WrapAngle = __webpack_require__(235); +var WrapAngleDegrees = __webpack_require__(236); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -58179,8 +60470,8 @@ 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. + * Phaser uses a right-hand clockwise rotation system, where 0 is right, PI/2 is down, +-PI is left + * and -PI/2 is up. * * If you prefer to work in degrees, see the `angle` property instead. * @@ -58488,7 +60779,7 @@ module.exports = Transform; /***/ }), -/* 280 */ +/* 283 */ /***/ (function(module, exports) { /** @@ -58577,7 +60868,7 @@ module.exports = Visible; /***/ }), -/* 281 */ +/* 284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58592,16 +60883,16 @@ module.exports = Visible; module.exports = { - CHANGE_DATA: __webpack_require__(572), - CHANGE_DATA_KEY: __webpack_require__(573), - REMOVE_DATA: __webpack_require__(574), - SET_DATA: __webpack_require__(575) + CHANGE_DATA: __webpack_require__(577), + CHANGE_DATA_KEY: __webpack_require__(578), + REMOVE_DATA: __webpack_require__(579), + SET_DATA: __webpack_require__(580) }; /***/ }), -/* 282 */ +/* 285 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58615,20 +60906,20 @@ var Point = __webpack_require__(4); /** - * Return an array of points from the perimeter of the rectangle - * each spaced out based on the quantity or step required + * Returns an array of points from the perimeter of the Rectangle, where each point is spaced out based + * on either the `step` value, or the `quantity`. * * @function Phaser.Geom.Rectangle.MarchingAnts * @since 3.0.0 * * @generic {Phaser.Geom.Point[]} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {number} step - [description] - * @param {integer} quantity - [description] - * @param {(array|Phaser.Geom.Point[])} [out] - [description] + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the perimeter points from. + * @param {number} [step] - The distance between each point of the perimeter. Set to `null` if you wish to use the `quantity` parameter instead. + * @param {integer} [quantity] - The total number of points to return. The step is then calculated based on the length of the Rectangle, divided by this value. + * @param {(array|Phaser.Geom.Point[])} [out] - An array in which the perimeter points will be stored. If not given, a new array instance is created. * - * @return {(array|Phaser.Geom.Point[])} [description] + * @return {(array|Phaser.Geom.Point[])} An array containing the perimeter points from the Rectangle. */ var MarchingAnts = function (rect, step, quantity, out) { @@ -58720,7 +61011,7 @@ module.exports = MarchingAnts; /***/ }), -/* 283 */ +/* 286 */ /***/ (function(module, exports) { /** @@ -58760,7 +61051,7 @@ module.exports = RotateLeft; /***/ }), -/* 284 */ +/* 287 */ /***/ (function(module, exports) { /** @@ -58800,7 +61091,7 @@ module.exports = RotateRight; /***/ }), -/* 285 */ +/* 288 */ /***/ (function(module, exports) { /** @@ -58874,7 +61165,7 @@ module.exports = BresenhamPoints; /***/ }), -/* 286 */ +/* 289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -58883,14 +61174,14 @@ module.exports = BresenhamPoints; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Animation = __webpack_require__(148); +var Animation = __webpack_require__(151); var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(159); -var EventEmitter = __webpack_require__(9); +var CustomMap = __webpack_require__(162); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(111); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); -var Pad = __webpack_require__(160); +var Pad = __webpack_require__(163); /** * @classdesc @@ -59010,7 +61301,7 @@ var AnimationManager = new Class({ * @param {string} key - The key under which the Animation should be added. The Animation will be updated with it. Must be unique. * @param {Phaser.Animations.Animation} animation - The Animation which should be added to the Animation Manager. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ add: function (key, animation) { @@ -59018,7 +61309,7 @@ var AnimationManager = new Class({ { console.warn('Animation key exists: ' + key); - return; + return this; } animation.key = key; @@ -59141,7 +61432,34 @@ var AnimationManager = new Class({ }, /** - * [description] + * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. + * + * Generates objects with string based frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNames}. + * + * It's a helper method, designed to make it easier for you to extract all of the frame names from texture atlases. + * If you're working with a sprite sheet, see the `generateFrameNumbers` method instead. + * + * Example: + * + * If you have a texture atlases loaded called `gems` and it contains 6 frames called `ruby_0001`, `ruby_0002`, and so on, + * then you can call this method using: `this.anims.generateFrameNames('gems', { prefix: 'ruby_', end: 6, zeroPad: 4 })`. + * + * The `end` value tells it to look for 6 frames, incrementally numbered, all starting with the prefix `ruby_`. The `zeroPad` + * value tells it how many zeroes pad out the numbers. To create an animation using this method, you can do: + * + * ```javascript + * this.anims.create({ + * key: 'ruby', + * repeat: -1, + * frames: this.anims.generateFrameNames('gems', { + * prefix: 'ruby_', + * end: 6, + * zeroPad: 4 + * }) + * }); + * ``` + * + * Please see the animation examples for further details. * * @method Phaser.Animations.AnimationManager#generateFrameNames * @since 3.0.0 @@ -59219,6 +61537,8 @@ var AnimationManager = new Class({ * Generate an array of {@link Phaser.Types.Animations.AnimationFrame} objects from a texture key and configuration object. * * Generates objects with numbered frame names, as configured by the given {@link Phaser.Types.Animations.GenerateFrameNumbers}. + * + * If you're working with a texture atlas, see the `generateFrameNames` method instead. * * @method Phaser.Animations.AnimationManager#generateFrameNumbers * @since 3.0.0 @@ -59336,7 +61656,7 @@ var AnimationManager = new Class({ * @fires Phaser.Animations.Events#PAUSE_ALL * @since 3.0.0 * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ pauseAll: function () { @@ -59359,7 +61679,7 @@ var AnimationManager = new Class({ * @param {string} key - The key of the animation to play on the Game Object. * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} child - The Game Objects to play the animation on. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ play: function (key, child) { @@ -59372,7 +61692,7 @@ var AnimationManager = new Class({ if (!anim) { - return; + return this; } for (var i = 0; i < child.length; i++) @@ -59384,7 +61704,10 @@ var AnimationManager = new Class({ }, /** - * Remove an animation. + * Removes an Animation from this Animation Manager, based on the given key. + * + * This is a global action. Once an Animation has been removed, no Game Objects + * can carry on using it. * * @method Phaser.Animations.AnimationManager#remove * @fires Phaser.Animations.Events#REMOVE_ANIMATION @@ -59392,7 +61715,7 @@ var AnimationManager = new Class({ * * @param {string} key - The key of the animation to remove. * - * @return {Phaser.Animations.Animation} [description] + * @return {Phaser.Animations.Animation} The Animation instance that was removed from the Animation Manager. */ remove: function (key) { @@ -59415,7 +61738,7 @@ var AnimationManager = new Class({ * @fires Phaser.Animations.Events#RESUME_ALL * @since 3.0.0 * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ resumeAll: function () { @@ -59443,7 +61766,7 @@ var AnimationManager = new Class({ * @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} children - An array of Game Objects to play the animation on. They must have an Animation Component. * @param {number} [stagger=0] - The amount of time, in milliseconds, to offset each play time by. * - * @return {Phaser.Animations.AnimationManager} This Animation Manager. + * @return {this} This Animation Manager. */ staggerPlay: function (key, children, stagger) { @@ -59458,7 +61781,7 @@ var AnimationManager = new Class({ if (!anim) { - return; + return this; } for (var i = 0; i < children.length; i++) @@ -59470,35 +61793,36 @@ var AnimationManager = new Class({ }, /** - * Get the animation data as javascript object by giving key, or get the data of all animations as array of objects, if key wasn't provided. + * Returns the Animation data as JavaScript object based on the given key. + * Or, if not key is defined, it will return the data of all animations as array of objects. * * @method Phaser.Animations.AnimationManager#toJSON * @since 3.0.0 * - * @param {string} key - [description] + * @param {string} [key] - The animation to get the JSONAnimation data from. If not provided, all animations are returned as an array. * - * @return {Phaser.Types.Animations.JSONAnimations} [description] + * @return {Phaser.Types.Animations.JSONAnimations} The resulting JSONAnimations formatted object. */ toJSON: function (key) { + var output = { + anims: [], + globalTimeScale: this.globalTimeScale + }; + if (key !== undefined && key !== '') { - return this.anims.get(key).toJSON(); + output.anims.push(this.anims.get(key).toJSON()); } else { - var output = { - anims: [], - globalTimeScale: this.globalTimeScale - }; - this.anims.each(function (animationKey, animation) { output.anims.push(animation.toJSON()); }); - - return output; } + + return output; }, /** @@ -59523,7 +61847,7 @@ module.exports = AnimationManager; /***/ }), -/* 287 */ +/* 290 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59533,9 +61857,9 @@ module.exports = AnimationManager; */ var Class = __webpack_require__(0); -var CustomMap = __webpack_require__(159); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(288); +var CustomMap = __webpack_require__(162); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(291); /** * @classdesc @@ -59588,7 +61912,7 @@ var BaseCache = new Class({ * @param {string} key - The unique key by which the data added to the cache will be referenced. * @param {*} data - The data to be stored in the cache. * - * @return {Phaser.Cache.BaseCache} This BaseCache object. + * @return {this} This BaseCache object. */ add: function (key, data) { @@ -59659,7 +61983,7 @@ var BaseCache = new Class({ * * @param {string} key - The unique key of the item to remove from the cache. * - * @return {Phaser.Cache.BaseCache} This BaseCache object. + * @return {this} This BaseCache object. */ remove: function (key) { @@ -59709,7 +62033,7 @@ module.exports = BaseCache; /***/ }), -/* 288 */ +/* 291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59724,14 +62048,14 @@ module.exports = BaseCache; module.exports = { - ADD: __webpack_require__(634), - REMOVE: __webpack_require__(635) + ADD: __webpack_require__(639), + REMOVE: __webpack_require__(640) }; /***/ }), -/* 289 */ +/* 292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59740,9 +62064,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseCache = __webpack_require__(287); +var BaseCache = __webpack_require__(290); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); /** * @classdesc @@ -59965,7 +62289,7 @@ module.exports = CacheManager; /***/ }), -/* 290 */ +/* 293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -59976,12 +62300,12 @@ module.exports = CacheManager; var BaseCamera = __webpack_require__(91); var CanvasPool = __webpack_require__(26); -var CenterOn = __webpack_require__(165); -var Clamp = __webpack_require__(22); +var CenterOn = __webpack_require__(168); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Effects = __webpack_require__(298); -var Linear = __webpack_require__(115); +var Effects = __webpack_require__(301); +var Linear = __webpack_require__(116); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -60087,6 +62411,16 @@ var Camera = new Class({ */ this.panEffect = new Effects.Pan(this); + /** + * The Camera Rotate To effect handler. + * To rotate this camera see the `Camera.rotateTo` method. + * + * @name Phaser.Cameras.Scene2D.Camera#rotateToEffect + * @type {Phaser.Cameras.Scene2D.Effects.RotateTo} + * @since 3.23.0 + */ + this.rotateToEffect = new Effects.RotateTo(this); + /** * The Camera Zoom effect handler. * To zoom this camera see the `Camera.zoom` method. @@ -60178,6 +62512,24 @@ var Camera = new Class({ */ this.renderToTexture = false; + /** + * If this Camera is rendering to a texture (via `setRenderToTexture`) then you + * have the option to control if it should also render to the Game canvas as well. + * + * By default, a Camera will render both to its texture and to the Game canvas. + * + * However, if you set ths property to `false` it will only render to the texture + * and skip rendering to the Game canvas. + * + * Setting this property if the Camera isn't rendering to a texture has no effect. + * + * @name Phaser.Cameras.Scene2D.Camera#renderToGame + * @type {boolean} + * @default true + * @since 3.23.0 + */ + this.renderToGame = true; + /** * If this Camera has been set to render to a texture then this holds a reference * to the HTML Canvas Element that the Camera is drawing to. @@ -60274,6 +62626,9 @@ var Camera = new Class({ * * You should not enable this unless you plan on actually using the texture it creates * somehow, otherwise you're just doubling the work required to render your game. + * + * If you only require the Camera to render to a texture, and not also to the Game, + * them set the `renderToGame` parameter to `false`. * * To temporarily disable rendering to a texture, toggle the `renderToTexture` boolean. * @@ -60284,11 +62639,14 @@ var Camera = new Class({ * @since 3.13.0 * * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - An optional WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. + * @param {boolean} [renderToGame=true] - If you do not need the Camera to still render to the Game, set this parameter to `false`. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ - setRenderToTexture: function (pipeline) + setRenderToTexture: function (pipeline, renderToGame) { + if (renderToGame === undefined) { renderToGame = true; } + var renderer = this.scene.sys.game.renderer; if (renderer.gl) @@ -60303,6 +62661,7 @@ var Camera = new Class({ } this.renderToTexture = true; + this.renderToGame = renderToGame; if (pipeline) { @@ -60324,7 +62683,7 @@ var Camera = new Class({ * * @param {(string|Phaser.Renderer.WebGL.WebGLPipeline)} [pipeline] - The WebGL Pipeline to render with, can be either a string which is the name of the pipeline, or a pipeline reference. Or if left empty it will clear the pipeline. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ setPipeline: function (pipeline) { @@ -60355,7 +62714,7 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#clearRenderToTexture * @since 3.13.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ clearRenderToTexture: function () { @@ -60422,7 +62781,7 @@ var Camera = new Class({ * @param {number} [width] - The width of the deadzone rectangle in pixels. If not specified the deadzone is removed. * @param {number} [height] - The height of the deadzone rectangle in pixels. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ setDeadzone: function (width, height) { @@ -60478,7 +62837,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeIn: function (duration, red, green, blue, callback, context) { @@ -60502,7 +62861,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeOut: function (duration, red, green, blue, callback, context) { @@ -60526,7 +62885,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fadeFrom: function (duration, red, green, blue, force, callback, context) { @@ -60550,7 +62909,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ fade: function (duration, red, green, blue, force, callback, context) { @@ -60574,7 +62933,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ flash: function (duration, red, green, blue, force, callback, context) { @@ -60596,7 +62955,7 @@ var Camera = new Class({ * It is sent two arguments: A reference to the camera and a progress amount between 0 and 1 indicating how complete the effect is. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ shake: function (duration, intensity, force, callback, context) { @@ -60622,13 +62981,37 @@ var Camera = new Class({ * the current camera scroll x coordinate and the current camera scroll y coordinate. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ pan: function (x, y, duration, ease, force, callback, context) { return this.panEffect.start(x, y, duration, ease, force, callback, context); }, + /** + * This effect will rotate the Camera so that the viewport finishes at the given angle in radians, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Camera#rotateTo + * @since 3.23.0 + * + * @param {number} radians - The destination angle in radians to rotate the Camera viewport to. If the angle is positive then the rotation is clockwise else anticlockwise + * @param {boolean} [shortestPath=false] - If shortest path is set to true the camera will rotate in the quickest direction clockwise or anti-clockwise. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the rotation. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the rotation effect to start immediately, even if already running. + * @param {CameraRotateCallback} [callback] - This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera rotation angle in radians. + * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + * + * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + */ + rotateTo: function (radians, shortestPath, duration, ease, force, callback, context) + { + return this.rotateToEffect.start(radians, shortestPath, duration, ease, force, callback, context); + }, + /** * This effect will zoom the Camera to the given scale, over the duration and with the ease specified. * @@ -60646,7 +63029,7 @@ var Camera = new Class({ * the current camera scroll x coordinate and the current camera scroll y coordinate. * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ zoomTo: function (zoom, duration, ease, force, callback, context) { @@ -60879,7 +63262,7 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#stopFollow * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ stopFollow: function () { @@ -60895,10 +63278,11 @@ var Camera = new Class({ * @method Phaser.Cameras.Scene2D.Camera#resetFX * @since 3.0.0 * - * @return {Phaser.Cameras.Scene2D.Camera} This Camera instance. + * @return {this} This Camera instance. */ resetFX: function () { + this.rotateToEffect.reset(); this.panEffect.reset(); this.shakeEffect.reset(); this.flashEffect.reset(); @@ -60921,6 +63305,7 @@ var Camera = new Class({ { if (this.visible) { + this.rotateToEffect.update(time, delta); this.panEffect.update(time, delta); this.zoomEffect.update(time, delta); this.shakeEffect.update(time, delta); @@ -60958,7 +63343,7 @@ module.exports = Camera; /***/ }), -/* 291 */ +/* 294 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -60967,7 +63352,7 @@ module.exports = Camera; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); /** * Converts a hex string into a Phaser Color object. @@ -61011,7 +63396,7 @@ module.exports = HexStringToColor; /***/ }), -/* 292 */ +/* 295 */ /***/ (function(module, exports) { /** @@ -61042,7 +63427,7 @@ module.exports = GetColor32; /***/ }), -/* 293 */ +/* 296 */ /***/ (function(module, exports) { /** @@ -61122,7 +63507,7 @@ module.exports = RGBToHSV; /***/ }), -/* 294 */ +/* 297 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61131,8 +63516,8 @@ module.exports = RGBToHSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); -var IntegerToRGB = __webpack_require__(295); +var Color = __webpack_require__(31); +var IntegerToRGB = __webpack_require__(298); /** * Converts the given color value into an instance of a Color object. @@ -61155,7 +63540,7 @@ module.exports = IntegerToColor; /***/ }), -/* 295 */ +/* 298 */ /***/ (function(module, exports) { /** @@ -61203,7 +63588,7 @@ module.exports = IntegerToRGB; /***/ }), -/* 296 */ +/* 299 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61212,7 +63597,7 @@ module.exports = IntegerToRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); /** * Converts an object containing `r`, `g`, `b` and `a` properties into a Color class instance. @@ -61233,7 +63618,7 @@ module.exports = ObjectToColor; /***/ }), -/* 297 */ +/* 300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61242,7 +63627,7 @@ module.exports = ObjectToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); /** * Converts a CSS 'web' string into a Phaser Color object. @@ -61279,7 +63664,7 @@ module.exports = RGBStringToColor; /***/ }), -/* 298 */ +/* 301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -61294,80 +63679,12 @@ module.exports = RGBStringToColor; module.exports = { - Fade: __webpack_require__(656), - Flash: __webpack_require__(657), - Pan: __webpack_require__(658), - Shake: __webpack_require__(691), - Zoom: __webpack_require__(692) - -}; - - -/***/ }), -/* 299 */ -/***/ (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.Back - */ - -module.exports = { - - In: __webpack_require__(659), - Out: __webpack_require__(660), - InOut: __webpack_require__(661) - -}; - - -/***/ }), -/* 300 */ -/***/ (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.Bounce - */ - -module.exports = { - - In: __webpack_require__(662), - Out: __webpack_require__(663), - InOut: __webpack_require__(664) - -}; - - -/***/ }), -/* 301 */ -/***/ (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.Circular - */ - -module.exports = { - - In: __webpack_require__(665), - Out: __webpack_require__(666), - InOut: __webpack_require__(667) + Fade: __webpack_require__(663), + Flash: __webpack_require__(664), + Pan: __webpack_require__(665), + Shake: __webpack_require__(698), + RotateTo: __webpack_require__(699), + Zoom: __webpack_require__(700) }; @@ -61383,14 +63700,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Cubic + * @namespace Phaser.Math.Easing.Back */ module.exports = { - In: __webpack_require__(668), - Out: __webpack_require__(669), - InOut: __webpack_require__(670) + In: __webpack_require__(666), + Out: __webpack_require__(667), + InOut: __webpack_require__(668) }; @@ -61406,14 +63723,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Elastic + * @namespace Phaser.Math.Easing.Bounce */ module.exports = { - In: __webpack_require__(671), - Out: __webpack_require__(672), - InOut: __webpack_require__(673) + In: __webpack_require__(669), + Out: __webpack_require__(670), + InOut: __webpack_require__(671) }; @@ -61429,14 +63746,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Expo + * @namespace Phaser.Math.Easing.Circular */ module.exports = { - In: __webpack_require__(674), - Out: __webpack_require__(675), - InOut: __webpack_require__(676) + In: __webpack_require__(672), + Out: __webpack_require__(673), + InOut: __webpack_require__(674) }; @@ -61452,10 +63769,16 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Linear + * @namespace Phaser.Math.Easing.Cubic */ -module.exports = __webpack_require__(677); +module.exports = { + + In: __webpack_require__(675), + Out: __webpack_require__(676), + InOut: __webpack_require__(677) + +}; /***/ }), @@ -61469,7 +63792,7 @@ module.exports = __webpack_require__(677); */ /** - * @namespace Phaser.Math.Easing.Quadratic + * @namespace Phaser.Math.Easing.Elastic */ module.exports = { @@ -61492,7 +63815,7 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Quartic + * @namespace Phaser.Math.Easing.Expo */ module.exports = { @@ -61514,17 +63837,7 @@ module.exports = { * @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) - -}; +module.exports = __webpack_require__(684); /***/ }), @@ -61538,14 +63851,14 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Sine + * @namespace Phaser.Math.Easing.Quadratic */ module.exports = { - In: __webpack_require__(687), - Out: __webpack_require__(688), - InOut: __webpack_require__(689) + In: __webpack_require__(685), + Out: __webpack_require__(686), + InOut: __webpack_require__(687) }; @@ -61561,16 +63874,85 @@ module.exports = { */ /** - * @namespace Phaser.Math.Easing.Stepped + * @namespace Phaser.Math.Easing.Quartic */ -module.exports = __webpack_require__(690); +module.exports = { + + In: __webpack_require__(688), + Out: __webpack_require__(689), + InOut: __webpack_require__(690) + +}; /***/ }), /* 311 */ /***/ (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__(691), + Out: __webpack_require__(692), + InOut: __webpack_require__(693) + +}; + + +/***/ }), +/* 312 */ +/***/ (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__(694), + Out: __webpack_require__(695), + InOut: __webpack_require__(696) + +}; + + +/***/ }), +/* 313 */ +/***/ (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.Stepped + */ + +module.exports = __webpack_require__(697); + + +/***/ }), +/* 314 */ +/***/ (function(module, exports, __webpack_require__) { + /** * @author Richard Davey * @copyright 2020 Photon Storm Ltd. @@ -61578,15 +63960,15 @@ module.exports = __webpack_require__(690); */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); -var Device = __webpack_require__(312); +var CONST = __webpack_require__(33); +var Device = __webpack_require__(315); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var IsPlainObject = __webpack_require__(7); -var PhaserMath = __webpack_require__(168); +var PhaserMath = __webpack_require__(170); var NOOP = __webpack_require__(1); -var DefaultPlugins = __webpack_require__(173); -var ValueToColor = __webpack_require__(161); +var DefaultPlugins = __webpack_require__(175); +var ValueToColor = __webpack_require__(164); /** * @classdesc @@ -62053,6 +64435,11 @@ var Config = new Class({ */ this.loaderTimeout = GetValue(config, 'loader.timeout', 0); + /** + * @const {boolean} Phaser.Core.Config#loaderWithCredentials - Optional XHR withCredentials value. + */ + this.loaderWithCredentials = GetValue(config, 'loader.withCredentials', false); + /* * Allows `plugins` property to either be an array, in which case it just replaces * the default plugins like previously, or a config object. @@ -62144,7 +64531,7 @@ module.exports = Config; /***/ }), -/* 312 */ +/* 315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62178,20 +64565,20 @@ module.exports = Config; module.exports = { - 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) + os: __webpack_require__(117), + browser: __webpack_require__(118), + features: __webpack_require__(169), + input: __webpack_require__(729), + audio: __webpack_require__(730), + video: __webpack_require__(731), + fullscreen: __webpack_require__(732), + canvasFeatures: __webpack_require__(316) }; /***/ }), -/* 313 */ +/* 316 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62305,7 +64692,7 @@ module.exports = init(); /***/ }), -/* 314 */ +/* 317 */ /***/ (function(module, exports) { /** @@ -62336,7 +64723,7 @@ module.exports = Between; /***/ }), -/* 315 */ +/* 318 */ /***/ (function(module, exports) { /** @@ -62373,7 +64760,39 @@ module.exports = Normalize; /***/ }), -/* 316 */ +/* 319 */ +/***/ (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; + + +/***/ }), +/* 320 */ /***/ (function(module, exports) { /** @@ -62407,7 +64826,7 @@ module.exports = DistanceSquared; /***/ }), -/* 317 */ +/* 321 */ /***/ (function(module, exports) { /** @@ -62441,7 +64860,7 @@ module.exports = GreaterThan; /***/ }), -/* 318 */ +/* 322 */ /***/ (function(module, exports) { /** @@ -62475,7 +64894,7 @@ module.exports = LessThan; /***/ }), -/* 319 */ +/* 323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62484,18 +64903,18 @@ module.exports = LessThan; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Factorial = __webpack_require__(320); +var Factorial = __webpack_require__(324); /** - * [description] + * Calculates the Bernstein basis from the three factorial coefficients. * * @function Phaser.Math.Bernstein * @since 3.0.0 * - * @param {number} n - [description] - * @param {number} i - [description] + * @param {number} n - The first value. + * @param {number} i - The second value. * - * @return {number} [description] + * @return {number} The Bernstein basis of Factorial(n) / Factorial(i) / Factorial(n - i) */ var Bernstein = function (n, i) { @@ -62506,7 +64925,7 @@ module.exports = Bernstein; /***/ }), -/* 320 */ +/* 324 */ /***/ (function(module, exports) { /** @@ -62546,7 +64965,7 @@ module.exports = Factorial; /***/ }), -/* 321 */ +/* 325 */ /***/ (function(module, exports) { /** @@ -62616,7 +65035,7 @@ module.exports = CubicBezierInterpolation; /***/ }), -/* 322 */ +/* 326 */ /***/ (function(module, exports) { /** @@ -62675,7 +65094,7 @@ module.exports = QuadraticBezierInterpolation; /***/ }), -/* 323 */ +/* 327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62684,7 +65103,7 @@ module.exports = QuadraticBezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmoothStep = __webpack_require__(158); +var SmoothStep = __webpack_require__(161); /** * A Smooth Step interpolation method. @@ -62708,7 +65127,7 @@ module.exports = SmoothStepInterpolation; /***/ }), -/* 324 */ +/* 328 */ /***/ (function(module, exports) { /** @@ -62738,7 +65157,7 @@ module.exports = GetPowerOfTwo; /***/ }), -/* 325 */ +/* 329 */ /***/ (function(module, exports) { /** @@ -62782,36 +65201,7 @@ module.exports = SnapCeil; /***/ }), -/* 326 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Generate a random floating point number between the two given bounds, minimum inclusive, maximum exclusive. - * - * @function Phaser.Math.FloatBetween - * @since 3.0.0 - * - * @param {number} min - The lower bound for the float, inclusive. - * @param {number} max - The upper bound for the float exclusive. - * - * @return {number} A random float within the given range. - */ -var FloatBetween = function (min, max) -{ - return Math.random() * (max - min) + min; -}; - -module.exports = FloatBetween; - - -/***/ }), -/* 327 */ +/* 330 */ /***/ (function(module, exports) { /** @@ -62846,7 +65236,7 @@ module.exports = Rotate; /***/ }), -/* 328 */ +/* 331 */ /***/ (function(module, exports) { /** @@ -62875,7 +65265,7 @@ module.exports = RoundAwayFromZero; /***/ }), -/* 329 */ +/* 332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -62930,7 +65320,7 @@ module.exports = TransformXY; /***/ }), -/* 330 */ +/* 333 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63475,7 +65865,7 @@ module.exports = Vector4; /***/ }), -/* 331 */ +/* 334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -63988,12 +66378,12 @@ var Matrix3 = new Class({ }, /** - * [description] + * Set the values of this Matrix3 to be normalized from the given Matrix4. * * @method Phaser.Math.Matrix3#normalFromMat4 * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} m - [description] + * @param {Phaser.Math.Matrix4} m - The Matrix4 to normalize the values from. * * @return {Phaser.Math.Matrix3} This Matrix3. */ @@ -64068,7 +66458,7 @@ module.exports = Matrix3; /***/ }), -/* 332 */ +/* 335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -64632,12 +67022,12 @@ var Matrix4 = new Class({ }, /** - * [description] + * Multiply the values of this Matrix4 by those given in the `src` argument. * * @method Phaser.Math.Matrix4#multiplyLocal * @since 3.0.0 * - * @param {Phaser.Math.Matrix4} src - [description] + * @param {Phaser.Math.Matrix4} src - The source Matrix4 that this Matrix4 is multiplied by. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -65429,9 +67819,9 @@ var Matrix4 = new Class({ * @method Phaser.Math.Matrix4#yawPitchRoll * @since 3.0.0 * - * @param {number} yaw - [description] - * @param {number} pitch - [description] - * @param {number} roll - [description] + * @param {number} yaw - The yaw value. + * @param {number} pitch - The pitch value. + * @param {number} roll - The roll value. * * @return {Phaser.Math.Matrix4} This Matrix4. */ @@ -65530,7 +67920,7 @@ module.exports = Matrix4; /***/ }), -/* 333 */ +/* 336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -65543,8 +67933,8 @@ module.exports = Matrix4; // and [vecmath](https://github.com/mattdesl/vecmath) by mattdesl var Class = __webpack_require__(0); -var Vector3 = __webpack_require__(172); -var Matrix3 = __webpack_require__(331); +var Vector3 = __webpack_require__(174); +var Matrix3 = __webpack_require__(334); var EPSILON = 0.000001; @@ -65852,13 +68242,13 @@ var Quaternion = new Class({ }, /** - * [description] + * Rotates this Quaternion based on the two given vectors. * * @method Phaser.Math.Quaternion#rotationTo * @since 3.0.0 * - * @param {Phaser.Math.Vector3} a - [description] - * @param {Phaser.Math.Vector3} b - [description] + * @param {Phaser.Math.Vector3} a - The transform rotation vector. + * @param {Phaser.Math.Vector3} b - The target rotation vector. * * @return {Phaser.Math.Quaternion} This Quaternion. */ @@ -66302,7 +68692,7 @@ module.exports = Quaternion; /***/ }), -/* 334 */ +/* 337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66311,10 +68701,10 @@ module.exports = Quaternion; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasInterpolation = __webpack_require__(335); +var CanvasInterpolation = __webpack_require__(338); var CanvasPool = __webpack_require__(26); -var CONST = __webpack_require__(29); -var Features = __webpack_require__(167); +var CONST = __webpack_require__(33); +var Features = __webpack_require__(169); /** * Called automatically by Phaser.Game and responsible for creating the renderer it will use. @@ -66404,8 +68794,8 @@ var CreateRenderer = function (game) if (true) { - CanvasRenderer = __webpack_require__(499); - WebGLRenderer = __webpack_require__(502); + CanvasRenderer = __webpack_require__(504); + WebGLRenderer = __webpack_require__(507); // Let the config pick the renderer type, as both are included if (config.renderType === CONST.WEBGL) @@ -66430,7 +68820,7 @@ module.exports = CreateRenderer; /***/ }), -/* 335 */ +/* 338 */ /***/ (function(module, exports) { /** @@ -66493,7 +68883,86 @@ module.exports = CanvasInterpolation; /***/ }), -/* 336 */ +/* 339 */ +/***/ (function(module, exports) { + +module.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'); + + +/***/ }), +/* 340 */ +/***/ (function(module, exports) { + +module.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'); + + +/***/ }), +/* 341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66502,7 +68971,7 @@ module.exports = CanvasInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(29); +var CONST = __webpack_require__(33); /** * Called automatically by Phaser.Game and responsible for creating the console.log debug header. @@ -66623,7 +69092,7 @@ module.exports = DebugHeader; /***/ }), -/* 337 */ +/* 342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -66635,7 +69104,7 @@ module.exports = DebugHeader; var Class = __webpack_require__(0); var GetValue = __webpack_require__(6); var NOOP = __webpack_require__(1); -var RequestAnimationFrame = __webpack_require__(338); +var RequestAnimationFrame = __webpack_require__(343); // http://www.testufo.com/#test=animation-time-graph @@ -67353,7 +69822,7 @@ module.exports = TimeStep; /***/ }), -/* 338 */ +/* 343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67567,7 +70036,7 @@ module.exports = RequestAnimationFrame; /***/ }), -/* 339 */ +/* 344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67576,7 +70045,7 @@ module.exports = RequestAnimationFrame; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(18); +var Events = __webpack_require__(20); /** * The Visibility Handler is responsible for listening out for document level visibility change events. @@ -67658,7 +70127,7 @@ module.exports = VisibilityHandler; /***/ }), -/* 340 */ +/* 345 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67667,19 +70136,47 @@ module.exports = VisibilityHandler; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arne16 = __webpack_require__(341); +var Arne16 = __webpack_require__(346); var CanvasPool = __webpack_require__(26); var GetValue = __webpack_require__(6); /** - * [description] + * Generates a texture based on the given Create configuration object. + * + * The texture is drawn using a fixed-size indexed palette of 16 colors, where the hex value in the + * data cells map to a single color. For example, if the texture config looked like this: + * + * ```javascript + * var star = [ + * '.....828.....', + * '....72227....', + * '....82228....', + * '...7222227...', + * '2222222222222', + * '8222222222228', + * '.72222222227.', + * '..787777787..', + * '..877777778..', + * '.78778887787.', + * '.27887.78872.', + * '.787.....787.' + * ]; + * + * this.textures.generate('star', { data: star, pixelWidth: 4 }); + * ``` + * + * Then it would generate a texture that is 52 x 48 pixels in size, because each cell of the data array + * represents 1 pixel multiplied by the `pixelWidth` value. The cell values, such as `8`, maps to color + * number 8 in the palette. If a cell contains a period character `.` then it is transparent. + * + * The default palette is Arne16, but you can specify your own using the `palette` property. * * @function Phaser.Create.GenerateTexture * @since 3.0.0 * - * @param {Phaser.Types.Create.GenerateTextureConfig} config - [description] + * @param {Phaser.Types.Create.GenerateTextureConfig} config - The Generate Texture Configuration object. * - * @return {HTMLCanvasElement} [description] + * @return {HTMLCanvasElement} An HTMLCanvasElement which contains the generated texture drawn to it. */ var GenerateTexture = function (config) { @@ -67752,7 +70249,7 @@ module.exports = GenerateTexture; /***/ }), -/* 341 */ +/* 346 */ /***/ (function(module, exports) { /** @@ -67790,7 +70287,7 @@ module.exports = { /***/ }), -/* 342 */ +/* 347 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -67802,8 +70299,8 @@ module.exports = { // 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__(321); -var Curve = __webpack_require__(80); +var CubicBezier = __webpack_require__(325); +var Curve = __webpack_require__(81); var Vector2 = __webpack_require__(3); /** @@ -68017,7 +70514,7 @@ module.exports = CubicBezierCurve; /***/ }), -/* 343 */ +/* 348 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68029,10 +70526,10 @@ module.exports = CubicBezierCurve; // 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__(80); +var Curve = __webpack_require__(81); var DegToRad = __webpack_require__(35); var GetValue = __webpack_require__(6); -var RadToDeg = __webpack_require__(171); +var RadToDeg = __webpack_require__(173); var Vector2 = __webpack_require__(3); /** @@ -68182,14 +70679,14 @@ var EllipseCurve = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.Ellipse#getResolution * @since 3.0.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -68280,7 +70777,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The horizontal radius of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setXRadius: function (value) { @@ -68297,7 +70794,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The vertical radius of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setYRadius: function (value) { @@ -68314,7 +70811,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The width of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setWidth: function (value) { @@ -68331,7 +70828,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The height of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setHeight: function (value) { @@ -68348,7 +70845,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The start angle of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setStartAngle: function (value) { @@ -68365,7 +70862,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The end angle of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setEndAngle: function (value) { @@ -68382,7 +70879,7 @@ var EllipseCurve = new Class({ * * @param {boolean} value - The clockwise state of this curve. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setClockwise: function (value) { @@ -68399,7 +70896,7 @@ var EllipseCurve = new Class({ * * @param {number} value - The rotation of this curve, in radians. * - * @return {Phaser.Curves.Ellipse} This curve object. + * @return {this} This curve object. */ setRotation: function (value) { @@ -68641,7 +71138,7 @@ module.exports = EllipseCurve; /***/ }), -/* 344 */ +/* 349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68653,8 +71150,8 @@ module.exports = EllipseCurve; // 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__(80); -var FromPoints = __webpack_require__(174); +var Curve = __webpack_require__(81); +var FromPoints = __webpack_require__(176); var Rectangle = __webpack_require__(11); var Vector2 = __webpack_require__(3); @@ -68840,19 +71337,17 @@ var LineCurve = new Class({ return tangent.normalize(); }, - // Override default Curve.getUtoTmapping - /** - * [description] + * Given u ( 0 .. 1 ), get a t to find p. This gives you points which are equidistant. * * @method Phaser.Curves.Line#getUtoTmapping * @since 3.0.0 * - * @param {number} u - [description] - * @param {integer} distance - [description] - * @param {integer} [divisions] - [description] + * @param {number} u - A float between 0 and 1. + * @param {integer} distance - The distance, in pixels. + * @param {integer} [divisions] - Optional amount of divisions. * - * @return {number} [description] + * @return {number} The equidistant value. */ getUtoTmapping: function (u, distance, divisions) { @@ -68946,7 +71441,7 @@ module.exports = LineCurve; /***/ }), -/* 345 */ +/* 350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -68956,13 +71451,13 @@ module.exports = LineCurve; */ var Class = __webpack_require__(0); -var Curve = __webpack_require__(80); -var QuadraticBezierInterpolation = __webpack_require__(322); +var Curve = __webpack_require__(81); +var QuadraticBezierInterpolation = __webpack_require__(326); var Vector2 = __webpack_require__(3); /** * @classdesc - * [description] + * A quadratic Bézier curve constructed from two control points. * * @class QuadraticBezier * @extends Phaser.Curves.Curve @@ -68992,7 +71487,7 @@ var QuadraticBezier = new Class({ } /** - * [description] + * The start point. * * @name Phaser.Curves.QuadraticBezier#p0 * @type {Phaser.Math.Vector2} @@ -69001,7 +71496,7 @@ var QuadraticBezier = new Class({ this.p0 = p0; /** - * [description] + * The first control point. * * @name Phaser.Curves.QuadraticBezier#p1 * @type {Phaser.Math.Vector2} @@ -69010,7 +71505,7 @@ var QuadraticBezier = new Class({ this.p1 = p1; /** - * [description] + * The second control point. * * @name Phaser.Curves.QuadraticBezier#p2 * @type {Phaser.Math.Vector2} @@ -69039,14 +71534,14 @@ var QuadraticBezier = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.QuadraticBezier#getResolution * @since 3.2.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -69081,7 +71576,10 @@ var QuadraticBezier = new Class({ }, /** - * [description] + * Draws this curve on the given Graphics object. + * + * The curve is drawn using `Graphics.strokePoints` so will be drawn at whatever the present Graphics stroke color is. + * The Graphics object is not cleared before the draw, so the curve will appear on-top of anything else already rendered to it. * * @method Phaser.Curves.QuadraticBezier#draw * @since 3.2.0 @@ -69160,7 +71658,7 @@ module.exports = QuadraticBezier; /***/ }), -/* 346 */ +/* 351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69171,9 +71669,9 @@ module.exports = QuadraticBezier; // Based on the three.js Curve classes created by [zz85](http://www.lab4games.net/zz85/blog) -var CatmullRom = __webpack_require__(169); +var CatmullRom = __webpack_require__(171); var Class = __webpack_require__(0); -var Curve = __webpack_require__(80); +var Curve = __webpack_require__(81); var Vector2 = __webpack_require__(3); /** @@ -69221,7 +71719,7 @@ var SplineCurve = new Class({ * * @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - The points that configure the curve. * - * @return {Phaser.Curves.Spline} This curve object. + * @return {this} This curve object. */ addPoints: function (points) { @@ -69293,14 +71791,14 @@ var SplineCurve = new Class({ }, /** - * [description] + * Get the resolution of the curve. * * @method Phaser.Curves.Spline#getResolution * @since 3.0.0 * - * @param {number} divisions - [description] + * @param {number} divisions - Optional divisions value. * - * @return {number} [description] + * @return {number} The curve resolution. */ getResolution: function (divisions) { @@ -69385,7 +71883,7 @@ module.exports = SplineCurve; /***/ }), -/* 347 */ +/* 352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69509,7 +72007,7 @@ module.exports = BaseShader; /***/ }), -/* 348 */ +/* 353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69518,32 +72016,32 @@ module.exports = BaseShader; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); -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); +Color.ColorToRGBA = __webpack_require__(809); +Color.ComponentToHex = __webpack_require__(354); +Color.GetColor = __webpack_require__(165); +Color.GetColor32 = __webpack_require__(295); +Color.HexStringToColor = __webpack_require__(294); +Color.HSLToColor = __webpack_require__(810); +Color.HSVColorWheel = __webpack_require__(811); +Color.HSVToRGB = __webpack_require__(166); +Color.HueToComponent = __webpack_require__(355); +Color.IntegerToColor = __webpack_require__(297); +Color.IntegerToRGB = __webpack_require__(298); +Color.Interpolate = __webpack_require__(812); +Color.ObjectToColor = __webpack_require__(299); +Color.RandomRGB = __webpack_require__(813); +Color.RGBStringToColor = __webpack_require__(300); +Color.RGBToHSV = __webpack_require__(296); +Color.RGBToString = __webpack_require__(814); +Color.ValueToColor = __webpack_require__(164); module.exports = Color; /***/ }), -/* 349 */ +/* 354 */ /***/ (function(module, exports) { /** @@ -69573,7 +72071,7 @@ module.exports = ComponentToHex; /***/ }), -/* 350 */ +/* 355 */ /***/ (function(module, exports) { /** @@ -69629,7 +72127,7 @@ module.exports = HueToComponent; /***/ }), -/* 351 */ +/* 356 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69638,7 +72136,7 @@ module.exports = HueToComponent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var OS = __webpack_require__(116); +var OS = __webpack_require__(117); /** * @callback ContentLoadedCallback @@ -69692,7 +72190,7 @@ module.exports = DOMContentLoaded; /***/ }), -/* 352 */ +/* 357 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -69701,7 +72199,7 @@ module.exports = DOMContentLoaded; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(175); +var CONST = __webpack_require__(177); /** * Attempts to determine the screen orientation using the Orientation API. @@ -69758,7 +72256,7 @@ module.exports = GetScreenOrientation; /***/ }), -/* 353 */ +/* 358 */ /***/ (function(module, exports) { /** @@ -69844,7 +72342,7 @@ module.exports = { /***/ }), -/* 354 */ +/* 359 */ /***/ (function(module, exports) { /** @@ -69897,7 +72395,7 @@ module.exports = { /***/ }), -/* 355 */ +/* 360 */ /***/ (function(module, exports) { /** @@ -69995,7 +72493,7 @@ module.exports = { /***/ }), -/* 356 */ +/* 361 */ /***/ (function(module, exports) { /** @@ -70069,7 +72567,7 @@ module.exports = { /***/ }), -/* 357 */ +/* 362 */ /***/ (function(module, exports) { /** @@ -70120,7 +72618,7 @@ module.exports = GetTarget; /***/ }), -/* 358 */ +/* 363 */ /***/ (function(module, exports) { /** @@ -70177,7 +72675,7 @@ module.exports = ParseXML; /***/ }), -/* 359 */ +/* 364 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -70187,16 +72685,16 @@ module.exports = ParseXML; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(177); -var EventEmitter = __webpack_require__(9); +var CONST = __webpack_require__(179); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(54); -var GameEvents = __webpack_require__(18); -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__(329); +var GameEvents = __webpack_require__(20); +var Keyboard = __webpack_require__(365); +var Mouse = __webpack_require__(366); +var Pointer = __webpack_require__(367); +var Touch = __webpack_require__(368); +var TransformMatrix = __webpack_require__(29); +var TransformXY = __webpack_require__(332); /** * @classdesc @@ -71259,7 +73757,7 @@ module.exports = InputManager; /***/ }), -/* 360 */ +/* 365 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71268,11 +73766,11 @@ module.exports = InputManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(121); +var ArrayRemove = __webpack_require__(123); var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(18); +var GameEvents = __webpack_require__(20); var InputEvents = __webpack_require__(54); -var KeyCodes = __webpack_require__(122); +var KeyCodes = __webpack_require__(124); var NOOP = __webpack_require__(0); /** @@ -71709,7 +74207,7 @@ module.exports = KeyboardManager; /***/ }), -/* 361 */ +/* 366 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -71719,7 +74217,7 @@ module.exports = KeyboardManager; */ var Class = __webpack_require__(0); -var Features = __webpack_require__(167); +var Features = __webpack_require__(169); var InputEvents = __webpack_require__(54); var NOOP = __webpack_require__(0); @@ -71945,7 +74443,7 @@ var MouseManager = new Class({ * @method Phaser.Input.Mouse.MouseManager#disableContextMenu * @since 3.0.0 * - * @return {Phaser.Input.Mouse.MouseManager} This Mouse Manager instance. + * @return {this} This Mouse Manager instance. */ disableContextMenu: function () { @@ -72195,7 +74693,7 @@ module.exports = MouseManager; /***/ }), -/* 362 */ +/* 367 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -72204,11 +74702,11 @@ module.exports = MouseManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Angle = __webpack_require__(314); +var Angle = __webpack_require__(317); var Class = __webpack_require__(0); var Distance = __webpack_require__(53); -var FuzzyEqual = __webpack_require__(144); -var SmoothStepInterpolation = __webpack_require__(323); +var FuzzyEqual = __webpack_require__(106); +var SmoothStepInterpolation = __webpack_require__(327); var Vector2 = __webpack_require__(3); /** @@ -73473,7 +75971,7 @@ module.exports = Pointer; /***/ }), -/* 363 */ +/* 368 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73685,7 +76183,7 @@ var TouchManager = new Class({ * @method Phaser.Input.Touch.TouchManager#disableContextMenu * @since 3.20.0 * - * @return {Phaser.Input.Touch.TouchManager} This Touch Manager instance. + * @return {this} This Touch Manager instance. */ disableContextMenu: function () { @@ -73886,7 +76384,7 @@ module.exports = TouchManager; /***/ }), -/* 364 */ +/* 369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -73896,14 +76394,14 @@ module.exports = TouchManager; */ var Class = __webpack_require__(0); -var GameEvents = __webpack_require__(18); -var EventEmitter = __webpack_require__(9); +var GameEvents = __webpack_require__(20); +var EventEmitter = __webpack_require__(10); var FileTypesManager = __webpack_require__(8); var GameObjectCreator = __webpack_require__(16); var GameObjectFactory = __webpack_require__(5); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var Remove = __webpack_require__(121); +var Remove = __webpack_require__(123); /** * @classdesc @@ -74511,7 +77009,7 @@ var PluginManager = new Class({ * * @param {string} key - The key of the plugin to stop. * - * @return {Phaser.Plugins.PluginManager} The Plugin Manager. + * @return {this} The Plugin Manager. */ stop: function (key) { @@ -74788,7 +77286,7 @@ module.exports = PluginManager; /***/ }), -/* 365 */ +/* 370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -74797,17 +77295,17 @@ module.exports = PluginManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(175); +var CONST = __webpack_require__(177); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Events = __webpack_require__(92); -var GameEvents = __webpack_require__(18); -var GetInnerHeight = __webpack_require__(860); -var GetTarget = __webpack_require__(357); -var GetScreenOrientation = __webpack_require__(352); +var GameEvents = __webpack_require__(20); +var GetInnerHeight = __webpack_require__(867); +var GetTarget = __webpack_require__(362); +var GetScreenOrientation = __webpack_require__(357); var NOOP = __webpack_require__(1); var Rectangle = __webpack_require__(11); -var Size = __webpack_require__(366); +var Size = __webpack_require__(371); var SnapFloor = __webpack_require__(93); var Vector2 = __webpack_require__(3); @@ -75490,7 +77988,7 @@ var ScaleManager = new Class({ if (lock) { - return lock(orientation); + return lock.call(screen, orientation); } return false; @@ -75561,8 +78059,8 @@ var ScaleManager = new Class({ } // The size used for the canvas style, factoring in the scale mode and parent and zoom value - // We just use the w/h here as this is what sets the aspect ratio (which doesn't then change) - this.displaySize.setSize(width, height); + // Update the aspect ratio + this.displaySize.setAspectRatio(width / height); this.canvas.width = this.baseSize.width; this.canvas.height = this.baseSize.height; @@ -76505,7 +79003,7 @@ module.exports = ScaleManager; /***/ }), -/* 366 */ +/* 371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -76514,7 +79012,7 @@ module.exports = ScaleManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); var SnapFloor = __webpack_require__(93); var Vector2 = __webpack_require__(3); @@ -77283,7 +79781,7 @@ module.exports = Size; /***/ }), -/* 367 */ +/* 372 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -77293,14 +79791,14 @@ module.exports = Size; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(123); -var Events = __webpack_require__(19); -var GameEvents = __webpack_require__(18); +var CONST = __webpack_require__(125); +var Events = __webpack_require__(22); +var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); -var LoaderEvents = __webpack_require__(81); +var LoaderEvents = __webpack_require__(82); var NOOP = __webpack_require__(1); -var Scene = __webpack_require__(368); -var Systems = __webpack_require__(178); +var Scene = __webpack_require__(373); +var Systems = __webpack_require__(180); /** * @classdesc @@ -77740,6 +80238,8 @@ var SceneManager = new Class({ var sys = scene.sys; var settings = sys.settings; + sys.sceneUpdate = NOOP; + if (scene.init) { scene.init.call(scene, settings.data); @@ -78923,7 +81423,7 @@ module.exports = SceneManager; /***/ }), -/* 368 */ +/* 373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -78933,7 +81433,7 @@ module.exports = SceneManager; */ var Class = __webpack_require__(0); -var Systems = __webpack_require__(178); +var Systems = __webpack_require__(180); /** * @classdesc @@ -79153,16 +81653,6 @@ var Scene = new Class({ */ this.physics; - /** - * 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. - * - * @name Phaser.Scene#impact - * @type {Phaser.Physics.Impact.ImpactPhysics} - * @since 3.0.0 - */ - this.impact; - /** * 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. @@ -79219,7 +81709,7 @@ module.exports = Scene; /***/ }), -/* 369 */ +/* 374 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79228,10 +81718,10 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(123); +var CONST = __webpack_require__(125); var GetValue = __webpack_require__(6); -var Merge = __webpack_require__(107); -var InjectionMap = __webpack_require__(873); +var Merge = __webpack_require__(126); +var InjectionMap = __webpack_require__(880); /** * @namespace Phaser.Scenes.Settings @@ -79315,7 +81805,7 @@ module.exports = Settings; /***/ }), -/* 370 */ +/* 375 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -79325,17 +81815,17 @@ module.exports = Settings; */ var CanvasPool = __webpack_require__(26); -var CanvasTexture = __webpack_require__(371); +var CanvasTexture = __webpack_require__(376); var Class = __webpack_require__(0); -var Color = __webpack_require__(33); -var CONST = __webpack_require__(29); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(119); -var GameEvents = __webpack_require__(18); -var GenerateTexture = __webpack_require__(340); +var Color = __webpack_require__(31); +var CONST = __webpack_require__(33); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(121); +var GameEvents = __webpack_require__(20); +var GenerateTexture = __webpack_require__(345); var GetValue = __webpack_require__(6); -var Parser = __webpack_require__(373); -var Texture = __webpack_require__(180); +var Parser = __webpack_require__(378); +var Texture = __webpack_require__(182); /** * @callback EachTextureCallback @@ -79619,8 +82109,8 @@ var TextureManager = new Class({ * * @param {string} key - The unique string-based key of the Texture. * @param {(string|integer)} [frame] - The string-based name, or integer based index, of the Frame to get from the Texture. - * @param {string} [type='image/png'] - [description] - * @param {number} [encoderOptions=0.92] - [description] + * @param {string} [type='image/png'] - A DOMString indicating the image format. The default format type is image/png. + * @param {number} [encoderOptions=0.92] - A Number between 0 and 1 indicating the image quality to use for image formats that use lossy compression such as image/jpeg and image/webp. If this argument is anything else, the default value for image quality is used. The default value is 0.92. Other arguments are ignored. * * @return {string} The base64 encoded data, or an empty string if the texture frame could not be found. */ @@ -79763,14 +82253,44 @@ var TextureManager = new Class({ /** * Creates a new Texture using the given config values. + * * Generated textures consist of a Canvas element to which the texture data is drawn. - * See the Phaser.Create function for the more direct way to create textures. + * + * Generates a texture based on the given Create configuration object. + * + * The texture is drawn using a fixed-size indexed palette of 16 colors, where the hex value in the + * data cells map to a single color. For example, if the texture config looked like this: + * + * ```javascript + * var star = [ + * '.....828.....', + * '....72227....', + * '....82228....', + * '...7222227...', + * '2222222222222', + * '8222222222228', + * '.72222222227.', + * '..787777787..', + * '..877777778..', + * '.78778887787.', + * '.27887.78872.', + * '.787.....787.' + * ]; + * + * this.textures.generate('star', { data: star, pixelWidth: 4 }); + * ``` + * + * Then it would generate a texture that is 52 x 48 pixels in size, because each cell of the data array + * represents 1 pixel multiplied by the `pixelWidth` value. The cell values, such as `8`, maps to color + * number 8 in the palette. If a cell contains a period character `.` then it is transparent. + * + * The default palette is Arne16, but you can specify your own using the `palette` property. * * @method Phaser.Textures.TextureManager#generate * @since 3.0.0 * * @param {string} key - The unique string-based key of the Texture. - * @param {object} config - The configuration object needed to generate the texture. + * @param {Phaser.Types.Create.GenerateTextureConfig} config - The configuration object needed to generate the texture. * * @return {?Phaser.Textures.Texture} The Texture that was created, or `null` if the key is already in use. */ @@ -80487,7 +83007,7 @@ module.exports = TextureManager; /***/ }), -/* 371 */ +/* 376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -80497,11 +83017,11 @@ module.exports = TextureManager; */ var Class = __webpack_require__(0); -var Clamp = __webpack_require__(22); -var Color = __webpack_require__(33); -var CONST = __webpack_require__(29); -var IsSizePowerOfTwo = __webpack_require__(118); -var Texture = __webpack_require__(180); +var Clamp = __webpack_require__(19); +var Color = __webpack_require__(31); +var CONST = __webpack_require__(33); +var IsSizePowerOfTwo = __webpack_require__(120); +var Texture = __webpack_require__(182); /** * @classdesc @@ -80920,7 +83440,7 @@ var CanvasTexture = new Class({ * @param {integer} [width] - The width of the region to get. Must be an integer. Defaults to the canvas width if not given. * @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`. * - * @return {Phaser.Types.Textures.PixelConfig[]} An array of Pixel objects. + * @return {Phaser.Types.Textures.PixelConfig[][]} A 2d array of Pixel objects. */ getPixels: function (x, y, width, height) { @@ -81087,6 +83607,10 @@ var CanvasTexture = new Class({ // Update the Frame this.frames['__BASE'].setSize(width, height, 0, 0); + // Update this + this.width = width; + this.height = height; + this.refresh(); } @@ -81118,7 +83642,7 @@ module.exports = CanvasTexture; /***/ }), -/* 372 */ +/* 377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81129,8 +83653,8 @@ module.exports = CanvasTexture; var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var IsSizePowerOfTwo = __webpack_require__(118); -var ScaleModes = __webpack_require__(231); +var IsSizePowerOfTwo = __webpack_require__(120); +var ScaleModes = __webpack_require__(234); /** * @classdesc @@ -81459,7 +83983,7 @@ module.exports = TextureSource; /***/ }), -/* 373 */ +/* 378 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81474,20 +83998,20 @@ module.exports = TextureSource; module.exports = { - 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) + AtlasXML: __webpack_require__(881), + Canvas: __webpack_require__(882), + Image: __webpack_require__(883), + JSONArray: __webpack_require__(884), + JSONHash: __webpack_require__(885), + SpriteSheet: __webpack_require__(886), + SpriteSheetFromAtlas: __webpack_require__(887), + UnityYAML: __webpack_require__(888) }; /***/ }), -/* 374 */ +/* 379 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81497,9 +84021,9 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HTML5AudioSoundManager = __webpack_require__(375); -var NoAudioSoundManager = __webpack_require__(377); -var WebAudioSoundManager = __webpack_require__(379); +var HTML5AudioSoundManager = __webpack_require__(380); +var NoAudioSoundManager = __webpack_require__(384); +var WebAudioSoundManager = __webpack_require__(386); /** * Creates a Web Audio, HTML5 Audio or No Audio Sound Manager based on config and device settings. @@ -81539,7 +84063,7 @@ module.exports = SoundManagerCreator; /***/ }), -/* 375 */ +/* 380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -81549,23 +84073,27 @@ module.exports = SoundManagerCreator; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(124); +var BaseSoundManager = __webpack_require__(127); var Class = __webpack_require__(0); var Events = __webpack_require__(59); -var HTML5AudioSound = __webpack_require__(376); +var HTML5AudioSound = __webpack_require__(383); /** * HTML5 Audio implementation of the Sound Manager. - * - * Note: To play multiple instances of the same HTML5 Audio sound, you need to provide an `instances` value when + * + * To play multiple instances of the same HTML5 Audio sound, you need to provide an `instances` value when * loading the sound with the Loader: - * + * * ```javascript * this.load.audio('explosion', 'explosion.mp3', { * instances: 2 * }); * ``` * + * Not all browsers can play all audio formats. + * + * There is a good guide to what's supported: [Cross-browser audio basics: Audio codec support](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). + * * @class HTML5AudioSoundManager * @extends Phaser.Sound.BaseSoundManager * @memberof Phaser.Sound @@ -82004,7 +84532,128 @@ module.exports = HTML5AudioSoundManager; /***/ }), -/* 376 */ +/* 381 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(68); + +/** + * Returns all elements in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return only elements that have their visible property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only + * the first 50 elements. + * + * @function Phaser.Utils.Array.GetAll + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex] - An optional start index to search from. + * @param {integer} [endIndex] - An optional end index to search to. + * + * @return {array} All matching elements from the array. + */ +var GetAll = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + var output = []; + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + output.push(child); + } + } + } + + return output; +}; + +module.exports = GetAll; + + +/***/ }), +/* 382 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var SafeRange = __webpack_require__(68); + +/** + * Returns the first element in the array. + * + * You can optionally specify a matching criteria using the `property` and `value` arguments. + * + * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. + * + * Optionally you can specify a start and end index. For example if the array had 100 elements, + * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. + * + * @function Phaser.Utils.Array.GetFirst + * @since 3.4.0 + * + * @param {array} array - The array to search. + * @param {string} [property] - The property to test on each array element. + * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. + * @param {integer} [startIndex=0] - An optional start index to search from. + * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) + * + * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. + */ +var GetFirst = function (array, property, value, startIndex, endIndex) +{ + if (startIndex === undefined) { startIndex = 0; } + if (endIndex === undefined) { endIndex = array.length; } + + if (SafeRange(array, startIndex, endIndex)) + { + for (var i = startIndex; i < endIndex; i++) + { + var child = array[i]; + + if (!property || + (property && value === undefined && child.hasOwnProperty(property)) || + (property && value !== undefined && child[property] === value)) + { + return child; + } + } + } + + return null; +}; + +module.exports = GetFirst; + + +/***/ }), +/* 383 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82014,9 +84663,10 @@ module.exports = HTML5AudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(125); +var BaseSound = __webpack_require__(128); var Class = __webpack_require__(0); var Events = __webpack_require__(59); +var Clamp = __webpack_require__(19); /** * @classdesc @@ -82561,7 +85211,7 @@ var HTML5AudioSound = new Class({ { if (this.audio) { - this.audio.volume = this.currentConfig.volume * this.manager.volume; + this.audio.volume = Clamp(this.currentConfig.volume * this.manager.volume, 0, 1); } }, @@ -82929,7 +85579,7 @@ module.exports = HTML5AudioSound; /***/ }), -/* 377 */ +/* 384 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -82939,18 +85589,18 @@ module.exports = HTML5AudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSoundManager = __webpack_require__(124); +var BaseSoundManager = __webpack_require__(127); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var NoAudioSound = __webpack_require__(378); +var EventEmitter = __webpack_require__(10); +var NoAudioSound = __webpack_require__(385); var NOOP = __webpack_require__(1); /** * @classdesc - * No audio implementation of the sound manager. It is used if audio has been + * No-audio implementation of the Sound Manager. It is used if audio has been * disabled in the game config or the device doesn't support any audio. * - * It represents a graceful degradation of sound manager logic that provides + * It represents a graceful degradation of Sound Manager logic that provides * minimal functionality and prevents Phaser projects that use audio from * breaking on devices that don't support any audio playback technologies. * @@ -83047,7 +85697,7 @@ module.exports = NoAudioSoundManager; /***/ }), -/* 378 */ +/* 385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83057,10 +85707,25 @@ module.exports = NoAudioSoundManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(125); +var BaseSound = __webpack_require__(128); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Extend = __webpack_require__(17); +var EventEmitter = __webpack_require__(10); +var Extend = __webpack_require__(18); + +var returnFalse = function () +{ + return false; +}; + +var returnNull = function () +{ + return null; +}; + +var returnThis = function () +{ + return this; +}; /** * @classdesc @@ -83072,7 +85737,6 @@ var Extend = __webpack_require__(17); * breaking on devices that don't support any audio playback technologies. * * @class NoAudioSound - * @extends Phaser.Sound.BaseSound * @memberof Phaser.Sound * @constructor * @since 3.0.0 @@ -83123,58 +85787,108 @@ var NoAudioSound = new Class({ this.pendingRemove = false; }, + /** + * @method Phaser.Sound.NoAudioSound#addMarker + * @since 3.0.0 + * + * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object. + * + * @return {boolean} false + */ // eslint-disable-next-line no-unused-vars - addMarker: function (marker) - { - return false; - }, + addMarker: returnFalse, + /** + * @method Phaser.Sound.NoAudioSound#updateMarker + * @since 3.0.0 + * + * @param {Phaser.Types.Sound.SoundMarker} marker - Marker object with updated values. + * + * @return {boolean} false + */ // eslint-disable-next-line no-unused-vars - updateMarker: function (marker) - { - return false; - }, + updateMarker: returnFalse, - // eslint-disable-next-line no-unused-vars - removeMarker: function (markerName) - { - return null; - }, + /** + * @method Phaser.Sound.NoAudioSound#removeMarker + * @since 3.0.0 + * + * @param {string} markerName - The name of the marker to remove. + * + * @return {null} null + */ + removeMarker: returnNull, - // eslint-disable-next-line no-unused-vars - play: function (markerName, config) - { - return false; - }, + /** + * @method Phaser.Sound.NoAudioSound#play + * @since 3.0.0 + * + * @param {(string|Phaser.Types.Sound.SoundConfig)} [markerName=''] - If you want to play a marker then provide the marker name here. Alternatively, this parameter can be a SoundConfig object. + * @param {Phaser.Types.Sound.SoundConfig} [config] - Optional sound config object to be applied to this marker or entire sound if no marker name is provided. It gets memorized for future plays of current section of the sound. + * + * @return {boolean} false + */ + play: returnFalse, - pause: function () - { - return false; - }, + /** + * @method Phaser.Sound.NoAudioSound#pause + * @since 3.0.0 + * + * @return {boolean} false + */ + pause: returnFalse, - resume: function () - { - return false; - }, + /** + * Resumes the sound. + * + * @method Phaser.Sound.NoAudioSound#resume + * @since 3.0.0 + * + * @return {boolean} false + */ + resume: returnFalse, - stop: function () - { - return false; - }, + /** + * Stop playing this sound. + * + * @method Phaser.Sound.NoAudioSound#stop + * @since 3.0.0 + * + * @return {boolean} false + */ + stop: returnFalse, + /** + * Destroys this sound and all associated events and marks it for removal from the sound manager. + * + * @method Phaser.Sound.NoAudioSound#destroy + * @fires Phaser.Sound.Events#DESTROY + * @since 3.0.0 + */ destroy: function () { - this.manager.remove(this); - BaseSound.prototype.destroy.call(this); - } + }, + + setMute: returnThis, + + setVolume: returnThis, + + setRate: returnThis, + + setDetune: returnThis, + + setSeek: returnThis, + + setLoop: returnThis + }); module.exports = NoAudioSound; /***/ }), -/* 379 */ +/* 386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83184,15 +85898,19 @@ module.exports = NoAudioSound; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64ToArrayBuffer = __webpack_require__(380); -var BaseSoundManager = __webpack_require__(124); +var Base64ToArrayBuffer = __webpack_require__(387); +var BaseSoundManager = __webpack_require__(127); var Class = __webpack_require__(0); var Events = __webpack_require__(59); -var WebAudioSound = __webpack_require__(381); +var WebAudioSound = __webpack_require__(388); /** * @classdesc - * Web Audio API implementation of the sound manager. + * Web Audio API implementation of the Sound Manager. + * + * Not all browsers can play all audio formats. + * + * There is a good guide to what's supported: [Cross-browser audio basics: Audio codec support](https://developer.mozilla.org/en-US/Apps/Fundamentals/Audio_and_video_delivery/Cross-browser_audio_basics#Audio_Codec_Support). * * @class WebAudioSoundManager * @extends Phaser.Sound.BaseSoundManager @@ -83296,7 +86014,7 @@ var WebAudioSoundManager = new Class({ /** * This method takes a new AudioContext reference and then sets * this Sound Manager to use that context for all playback. - * + * * As part of this call it also disconnects the master mute and volume * nodes and then re-creates them on the new given context. * @@ -83359,16 +86077,16 @@ var WebAudioSoundManager = new Class({ /** * Decode audio data into a format ready for playback via Web Audio. - * + * * The audio data can be a base64 encoded string, an audio media-type data uri, or an ArrayBuffer instance. - * + * * The `audioKey` is the key that will be used to save the decoded audio to the audio cache. - * + * * Instead of passing a single entry you can instead pass an array of `Phaser.Types.Sound.DecodeAudioConfig` * objects as the first and only argument. - * + * * Decoding is an async process, so be sure to listen for the events to know when decoding has completed. - * + * * Once the audio has decoded it can be added to the Sound Manager or played via its key. * * @method Phaser.Sound.WebAudioSoundManager#decodeAudio @@ -83410,7 +86128,7 @@ var WebAudioSoundManager = new Class({ var success = function (key, audioBuffer) { cache.add(key, audioBuffer); - + this.emit(Events.DECODED, key); remaining--; @@ -83420,7 +86138,7 @@ var WebAudioSoundManager = new Class({ this.emit(Events.DECODED_ALL); } }.bind(this, key); - + var failure = function (key, error) { // eslint-disable-next-line no-console @@ -83462,7 +86180,7 @@ var WebAudioSoundManager = new Class({ body.removeEventListener('touchend', unlockHandler); body.removeEventListener('click', unlockHandler); body.removeEventListener('keydown', unlockHandler); - + _this.unlocked = true; }, function () { @@ -83633,7 +86351,7 @@ module.exports = WebAudioSoundManager; /***/ }), -/* 380 */ +/* 387 */ /***/ (function(module, exports) { /** @@ -83708,7 +86426,7 @@ module.exports = Base64ToArrayBuffer; /***/ }), -/* 381 */ +/* 388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -83718,7 +86436,7 @@ module.exports = Base64ToArrayBuffer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseSound = __webpack_require__(125); +var BaseSound = __webpack_require__(128); var Class = __webpack_require__(0); var Events = __webpack_require__(59); @@ -84614,7 +87332,7 @@ module.exports = WebAudioSound; /***/ }), -/* 382 */ +/* 389 */ /***/ (function(module, exports) { /** @@ -84662,7 +87380,7 @@ module.exports = TransposeMatrix; /***/ }), -/* 383 */ +/* 390 */ /***/ (function(module, exports) { /** @@ -84784,7 +87502,7 @@ module.exports = QuickSelect; /***/ }), -/* 384 */ +/* 391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84922,7 +87640,7 @@ module.exports = Range; /***/ }), -/* 385 */ +/* 392 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -84931,7 +87649,7 @@ module.exports = Range; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Adds an Animation component to a Sprite and populates it based on the given config. @@ -85011,7 +87729,7 @@ module.exports = BuildGameObjectAnimation; /***/ }), -/* 386 */ +/* 393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85053,7 +87771,7 @@ module.exports = Union; /***/ }), -/* 387 */ +/* 394 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -85064,12 +87782,12 @@ module.exports = Union; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DOMElementRender = __webpack_require__(950); -var GameObject = __webpack_require__(14); +var DOMElementRender = __webpack_require__(955); +var GameObject = __webpack_require__(13); var IsPlainObject = __webpack_require__(7); -var RemoveFromDOM = __webpack_require__(176); -var SCENE_EVENTS = __webpack_require__(19); -var Vector4 = __webpack_require__(330); +var RemoveFromDOM = __webpack_require__(178); +var SCENE_EVENTS = __webpack_require__(22); +var Vector4 = __webpack_require__(333); /** * @classdesc @@ -86027,7 +88745,7 @@ module.exports = DOMElement; /***/ }), -/* 388 */ +/* 395 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86036,8 +88754,8 @@ module.exports = DOMElement; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CSSBlendModes = __webpack_require__(951); -var GameObject = __webpack_require__(14); +var CSSBlendModes = __webpack_require__(956); +var GameObject = __webpack_require__(13); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -86149,7 +88867,7 @@ module.exports = DOMElementCSSRenderer; /***/ }), -/* 389 */ +/* 396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86160,8 +88878,8 @@ module.exports = DOMElementCSSRenderer; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameObject = __webpack_require__(14); -var ExternRender = __webpack_require__(955); +var GameObject = __webpack_require__(13); +var ExternRender = __webpack_require__(960); /** * @classdesc @@ -86245,7 +88963,7 @@ module.exports = Extern; /***/ }), -/* 390 */ +/* 397 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86254,9 +88972,9 @@ module.exports = Extern; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CircumferencePoint = __webpack_require__(191); +var CircumferencePoint = __webpack_require__(193); var FromPercent = __webpack_require__(87); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Point = __webpack_require__(4); /** @@ -86288,7 +89006,7 @@ module.exports = GetPoint; /***/ }), -/* 391 */ +/* 398 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86297,10 +89015,10 @@ module.exports = GetPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Circumference = __webpack_require__(392); -var CircumferencePoint = __webpack_require__(191); +var Circumference = __webpack_require__(399); +var CircumferencePoint = __webpack_require__(193); var FromPercent = __webpack_require__(87); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * Returns an array of Point objects containing the coordinates of the points around the circumference of the Ellipse, @@ -86323,7 +89041,7 @@ var GetPoints = function (ellipse, quantity, stepRate, out) if (out === undefined) { out = []; } // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = Circumference(ellipse) / stepRate; } @@ -86342,7 +89060,7 @@ module.exports = GetPoints; /***/ }), -/* 392 */ +/* 399 */ /***/ (function(module, exports) { /** @@ -86374,7 +89092,7 @@ module.exports = Circumference; /***/ }), -/* 393 */ +/* 400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86383,8 +89101,8 @@ module.exports = Circumference; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(190); -var SetTransform = __webpack_require__(27); +var Commands = __webpack_require__(192); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -86624,7 +89342,7 @@ module.exports = GraphicsCanvasRenderer; /***/ }), -/* 394 */ +/* 401 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -86843,7 +89561,7 @@ module.exports = GravityWell; /***/ }), -/* 395 */ +/* 402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87412,7 +90130,7 @@ module.exports = Particle; /***/ }), -/* 396 */ +/* 403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -87424,17 +90142,17 @@ module.exports = Particle; var BlendModes = __webpack_require__(52); var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DeathZone = __webpack_require__(397); -var EdgeZone = __webpack_require__(398); -var EmitterOp = __webpack_require__(967); +var DeathZone = __webpack_require__(404); +var EdgeZone = __webpack_require__(405); +var EmitterOp = __webpack_require__(972); var GetFastValue = __webpack_require__(2); -var GetRandom = __webpack_require__(183); -var HasAny = __webpack_require__(399); -var HasValue = __webpack_require__(99); -var Particle = __webpack_require__(395); -var RandomZone = __webpack_require__(400); +var GetRandom = __webpack_require__(185); +var HasAny = __webpack_require__(406); +var HasValue = __webpack_require__(108); +var Particle = __webpack_require__(402); +var RandomZone = __webpack_require__(407); var Rectangle = __webpack_require__(11); -var StableSort = __webpack_require__(128); +var StableSort = __webpack_require__(131); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(58); @@ -88187,7 +90905,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterConfig} config - Settings for this emitter. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ fromJSON: function (config) { @@ -88344,7 +91062,7 @@ var ParticleEmitter = new Class({ * @param {number} [offsetY=0] - Vertical offset of the particle origin from the Game Object. * @param {boolean} [trackVisible=false] - Whether the emitter's visible state will track the target's visible state. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ startFollow: function (target, offsetX, offsetY, trackVisible) { @@ -88365,7 +91083,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#stopFollow * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ stopFollow: function () { @@ -88426,7 +91144,7 @@ var ParticleEmitter = new Class({ * @param {boolean} [pickRandom=true] - Whether frames should be assigned at random from `frames`. * @param {integer} [quantity=1] - The number of consecutive particles that will receive each frame. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setFrame: function (frames, pickRandom, quantity) { @@ -88481,7 +91199,7 @@ var ParticleEmitter = new Class({ * * @param {boolean} [value=true] - Radial mode (true) or point mode (true). * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setRadial: function (value) { @@ -88502,7 +91220,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} x - The x-coordinate of the particle origin. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} y - The y-coordinate of the particle origin. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setPosition: function (x, y) { @@ -88525,7 +91243,7 @@ var ParticleEmitter = new Class({ * @param {number} width - The width of the boundary. * @param {number} height - The height of the boundary. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setBounds: function (x, y, width, height) { @@ -88560,7 +91278,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeedX: function (value) { @@ -88581,7 +91299,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeedY: function (value) { @@ -88605,7 +91323,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The speed, in pixels per second. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setSpeed: function (value) { @@ -88626,7 +91344,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScaleX: function (value) { @@ -88643,7 +91361,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScaleY: function (value) { @@ -88660,7 +91378,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - The scale, relative to 1. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setScale: function (value) { @@ -88678,7 +91396,7 @@ var ParticleEmitter = new Class({ * * @param {number} value - Acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravityX: function (value) { @@ -88695,7 +91413,7 @@ var ParticleEmitter = new Class({ * * @param {number} value - Acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravityY: function (value) { @@ -88713,7 +91431,7 @@ var ParticleEmitter = new Class({ * @param {number} x - Horizontal acceleration due to gravity, in pixels per second squared. * @param {number} y - Vertical acceleration due to gravity, in pixels per second squared. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setGravity: function (x, y) { @@ -88731,7 +91449,7 @@ var ParticleEmitter = new Class({ * * @param {(Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType|Phaser.Types.GameObjects.Particles.EmitterOpOnUpdateType)} value - A value between 0 (transparent) and 1 (opaque). * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setAlpha: function (value) { @@ -88748,7 +91466,7 @@ var ParticleEmitter = new Class({ * * @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. + * @return {this} This Particle Emitter. */ setTint: function (value) { @@ -88765,7 +91483,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setEmitterAngle: function (value) { @@ -88782,7 +91500,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The angle of the initial velocity of emitted particles. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setAngle: function (value) { @@ -88799,7 +91517,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} value - The particle lifespan, in ms. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setLifespan: function (value) { @@ -88816,7 +91534,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} quantity - The number of particles to release at each flow cycle or explosion. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setQuantity: function (quantity) { @@ -88835,7 +91553,7 @@ var ParticleEmitter = new Class({ * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms; or -1 to put the emitter in explosion mode. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [quantity] - The number of particles to release at each flow cycle or explosion. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setFrequency: function (frequency, quantity) { @@ -88863,7 +91581,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterEdgeZoneConfig|Phaser.Types.GameObjects.Particles.ParticleEmitterRandomZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current emit zone. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setEmitZone: function (zoneConfig) { @@ -88912,7 +91630,7 @@ var ParticleEmitter = new Class({ * * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterDeathZoneConfig} [zoneConfig] - An object describing the zone, or `undefined` to remove any current death zone. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ setDeathZone: function (zoneConfig) { @@ -88948,7 +91666,7 @@ var ParticleEmitter = new Class({ * * @param {integer} particleCount - The number of particles to create. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ reserve: function (particleCount) { @@ -89023,7 +91741,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} [context] - The calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ onParticleEmit: function (callback, context) { @@ -89055,7 +91773,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleDeathCallback} callback - The function. * @param {*} [context] - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ onParticleDeath: function (callback, context) { @@ -89084,7 +91802,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#killAll * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ killAll: function () { @@ -89108,7 +91826,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} context - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ forEachAlive: function (callback, context) { @@ -89133,7 +91851,7 @@ var ParticleEmitter = new Class({ * @param {Phaser.Types.GameObjects.Particles.ParticleEmitterCallback} callback - The function. * @param {*} context - The function's calling context. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ forEachDead: function (callback, context) { @@ -89160,7 +91878,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#start * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ start: function () { @@ -89177,7 +91895,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#stop * @since 3.11.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ stop: function () { @@ -89192,7 +91910,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#pause * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ pause: function () { @@ -89207,7 +91925,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#resume * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ resume: function () { @@ -89222,7 +91940,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#remove * @since 3.22.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ remove: function () { @@ -89237,7 +91955,7 @@ var ParticleEmitter = new Class({ * @method Phaser.GameObjects.Particles.ParticleEmitter#depthSort * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ depthSort: function () { @@ -89257,7 +91975,7 @@ var ParticleEmitter = new Class({ * @param {number} frequency - The time interval (>= 0) of each flow cycle, in ms. * @param {Phaser.Types.GameObjects.Particles.EmitterOpOnEmitType} [count=1] - The number of particles to emit at each flow cycle. * - * @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter. + * @return {this} This Particle Emitter. */ flow: function (frequency, count) { @@ -89483,7 +92201,7 @@ module.exports = ParticleEmitter; /***/ }), -/* 397 */ +/* 404 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89561,7 +92279,7 @@ module.exports = DeathZone; /***/ }), -/* 398 */ +/* 405 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89697,7 +92415,7 @@ var EdgeZone = new Class({ * @method Phaser.GameObjects.Particles.Zones.EdgeZone#updateSource * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone. + * @return {this} This Edge Zone. */ updateSource: function () { @@ -89736,7 +92454,7 @@ var EdgeZone = new Class({ * * @param {Phaser.Types.GameObjects.Particles.EdgeZoneSource} source - An object instance with a `getPoints(quantity, stepRate)` method returning an array of points. * - * @return {Phaser.GameObjects.Particles.Zones.EdgeZone} This Edge Zone. + * @return {this} This Edge Zone. */ changeSource: function (source) { @@ -89805,7 +92523,7 @@ module.exports = EdgeZone; /***/ }), -/* 399 */ +/* 406 */ /***/ (function(module, exports) { /** @@ -89842,7 +92560,7 @@ module.exports = HasAny; /***/ }), -/* 400 */ +/* 407 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89915,7 +92633,7 @@ module.exports = RandomZone; /***/ }), -/* 401 */ +/* 408 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -89926,7 +92644,7 @@ module.exports = RandomZone; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var Sprite = __webpack_require__(69); +var Sprite = __webpack_require__(75); /** * @classdesc @@ -89997,7 +92715,7 @@ module.exports = PathFollower; /***/ }), -/* 402 */ +/* 409 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90006,12 +92724,12 @@ module.exports = PathFollower; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcRender = __webpack_require__(990); +var ArcRender = __webpack_require__(998); var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); var Earcut = __webpack_require__(66); var GeomCircle = __webpack_require__(65); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Shape = __webpack_require__(30); /** @@ -90406,7 +93124,7 @@ module.exports = Arc; /***/ }), -/* 403 */ +/* 410 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90416,7 +93134,7 @@ module.exports = Arc; */ var Class = __webpack_require__(0); -var CurveRender = __webpack_require__(993); +var CurveRender = __webpack_require__(1001); var Earcut = __webpack_require__(66); var Rectangle = __webpack_require__(11); var Shape = __webpack_require__(30); @@ -90588,7 +93306,7 @@ module.exports = Curve; /***/ }), -/* 404 */ +/* 411 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90599,7 +93317,7 @@ module.exports = Curve; var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var EllipseRender = __webpack_require__(996); +var EllipseRender = __webpack_require__(1004); var GeomEllipse = __webpack_require__(95); var Shape = __webpack_require__(30); @@ -90775,7 +93493,7 @@ module.exports = Ellipse; /***/ }), -/* 405 */ +/* 412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -90786,7 +93504,7 @@ module.exports = Ellipse; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); -var GridRender = __webpack_require__(999); +var GridRender = __webpack_require__(1007); /** * @classdesc @@ -91057,7 +93775,7 @@ module.exports = Grid; /***/ }), -/* 406 */ +/* 413 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91066,7 +93784,7 @@ module.exports = Grid; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsoBoxRender = __webpack_require__(1002); +var IsoBoxRender = __webpack_require__(1010); var Class = __webpack_require__(0); var Shape = __webpack_require__(30); @@ -91272,7 +93990,7 @@ module.exports = IsoBox; /***/ }), -/* 407 */ +/* 414 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91282,7 +94000,7 @@ module.exports = IsoBox; */ var Class = __webpack_require__(0); -var IsoTriangleRender = __webpack_require__(1005); +var IsoTriangleRender = __webpack_require__(1013); var Shape = __webpack_require__(30); /** @@ -91518,7 +94236,7 @@ module.exports = IsoTriangle; /***/ }), -/* 408 */ +/* 415 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91530,7 +94248,7 @@ module.exports = IsoTriangle; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomLine = __webpack_require__(56); -var LineRender = __webpack_require__(1008); +var LineRender = __webpack_require__(1016); /** * @classdesc @@ -91685,7 +94403,7 @@ module.exports = Line; /***/ }), -/* 409 */ +/* 416 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91694,13 +94412,13 @@ module.exports = Line; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PolygonRender = __webpack_require__(1011); +var PolygonRender = __webpack_require__(1019); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); -var GetAABB = __webpack_require__(410); -var GeomPolygon = __webpack_require__(198); +var GetAABB = __webpack_require__(417); +var GeomPolygon = __webpack_require__(201); var Shape = __webpack_require__(30); -var Smooth = __webpack_require__(413); +var Smooth = __webpack_require__(420); /** * @classdesc @@ -91824,7 +94542,7 @@ module.exports = Polygon; /***/ }), -/* 410 */ +/* 417 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91880,7 +94598,7 @@ module.exports = GetAABB; /***/ }), -/* 411 */ +/* 418 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -91891,7 +94609,7 @@ module.exports = GetAABB; var Length = __webpack_require__(57); var Line = __webpack_require__(56); -var Perimeter = __webpack_require__(412); +var Perimeter = __webpack_require__(419); /** * Returns an array of Point objects containing the coordinates of the points around the perimeter of the Polygon, @@ -91915,7 +94633,7 @@ var GetPoints = function (polygon, quantity, stepRate, out) var perimeter = Perimeter(polygon); // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = perimeter / stepRate; } @@ -91957,7 +94675,7 @@ module.exports = GetPoints; /***/ }), -/* 412 */ +/* 419 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92005,7 +94723,7 @@ module.exports = Perimeter; /***/ }), -/* 413 */ +/* 420 */ /***/ (function(module, exports) { /** @@ -92081,7 +94799,7 @@ module.exports = Smooth; /***/ }), -/* 414 */ +/* 421 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92093,7 +94811,7 @@ module.exports = Smooth; var Class = __webpack_require__(0); var GeomRectangle = __webpack_require__(11); var Shape = __webpack_require__(30); -var RectangleRender = __webpack_require__(1014); +var RectangleRender = __webpack_require__(1022); /** * @classdesc @@ -92193,7 +94911,7 @@ module.exports = Rectangle; /***/ }), -/* 415 */ +/* 422 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92202,7 +94920,7 @@ module.exports = Rectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var StarRender = __webpack_require__(1017); +var StarRender = __webpack_require__(1025); var Class = __webpack_require__(0); var Earcut = __webpack_require__(66); var Shape = __webpack_require__(30); @@ -92481,7 +95199,7 @@ module.exports = Star; /***/ }), -/* 416 */ +/* 423 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92493,7 +95211,7 @@ module.exports = Star; var Class = __webpack_require__(0); var Shape = __webpack_require__(30); var GeomTriangle = __webpack_require__(71); -var TriangleRender = __webpack_require__(1020); +var TriangleRender = __webpack_require__(1028); /** * @classdesc @@ -92624,7 +95342,7 @@ module.exports = Triangle; /***/ }), -/* 417 */ +/* 424 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92711,7 +95429,7 @@ module.exports = GetPoint; /***/ }), -/* 418 */ +/* 425 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92753,7 +95471,7 @@ var GetPoints = function (triangle, quantity, stepRate, out) var perimeter = length1 + length2 + length3; // If quantity is a falsey value (false, null, 0, undefined, etc) then we calculate it based on the stepRate instead. - if (!quantity) + if (!quantity && stepRate > 0) { quantity = perimeter / stepRate; } @@ -92804,7 +95522,7 @@ module.exports = GetPoints; /***/ }), -/* 419 */ +/* 426 */ /***/ (function(module, exports) { /** @@ -92887,7 +95605,7 @@ module.exports = SetValue; /***/ }), -/* 420 */ +/* 427 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -92897,7 +95615,7 @@ module.exports = SetValue; */ var Class = __webpack_require__(0); -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * @classdesc @@ -93027,7 +95745,7 @@ var Light = new Class({ * @param {number} b - The blue color. A value between 0 and 1. * @param {number} intensity - The intensity of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ set: function (x, y, radius, r, g, b, intensity) { @@ -93057,7 +95775,7 @@ var Light = new Class({ * @param {number} x - The horizontal scroll factor of the light. * @param {number} y - The vertical scroll factor of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setScrollFactor: function (x, y) { @@ -93078,7 +95796,7 @@ var Light = new Class({ * * @param {number} rgb - The integer RGB color of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setColor: function (rgb) { @@ -93099,7 +95817,7 @@ var Light = new Class({ * * @param {number} intensity - The intensity of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setIntensity: function (intensity) { @@ -93117,7 +95835,7 @@ var Light = new Class({ * @param {number} x - The horizontal position of the light. * @param {number} y - The vertical position of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setPosition: function (x, y) { @@ -93135,7 +95853,7 @@ var Light = new Class({ * * @param {number} radius - The radius of the light. * - * @return {Phaser.GameObjects.Light} This Light object. + * @return {this} This Light object. */ setRadius: function (radius) { @@ -93150,7 +95868,7 @@ module.exports = Light; /***/ }), -/* 421 */ +/* 428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93160,8 +95878,8 @@ module.exports = Light; */ var Class = __webpack_require__(0); -var Light = __webpack_require__(420); -var Utils = __webpack_require__(10); +var Light = __webpack_require__(427); +var Utils = __webpack_require__(9); /** * @callback LightForEach @@ -93513,7 +96231,7 @@ module.exports = LightsManager; /***/ }), -/* 422 */ +/* 429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93522,8 +96240,8 @@ module.exports = LightsManager; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(46); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(47); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Geom @@ -93531,14 +96249,14 @@ var Extend = __webpack_require__(17); var Geom = { - 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) + Circle: __webpack_require__(1088), + Ellipse: __webpack_require__(1098), + Intersects: __webpack_require__(430), + Line: __webpack_require__(1117), + Point: __webpack_require__(1139), + Polygon: __webpack_require__(1153), + Rectangle: __webpack_require__(443), + Triangle: __webpack_require__(1184) }; @@ -93549,7 +96267,7 @@ module.exports = Geom; /***/ }), -/* 423 */ +/* 430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93564,35 +96282,35 @@ module.exports = Geom; module.exports = { - 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), + CircleToCircle: __webpack_require__(205), + CircleToRectangle: __webpack_require__(206), + GetCircleToCircle: __webpack_require__(1108), + GetCircleToRectangle: __webpack_require__(1109), + GetLineToCircle: __webpack_require__(207), + GetLineToRectangle: __webpack_require__(209), + GetRectangleIntersection: __webpack_require__(1110), + GetRectangleToRectangle: __webpack_require__(1111), + GetRectangleToTriangle: __webpack_require__(1112), + GetTriangleToCircle: __webpack_require__(1113), + GetTriangleToLine: __webpack_require__(435), + GetTriangleToTriangle: __webpack_require__(1114), + LineToCircle: __webpack_require__(208), LineToLine: __webpack_require__(84), - 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) + LineToRectangle: __webpack_require__(431), + PointToLine: __webpack_require__(439), + PointToLineSegment: __webpack_require__(1115), + RectangleToRectangle: __webpack_require__(135), + RectangleToTriangle: __webpack_require__(432), + RectangleToValues: __webpack_require__(1116), + TriangleToCircle: __webpack_require__(434), + TriangleToLine: __webpack_require__(436), + TriangleToTriangle: __webpack_require__(437) }; /***/ }), -/* 424 */ +/* 431 */ /***/ (function(module, exports) { /** @@ -93693,7 +96411,7 @@ module.exports = LineToRectangle; /***/ }), -/* 425 */ +/* 432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93703,9 +96421,9 @@ module.exports = LineToRectangle; */ var LineToLine = __webpack_require__(84); -var Contains = __webpack_require__(47); -var ContainsArray = __webpack_require__(207); -var Decompose = __webpack_require__(426); +var Contains = __webpack_require__(48); +var ContainsArray = __webpack_require__(210); +var Decompose = __webpack_require__(433); /** * Checks for intersection between Rectangle shape and Triangle shape. @@ -93786,7 +96504,7 @@ module.exports = RectangleToTriangle; /***/ }), -/* 426 */ +/* 433 */ /***/ (function(module, exports) { /** @@ -93823,7 +96541,7 @@ module.exports = Decompose; /***/ }), -/* 427 */ +/* 434 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93832,7 +96550,7 @@ module.exports = Decompose; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LineToCircle = __webpack_require__(205); +var LineToCircle = __webpack_require__(208); var Contains = __webpack_require__(83); /** @@ -93888,7 +96606,7 @@ module.exports = TriangleToCircle; /***/ }), -/* 428 */ +/* 435 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -93899,7 +96617,7 @@ module.exports = TriangleToCircle; */ var Point = __webpack_require__(4); -var TriangleToLine = __webpack_require__(429); +var TriangleToLine = __webpack_require__(436); var LineToLine = __webpack_require__(84); /** @@ -93947,7 +96665,7 @@ module.exports = GetTriangleToLine; /***/ }), -/* 429 */ +/* 436 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94003,7 +96721,7 @@ module.exports = TriangleToLine; /***/ }), -/* 430 */ +/* 437 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94012,8 +96730,8 @@ module.exports = TriangleToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ContainsArray = __webpack_require__(207); -var Decompose = __webpack_require__(431); +var ContainsArray = __webpack_require__(210); +var Decompose = __webpack_require__(438); var LineToLine = __webpack_require__(84); /** @@ -94093,7 +96811,7 @@ module.exports = TriangleToTriangle; /***/ }), -/* 431 */ +/* 438 */ /***/ (function(module, exports) { /** @@ -94128,7 +96846,7 @@ module.exports = Decompose; /***/ }), -/* 432 */ +/* 439 */ /***/ (function(module, exports) { /** @@ -94198,7 +96916,7 @@ module.exports = PointToLine; /***/ }), -/* 433 */ +/* 440 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94207,7 +96925,7 @@ module.exports = PointToLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Wrap = __webpack_require__(58); var Angle = __webpack_require__(85); @@ -94232,7 +96950,7 @@ module.exports = NormalAngle; /***/ }), -/* 434 */ +/* 441 */ /***/ (function(module, exports) { /** @@ -94260,7 +96978,7 @@ module.exports = GetMagnitude; /***/ }), -/* 435 */ +/* 442 */ /***/ (function(module, exports) { /** @@ -94288,7 +97006,7 @@ module.exports = GetMagnitudeSq; /***/ }), -/* 436 */ +/* 443 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94299,49 +97017,50 @@ module.exports = GetMagnitudeSq; var Rectangle = __webpack_require__(11); -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__(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.Area = __webpack_require__(1158); +Rectangle.Ceil = __webpack_require__(1159); +Rectangle.CeilAll = __webpack_require__(1160); +Rectangle.CenterOn = __webpack_require__(168); +Rectangle.Clone = __webpack_require__(1161); +Rectangle.Contains = __webpack_require__(48); +Rectangle.ContainsPoint = __webpack_require__(1162); +Rectangle.ContainsRect = __webpack_require__(444); +Rectangle.CopyFrom = __webpack_require__(1163); +Rectangle.Decompose = __webpack_require__(433); +Rectangle.Equals = __webpack_require__(1164); +Rectangle.FitInside = __webpack_require__(1165); +Rectangle.FitOutside = __webpack_require__(1166); +Rectangle.Floor = __webpack_require__(1167); +Rectangle.FloorAll = __webpack_require__(1168); +Rectangle.FromPoints = __webpack_require__(176); +Rectangle.FromXY = __webpack_require__(1169); +Rectangle.GetAspectRatio = __webpack_require__(212); +Rectangle.GetCenter = __webpack_require__(1170); +Rectangle.GetPoint = __webpack_require__(152); +Rectangle.GetPoints = __webpack_require__(274); +Rectangle.GetSize = __webpack_require__(1171); +Rectangle.Inflate = __webpack_require__(1172); +Rectangle.Intersection = __webpack_require__(1173); +Rectangle.MarchingAnts = __webpack_require__(285); +Rectangle.MergePoints = __webpack_require__(1174); +Rectangle.MergeRect = __webpack_require__(1175); +Rectangle.MergeXY = __webpack_require__(1176); +Rectangle.Offset = __webpack_require__(1177); +Rectangle.OffsetPoint = __webpack_require__(1178); +Rectangle.Overlaps = __webpack_require__(1179); 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); +Rectangle.PerimeterPoint = __webpack_require__(1180); +Rectangle.Random = __webpack_require__(155); +Rectangle.RandomOutside = __webpack_require__(1181); +Rectangle.SameDimensions = __webpack_require__(1182); +Rectangle.Scale = __webpack_require__(1183); +Rectangle.Union = __webpack_require__(393); module.exports = Rectangle; /***/ }), -/* 437 */ +/* 444 */ /***/ (function(module, exports) { /** @@ -94381,7 +97100,7 @@ module.exports = ContainsRect; /***/ }), -/* 438 */ +/* 445 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94425,7 +97144,7 @@ module.exports = Centroid; /***/ }), -/* 439 */ +/* 446 */ /***/ (function(module, exports) { /** @@ -94466,7 +97185,7 @@ module.exports = Offset; /***/ }), -/* 440 */ +/* 447 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94531,7 +97250,7 @@ module.exports = InCenter; /***/ }), -/* 441 */ +/* 448 */ /***/ (function(module, exports) { /** @@ -94602,7 +97321,7 @@ module.exports = CreateInteractiveObject; /***/ }), -/* 442 */ +/* 449 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94727,7 +97446,7 @@ module.exports = Axis; /***/ }), -/* 443 */ +/* 450 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94737,7 +97456,7 @@ module.exports = Axis; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(211); +var Events = __webpack_require__(214); /** * @classdesc @@ -94873,7 +97592,7 @@ module.exports = Button; /***/ }), -/* 444 */ +/* 451 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -94882,10 +97601,10 @@ module.exports = Button; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Axis = __webpack_require__(442); -var Button = __webpack_require__(443); +var Axis = __webpack_require__(449); +var Button = __webpack_require__(450); var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var Vector2 = __webpack_require__(3); /** @@ -95631,7 +98350,7 @@ module.exports = Gamepad; /***/ }), -/* 445 */ +/* 452 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -95641,8 +98360,8 @@ module.exports = Gamepad; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(133); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(137); /** * @classdesc @@ -95873,7 +98592,7 @@ var Key = new Class({ * * @param {boolean} value - Emit `down` events on repeated key down actions, or just once? * - * @return {Phaser.Input.Keyboard.Key} This Key instance. + * @return {this} This Key instance. */ setEmitOnRepeat: function (value) { @@ -95964,7 +98683,7 @@ var Key = new Class({ * @method Phaser.Input.Keyboard.Key#reset * @since 3.6.0 * - * @return {Phaser.Input.Keyboard.Key} This Key instance. + * @return {this} This Key instance. */ reset: function () { @@ -96033,7 +98752,7 @@ module.exports = Key; /***/ }), -/* 446 */ +/* 453 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96043,10 +98762,10 @@ module.exports = Key; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(133); +var Events = __webpack_require__(137); var GetFastValue = __webpack_require__(2); -var ProcessKeyCombo = __webpack_require__(1211); -var ResetKeyCombo = __webpack_require__(1213); +var ProcessKeyCombo = __webpack_require__(1223); +var ResetKeyCombo = __webpack_require__(1225); /** * @classdesc @@ -96326,7 +99045,7 @@ module.exports = KeyCombo; /***/ }), -/* 447 */ +/* 454 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96335,7 +99054,7 @@ module.exports = KeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MergeXHRSettings = __webpack_require__(212); +var MergeXHRSettings = __webpack_require__(215); /** * Creates a new XMLHttpRequest (xhr) object based on the given File and XHRSettings @@ -96361,6 +99080,14 @@ var XHRLoader = function (file, globalXHRSettings) xhr.responseType = file.xhrSettings.responseType; xhr.timeout = config.timeout; + if (config.headers) + { + for (var key in config.headers) + { + xhr.setRequestHeader(key, config.headers[key]); + } + } + if (config.header && config.headerValue) { xhr.setRequestHeader(config.header, config.headerValue); @@ -96376,6 +99103,11 @@ var XHRLoader = function (file, globalXHRSettings) xhr.overrideMimeType(config.overrideMimeType); } + if (config.withCredentials) + { + xhr.withCredentials = true; + } + // After a successful request, the xhr.response property will contain the requested data as a DOMString, ArrayBuffer, Blob, or Document (depending on what was set for responseType.) xhr.onload = file.onLoad.bind(file, xhr); @@ -96394,7 +99126,7 @@ module.exports = XHRLoader; /***/ }), -/* 448 */ +/* 455 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96404,11 +99136,11 @@ module.exports = XHRLoader; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); -var HTML5AudioFile = __webpack_require__(449); +var HTML5AudioFile = __webpack_require__(456); var IsPlainObject = __webpack_require__(7); /** @@ -96416,7 +99148,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -96544,7 +99276,10 @@ AudioFile.getAudioURL = function (game, urls) if (url.indexOf('blob:') === 0 || url.indexOf('data:') === 0) { - return url; + return { + url: url, + type: '' + }; } var audioType = url.match(/\.([a-zA-Z0-9]+)($|\?)/); @@ -96567,7 +99302,7 @@ AudioFile.getAudioURL = function (game, urls) * Adds an Audio or HTML5Audio file, or array of audio files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -96582,14 +99317,14 @@ AudioFile.getAudioURL = function (game, urls) * 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 Audio Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Audio Cache. * 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 Audio Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.audio({ * key: 'title', @@ -96611,7 +99346,7 @@ AudioFile.getAudioURL = function (game, urls) * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#audio - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AudioFileConfig|Phaser.Types.Loader.FileTypes.AudioFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -96619,7 +99354,7 @@ AudioFile.getAudioURL = function (game, urls) * @param {any} [config] - An object containing an `instances` property for HTML5Audio. Defaults to 1. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('audio', function (key, urls, config, xhrSettings) { @@ -96665,7 +99400,7 @@ module.exports = AudioFile; /***/ }), -/* 449 */ +/* 456 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96675,10 +99410,10 @@ module.exports = AudioFile; */ var Class = __webpack_require__(0); -var Events = __webpack_require__(81); +var Events = __webpack_require__(82); var File = __webpack_require__(21); var GetFastValue = __webpack_require__(2); -var GetURL = __webpack_require__(134); +var GetURL = __webpack_require__(138); var IsPlainObject = __webpack_require__(7); /** @@ -96818,7 +99553,12 @@ var HTML5AudioFile = new Class({ for (var i = 0; i < instances; i++) { var audio = new Audio(); - audio.dataset = {}; + + if (!audio.dataset) + { + audio.dataset = {}; + } + audio.dataset.name = this.key + ('0' + i).slice(-2); audio.dataset.used = 'false'; @@ -96863,7 +99603,7 @@ module.exports = HTML5AudioFile; /***/ }), -/* 450 */ +/* 457 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -96873,7 +99613,7 @@ module.exports = HTML5AudioFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -96884,7 +99624,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -96959,7 +99699,7 @@ var ScriptFile = new Class({ * Adds a Script file, or array of Script files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -96974,11 +99714,11 @@ var ScriptFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.script({ * key: 'aliens', @@ -97003,14 +99743,14 @@ var ScriptFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#script - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ScriptFileConfig|Phaser.Types.Loader.FileTypes.ScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('script', function (key, url, xhrSettings) { @@ -97034,7 +99774,7 @@ module.exports = ScriptFile; /***/ }), -/* 451 */ +/* 458 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97044,7 +99784,7 @@ module.exports = ScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -97178,14 +99918,14 @@ var TextFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#text - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TextFileConfig|Phaser.Types.Loader.FileTypes.TextFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('text', function (key, url, xhrSettings) { @@ -97209,7 +99949,7 @@ module.exports = TextFile; /***/ }), -/* 452 */ +/* 459 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97218,12 +99958,12 @@ module.exports = TextFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeImage = __webpack_require__(453); -var ArcadeSprite = __webpack_require__(136); +var ArcadeImage = __webpack_require__(460); +var ArcadeSprite = __webpack_require__(140); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var PhysicsGroup = __webpack_require__(454); -var StaticPhysicsGroup = __webpack_require__(455); +var PhysicsGroup = __webpack_require__(461); +var StaticPhysicsGroup = __webpack_require__(462); /** * @classdesc @@ -97480,7 +100220,7 @@ module.exports = Factory; /***/ }), -/* 453 */ +/* 460 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97490,8 +100230,8 @@ module.exports = Factory; */ var Class = __webpack_require__(0); -var Components = __webpack_require__(214); -var Image = __webpack_require__(98); +var Components = __webpack_require__(217); +var Image = __webpack_require__(107); /** * @classdesc @@ -97580,7 +100320,7 @@ module.exports = ArcadeImage; /***/ }), -/* 454 */ +/* 461 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97589,7 +100329,7 @@ module.exports = ArcadeImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(136); +var ArcadeSprite = __webpack_require__(140); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var GetFastValue = __webpack_require__(2); @@ -97600,7 +100340,7 @@ var IsPlainObject = __webpack_require__(7); * @classdesc * An Arcade Physics Group object. * - * All Game Objects created by this Group will automatically be given dynamic Arcade Physics bodies. + * All Game Objects created by or added to this Group will automatically be given dynamic Arcade Physics bodies, if they have no body. * * Its static counterpart is {@link Phaser.Physics.Arcade.StaticGroup}. * @@ -97865,7 +100605,7 @@ module.exports = PhysicsGroup; /***/ }), -/* 455 */ +/* 462 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -97874,7 +100614,7 @@ module.exports = PhysicsGroup; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArcadeSprite = __webpack_require__(136); +var ArcadeSprite = __webpack_require__(140); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); var GetFastValue = __webpack_require__(2); @@ -97885,7 +100625,7 @@ var IsPlainObject = __webpack_require__(7); * @classdesc * An Arcade Physics Static Group object. * - * All Game Objects created by this Group will automatically be given static Arcade Physics bodies. + * All Game Objects created by or added to this Group will automatically be given static Arcade Physics bodies, if they have no body. * * Its dynamic counterpart is {@link Phaser.Physics.Arcade.Group}. * @@ -98056,7 +100796,7 @@ module.exports = StaticPhysicsGroup; /***/ }), -/* 456 */ +/* 463 */ /***/ (function(module, exports) { /** @@ -98141,7 +100881,7 @@ module.exports = OverlapRect; /***/ }), -/* 457 */ +/* 464 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -98150,31 +100890,31 @@ module.exports = OverlapRect; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Body = __webpack_require__(458); -var Clamp = __webpack_require__(22); +var Body = __webpack_require__(465); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Collider = __webpack_require__(459); +var Collider = __webpack_require__(466); var CONST = __webpack_require__(50); var DistanceBetween = __webpack_require__(53); -var EventEmitter = __webpack_require__(9); -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 EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(218); +var FuzzyEqual = __webpack_require__(106); +var FuzzyGreaterThan = __webpack_require__(321); +var FuzzyLessThan = __webpack_require__(322); +var GetOverlapX = __webpack_require__(467); +var GetOverlapY = __webpack_require__(468); var GetValue = __webpack_require__(6); -var ProcessQueue = __webpack_require__(184); -var ProcessTileCallbacks = __webpack_require__(1270); +var ProcessQueue = __webpack_require__(186); +var ProcessTileCallbacks = __webpack_require__(1282); var Rectangle = __webpack_require__(11); -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 RTree = __webpack_require__(469); +var SeparateTile = __webpack_require__(1283); +var SeparateX = __webpack_require__(1288); +var SeparateY = __webpack_require__(1289); +var Set = __webpack_require__(133); +var StaticBody = __webpack_require__(471); +var TileIntersectsBody = __webpack_require__(470); +var TransformMatrix = __webpack_require__(29); var Vector2 = __webpack_require__(3); var Wrap = __webpack_require__(58); @@ -98300,6 +101040,17 @@ var World = new Class({ */ this.fps = GetValue(config, 'fps', 60); + /** + * Should Physics use a fixed update time-step (true) or sync to the render fps (false)?. + * False value of this property disables fps and timeScale properties. + * + * @name Phaser.Physics.Arcade.World#fixedStep + * @type {boolean} + * @default true + * @since 3.23.0 + */ + this.fixedStep = true; + /** * The amount of elapsed ms since the last frame. * @@ -99073,6 +101824,13 @@ var World = new Class({ // Will a step happen this frame? var willStep = (this._elapsed >= msPerFrame); + if (!this.fixedStep) + { + fixedDelta = delta * 0.001; + willStep = true; + this._elapsed = 0; + } + for (i = 0; i < bodies.length; i++) { body = bodies[i]; @@ -99776,6 +102534,8 @@ var World = new Class({ /** * Tests if Game Objects overlap. * + * See details in {@link Phaser.Physics.Arcade.World#collide}. + * * @method Phaser.Physics.Arcade.World#overlap * @since 3.0.0 * @@ -99786,6 +102546,8 @@ var World = new Class({ * @param {*} [callbackContext] - The context in which to run the callbacks. * * @return {boolean} True if at least one Game Object overlaps another. + * + * @see Phaser.Physics.Arcade.World#collide */ overlap: function (object1, object2, overlapCallback, processCallback, callbackContext) { @@ -99800,7 +102562,7 @@ var World = new Class({ * Performs a collision check and separation between the two physics enabled objects given, which can be single * Game Objects, arrays of Game Objects, Physics Groups, arrays of Physics Groups or normal Groups. * - * If you don't require separation then use {@link #overlap} instead. + * If you don't require separation then use {@link Phaser.Physics.Arcade.World#overlap} instead. * * If two Groups or arrays are passed, each member of one will be tested against each member of the other. * @@ -99808,8 +102570,9 @@ var World = new Class({ * * If **only** one Array is passed, the array is iterated and every element in it is tested against the others. * - * Two callbacks can be provided. The `collideCallback` is invoked if a collision occurs and the two colliding - * objects are passed to it. + * Two callbacks can be provided; they receive the colliding game objects as arguments. + * If an overlap is detected, the `processCallback` is called first. It can cancel the collision by returning false. + * Next the objects are separated and `collideCallback` is invoked. * * Arcade Physics uses the Projection Method of collision resolution and separation. While it's fast and suitable * for 'arcade' style games it lacks stability when multiple objects are in close proximity or resting upon each other. @@ -100066,7 +102829,7 @@ var World = new Class({ { var bodyA = sprite.body; - if (group.length === 0 || !bodyA || !bodyA.enable) + if (group.length === 0 || !bodyA || !bodyA.enable || bodyA.checkCollision.none) { return; } @@ -100094,9 +102857,9 @@ var World = new Class({ { bodyB = results[i]; - if (bodyA === bodyB || !bodyB.enable || !group.contains(bodyB.gameObject)) + if (bodyA === bodyB || !bodyB.enable || bodyB.checkCollision.none || !group.contains(bodyB.gameObject)) { - // Skip if comparing against itself, or if bodyB isn't actually part of the Group + // Skip if comparing against itself, or if bodyB isn't collidable, or if bodyB isn't actually part of the Group continue; } @@ -100279,7 +103042,7 @@ var World = new Class({ { var body = sprite.body; - if (!body.enable) + if (!body.enable || body.checkCollision.none) { return false; } @@ -100530,7 +103293,7 @@ module.exports = World; /***/ }), -/* 458 */ +/* 465 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -100542,10 +103305,10 @@ module.exports = World; var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var Events = __webpack_require__(215); -var RadToDeg = __webpack_require__(171); +var Events = __webpack_require__(218); +var RadToDeg = __webpack_require__(173); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(47); +var RectangleContains = __webpack_require__(48); var Vector2 = __webpack_require__(3); /** @@ -100568,8 +103331,8 @@ var Body = new Class({ function Body (world, gameObject) { - var width = (gameObject.width) ? gameObject.width : 64; - var height = (gameObject.height) ? gameObject.height : 64; + var width = (gameObject.displayWidth) ? gameObject.displayWidth : 64; + var height = (gameObject.displayHeight) ? gameObject.displayHeight : 64; /** * The Arcade Physics simulation this Body belongs to. @@ -100683,7 +103446,10 @@ var Body = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.position = new Vector2(gameObject.x, gameObject.y); + this.position = new Vector2( + gameObject.x - gameObject.scaleX * gameObject.displayOriginX, + gameObject.y - gameObject.scaleY * gameObject.displayOriginY + ); /** * The position of this Body during the previous step. @@ -100696,7 +103462,7 @@ var Body = new Class({ /** * The position of this Body during the previous frame. - * + * * @name Phaser.Physics.Arcade.Body#prevFrame * @type {Phaser.Math.Vector2} * @since 3.20.0 @@ -100813,7 +103579,7 @@ var Body = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight); + this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight); /** * The Body's velocity, in pixels per second. @@ -100865,10 +103631,10 @@ var Body = new Class({ this.allowDrag = true; /** - * Absolute loss of velocity due to movement, in pixels per second squared. + * When `useDamping` is false (the default), this is absolute loss of velocity due to movement, in pixels per second squared (a vector). * The x and y components are applied separately. * - * When `useDamping` is true, this is 1 minus the damping factor. + * When `useDamping` is true, this is 1 minus the damping factor (a number). * 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. @@ -100926,10 +103692,10 @@ var Body = new Class({ /** * The rectangle used for world boundary collisions. - * + * * By default it is set to the world boundary rectangle. Or, if this Body was * created by a Physics Group, then whatever rectangle that Group defined. - * + * * You can also change it by using the `Body.setBoundsRectangle` method. * * @name Phaser.Physics.Arcade.Body#customBoundsRectangle @@ -100947,7 +103713,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#worldboundsEvent + * @see Phaser.Physics.Arcade.World#WORLD_BOUNDS */ this.onWorldBounds = false; @@ -100958,7 +103724,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#collideEvent + * @see Phaser.Physics.Arcade.World#COLLIDE */ this.onCollide = false; @@ -100969,7 +103735,7 @@ var Body = new Class({ * @type {boolean} * @default false * @since 3.0.0 - * @see Phaser.Physics.Arcade.World#overlapEvent + * @see Phaser.Physics.Arcade.World#OVERLAP */ this.onOverlap = false; @@ -101439,23 +104205,27 @@ var Body = new Class({ resetFlags: function () { // Store and reset collision flags - this.wasTouching.none = this.touching.none; - this.wasTouching.up = this.touching.up; - this.wasTouching.down = this.touching.down; - this.wasTouching.left = this.touching.left; - this.wasTouching.right = this.touching.right; + var wasTouching = this.wasTouching; + var touching = this.touching; + var blocked = this.blocked; - this.touching.none = true; - this.touching.up = false; - this.touching.down = false; - this.touching.left = false; - this.touching.right = false; + wasTouching.none = touching.none; + wasTouching.up = touching.up; + wasTouching.down = touching.down; + wasTouching.left = touching.left; + wasTouching.right = touching.right; - this.blocked.none = true; - this.blocked.up = false; - this.blocked.down = false; - this.blocked.left = false; - this.blocked.right = false; + touching.none = true; + touching.up = false; + touching.down = false; + touching.left = false; + touching.right = false; + + blocked.none = true; + blocked.up = false; + blocked.down = false; + blocked.left = false; + blocked.right = false; this.overlapR = 0; this.overlapX = 0; @@ -101637,7 +104407,7 @@ var Body = new Class({ * @since 3.20 * * @param {?Phaser.Geom.Rectangle} [bounds] - The new boundary rectangle. Pass `null` to use the World bounds. - * + * * @return {this} This Body object. */ setBoundsRectangle: function (bounds) @@ -101768,10 +104538,10 @@ var Body = new Class({ if (center && gameObject.getCenter) { - var ox = gameObject.displayWidth / 2; - var oy = gameObject.displayHeight / 2; + var ox = (gameObject.width - width) / 2; + var oy = (gameObject.height - height) / 2; - this.offset.set(ox - this.halfWidth, oy - this.halfHeight); + this.offset.set(ox, oy); } this.isCircle = false; @@ -102000,7 +104770,7 @@ 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. * @@ -102017,7 +104787,7 @@ 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. * @@ -102033,10 +104803,10 @@ var Body = new Class({ /** * 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 @@ -102054,10 +104824,10 @@ var Body = new Class({ /** * 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 @@ -102858,7 +105628,7 @@ module.exports = Body; /***/ }), -/* 459 */ +/* 466 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103041,7 +105811,7 @@ module.exports = Collider; /***/ }), -/* 460 */ +/* 467 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103149,7 +105919,7 @@ module.exports = GetOverlapX; /***/ }), -/* 461 */ +/* 468 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103257,7 +106027,7 @@ module.exports = GetOverlapY; /***/ }), -/* 462 */ +/* 469 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103267,7 +106037,7 @@ module.exports = GetOverlapY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var quickselect = __webpack_require__(383); +var quickselect = __webpack_require__(390); /** * @classdesc @@ -103868,7 +106638,7 @@ function multiSelect (arr, left, right, n, compare) module.exports = rbush; /***/ }), -/* 463 */ +/* 470 */ /***/ (function(module, exports) { /** @@ -103904,7 +106674,7 @@ module.exports = TileIntersectsBody; /***/ }), -/* 464 */ +/* 471 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -103916,7 +106686,7 @@ module.exports = TileIntersectsBody; var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); var CONST = __webpack_require__(50); -var RectangleContains = __webpack_require__(47); +var RectangleContains = __webpack_require__(48); var Vector2 = __webpack_require__(3); /** @@ -103924,7 +106694,7 @@ var Vector2 = __webpack_require__(3); * A Static Arcade Physics Body. * * A Static Body never moves, and isn't automatically synchronized with its parent Game Object. - * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Body manually. + * That means if you make any change to the parent's origin, position, or scale after creating or adding the body, you'll need to update the Static Body manually. * * A Static Body can collide with other Bodies, but is never moved by collisions. * @@ -103944,8 +106714,8 @@ var StaticBody = new Class({ function StaticBody (world, gameObject) { - var width = (gameObject.width) ? gameObject.width : 64; - var height = (gameObject.height) ? gameObject.height : 64; + var width = (gameObject.displayWidth) ? gameObject.displayWidth : 64; + var height = (gameObject.displayHeight) ? gameObject.displayHeight : 64; /** * The Arcade Physics simulation this Static Body belongs to. @@ -104004,8 +106774,8 @@ var StaticBody = new Class({ this.isCircle = false; /** - * If this Static Body is circular, this is the unscaled radius of the Static Body's boundary, as set by {@link #setCircle}, in source pixels. - * The true radius is equal to `halfWidth`. + * If this Static Body is circular, this is the radius of the boundary, as set by {@link Phaser.Physics.Arcade.StaticBody#setCircle}, in pixels. + * Equal to `halfWidth`. * * @name Phaser.Physics.Arcade.StaticBody#radius * @type {number} @@ -104015,12 +106785,13 @@ var StaticBody = new Class({ this.radius = 0; /** - * The offset of this Static Body's actual position from any updated position. + * The offset set by {@link Phaser.Physics.Arcade.StaticBody#setCircle} or {@link Phaser.Physics.Arcade.StaticBody#setSize}. * - * Unlike a dynamic Body, a Static Body does not follow its Game Object. As such, this offset is only applied when resizing the Static Body. + * This doesn't affect the Static Body's position, because a Static Body does not follow its Game Object. * * @name Phaser.Physics.Arcade.StaticBody#offset * @type {Phaser.Math.Vector2} + * @readonly * @since 3.0.0 */ this.offset = new Vector2(); @@ -104082,7 +106853,7 @@ var StaticBody = new Class({ * @type {Phaser.Math.Vector2} * @since 3.0.0 */ - this.center = new Vector2(gameObject.x + this.halfWidth, gameObject.y + this.halfHeight); + this.center = new Vector2(this.position.x + this.halfWidth, this.position.y + this.halfHeight); /** * A constant zero velocity used by the Arcade Physics simulation for calculations. @@ -104298,7 +107069,7 @@ var StaticBody = new Class({ this.physicsType = CONST.STATIC_BODY; /** - * The calculated change in the Body's horizontal position during the current step. + * The calculated change in the Static Body's horizontal position during the current step. * For a static body this is always zero. * * @name Phaser.Physics.Arcade.StaticBody#_dx @@ -104310,7 +107081,7 @@ var StaticBody = new Class({ this._dx = 0; /** - * The calculated change in the Body's vertical position during the current step. + * The calculated change in the Static Body's vertical position during the current step. * For a static body this is always zero. * * @name Phaser.Physics.Arcade.StaticBody#_dy @@ -104359,7 +107130,7 @@ var StaticBody = new Class({ }, /** - * Syncs the Body's position and size with its parent Game Object. + * Syncs the Static Body's position and size with its parent Game Object. * * @method Phaser.Physics.Arcade.StaticBody#updateFromGameObject * @since 3.1.0 @@ -104388,13 +107159,13 @@ var StaticBody = new Class({ }, /** - * Sets the offset of the body. + * Positions the Static Body at an offset from its Game Object. * * @method Phaser.Physics.Arcade.StaticBody#setOffset * @since 3.4.0 * - * @param {number} x - The horizontal offset of the Body from the Game Object's center. - * @param {number} y - The vertical offset of the Body from the Game Object's center. + * @param {number} x - The horizontal offset of the Static Body from the Game Object's `x`. + * @param {number} y - The vertical offset of the Static Body from the Game Object's `y`. * * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. */ @@ -104420,15 +107191,16 @@ var StaticBody = new Class({ }, /** - * Sets the size of the body. + * Sets the size of the Static Body. + * When `center` is true, also repositions it. * Resets the width and height to match current frame, if no width and height provided and a frame is found. * * @method Phaser.Physics.Arcade.StaticBody#setSize * @since 3.0.0 * - * @param {integer} [width] - The width of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width. - * @param {integer} [height] - The height of the Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height. - * @param {boolean} [center=true] - Modify the Body's `offset`, placing the Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method. + * @param {integer} [width] - The width of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame width. + * @param {integer} [height] - The height of the Static Body in pixels. Cannot be zero. If not given, and the parent Game Object has a frame, it will use the frame height. + * @param {boolean} [center=true] - Place the Static Body's center on its Game Object's center. Only works if the Game Object has the `getCenter` method. * * @return {Phaser.Physics.Arcade.StaticBody} This Static Body object. */ @@ -104481,7 +107253,7 @@ var StaticBody = new Class({ }, /** - * Sets this Static Body to have a circular body and sets its sizes and position. + * Sets this Static Body to have a circular body and sets its size and position. * * @method Phaser.Physics.Arcade.StaticBody#setCircle * @since 3.0.0 @@ -104891,154 +107663,7 @@ module.exports = StaticBody; /***/ }), -/* 465 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Collision Types - Determine if and how entities collide with each other. - * - * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves, - * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE - * collisions, both entities are moved. LITE or PASSIVE entities don't collide - * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. - * FIXED collisions is undefined. - * - * @namespace Phaser.Physics.Impact.COLLIDES - * @memberof Phaser.Physics.Impact - * @since 3.0.0 - */ - -module.exports = { - - /** - * Never collides. - * - * @name Phaser.Physics.Impact.COLLIDES.NEVER - * @type {integer} - * @const - * @since 3.0.0 - */ - NEVER: 0, - - /** - * Lite collision. - * - * @name Phaser.Physics.Impact.COLLIDES.LITE - * @type {integer} - * @const - * @since 3.0.0 - */ - LITE: 1, - - /** - * Passive collision. - * - * @name Phaser.Physics.Impact.COLLIDES.PASSIVE - * @type {integer} - * @const - * @since 3.0.0 - */ - PASSIVE: 2, - - /** - * Active collision. - * - * @name Phaser.Physics.Impact.COLLIDES.ACTIVE - * @type {integer} - * @const - * @since 3.0.0 - */ - ACTIVE: 4, - - /** - * Fixed collision. - * - * @name Phaser.Physics.Impact.COLLIDES.FIXED - * @type {integer} - * @const - * @since 3.0.0 - */ - FIXED: 8 - -}; - - -/***/ }), -/* 466 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Collision Types - Determine if and how entities collide with each other. - * - * In ACTIVE vs. LITE or FIXED vs. ANY collisions, only the "weak" entity moves, - * while the other one stays fixed. In ACTIVE vs. ACTIVE and ACTIVE vs. PASSIVE - * collisions, both entities are moved. LITE or PASSIVE entities don't collide - * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. - * FIXED collisions is undefined. - * - * @namespace Phaser.Physics.Impact.TYPE - * @memberof Phaser.Physics.Impact - * @since 3.0.0 - */ -module.exports = { - - /** - * Collides with nothing. - * - * @name Phaser.Physics.Impact.TYPE.NONE - * @type {integer} - * @const - * @since 3.0.0 - */ - NONE: 0, - - /** - * Type A. Collides with Type B. - * - * @name Phaser.Physics.Impact.TYPE.A - * @type {integer} - * @const - * @since 3.0.0 - */ - A: 1, - - /** - * Type B. Collides with Type A. - * - * @name Phaser.Physics.Impact.TYPE.B - * @type {integer} - * @const - * @since 3.0.0 - */ - B: 2, - - /** - * Collides with both types A and B. - * - * @name Phaser.Physics.Impact.TYPE.BOTH - * @type {integer} - * @const - * @since 3.0.0 - */ - BOTH: 3 - -}; - - -/***/ }), -/* 467 */ +/* 472 */ /***/ (function(module, exports) { /** @@ -105164,7 +107789,7 @@ module.exports = Pair; /***/ }), -/* 468 */ +/* 473 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105294,7 +107919,7 @@ module.exports = BasePlugin; /***/ }), -/* 469 */ +/* 474 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105339,7 +107964,7 @@ module.exports = ReplaceByIndex; /***/ }), -/* 470 */ +/* 475 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105348,7 +107973,7 @@ module.exports = ReplaceByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var IsInLayerBounds = __webpack_require__(103); +var IsInLayerBounds = __webpack_require__(101); /** * Checks if there is a tile at the given location (in tile coordinates) in the given layer. Returns @@ -105382,7 +108007,7 @@ module.exports = HasTileAt; /***/ }), -/* 471 */ +/* 476 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105392,8 +108017,8 @@ module.exports = HasTileAt; */ var Tile = __webpack_require__(74); -var IsInLayerBounds = __webpack_require__(103); -var CalculateFacesAt = __webpack_require__(217); +var IsInLayerBounds = __webpack_require__(101); +var CalculateFacesAt = __webpack_require__(220); /** * Removes the tile at the given tile coordinates in the specified layer and updates the layer's @@ -105445,7 +108070,7 @@ module.exports = RemoveTileAt; /***/ }), -/* 472 */ +/* 477 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105454,11 +108079,11 @@ module.exports = RemoveTileAt; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var Parse2DArray = __webpack_require__(220); -var ParseCSV = __webpack_require__(473); -var ParseJSONTiled = __webpack_require__(474); -var ParseWeltmeister = __webpack_require__(485); +var Formats = __webpack_require__(32); +var Parse2DArray = __webpack_require__(223); +var ParseCSV = __webpack_require__(478); +var ParseJSONTiled = __webpack_require__(479); +var ParseWeltmeister = __webpack_require__(490); /** * Parses raw data of a given Tilemap format into a new MapData object. If no recognized data format @@ -105515,7 +108140,7 @@ module.exports = Parse; /***/ }), -/* 473 */ +/* 478 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105524,8 +108149,8 @@ module.exports = Parse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var Parse2DArray = __webpack_require__(220); +var Formats = __webpack_require__(32); +var Parse2DArray = __webpack_require__(223); /** * Parses a CSV string of tile indexes into a new MapData object with a single layer. @@ -105563,7 +108188,7 @@ module.exports = ParseCSV; /***/ }), -/* 474 */ +/* 479 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105572,14 +108197,14 @@ module.exports = ParseCSV; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var MapData = __webpack_require__(105); -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); +var Formats = __webpack_require__(32); +var MapData = __webpack_require__(103); +var ParseTileLayers = __webpack_require__(480); +var ParseImageLayers = __webpack_require__(482); +var ParseTilesets = __webpack_require__(483); +var ParseObjectLayers = __webpack_require__(486); +var BuildTilesetIndex = __webpack_require__(488); +var AssignTileProperties = __webpack_require__(489); /** * Parses a Tiled JSON object into a new MapData object. @@ -105641,7 +108266,7 @@ module.exports = ParseJSONTiled; /***/ }), -/* 475 */ +/* 480 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105650,12 +108275,12 @@ module.exports = ParseJSONTiled; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Base64Decode = __webpack_require__(476); +var Base64Decode = __webpack_require__(481); var GetFastValue = __webpack_require__(2); -var LayerData = __webpack_require__(104); -var ParseGID = __webpack_require__(221); +var LayerData = __webpack_require__(102); +var ParseGID = __webpack_require__(224); var Tile = __webpack_require__(74); -var CreateGroupLayer = __webpack_require__(222); +var CreateGroupLayer = __webpack_require__(225); /** * Parses all tilemap layers in a Tiled JSON object into new LayerData objects. @@ -105773,7 +108398,7 @@ var ParseTileLayers = function (json, insertNull) tileHeight: json.tileheight, alpha: (curGroupState.opacity * curl.opacity), visible: (curGroupState.visible && curl.visible), - properties: GetFastValue(curl, 'properties', {}) + properties: GetFastValue(curl, 'properties', []) }); for (var c = 0; c < curl.height; c++) @@ -105846,7 +108471,7 @@ var ParseTileLayers = function (json, insertNull) tileHeight: json.tileheight, alpha: (curGroupState.opacity * curl.opacity), visible: (curGroupState.visible && curl.visible), - properties: GetFastValue(curl, 'properties', {}) + properties: GetFastValue(curl, 'properties', []) }); var row = []; @@ -105899,7 +108524,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 476 */ +/* 481 */ /***/ (function(module, exports) { /** @@ -105942,7 +108567,7 @@ module.exports = Base64Decode; /***/ }), -/* 477 */ +/* 482 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -105952,7 +108577,7 @@ module.exports = Base64Decode; */ var GetFastValue = __webpack_require__(2); -var CreateGroupLayer = __webpack_require__(222); +var CreateGroupLayer = __webpack_require__(225); /** * Parses a Tiled JSON object into an array of objects with details about the image layers. @@ -106030,7 +108655,7 @@ module.exports = ParseImageLayers; /***/ }), -/* 478 */ +/* 483 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106039,9 +108664,9 @@ module.exports = ParseImageLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(141); -var ImageCollection = __webpack_require__(479); -var ParseObject = __webpack_require__(223); +var Tileset = __webpack_require__(104); +var ImageCollection = __webpack_require__(484); +var ParseObject = __webpack_require__(226); /** * Tilesets and Image Collections @@ -106049,9 +108674,9 @@ var ParseObject = __webpack_require__(223); * @function Phaser.Tilemaps.Parsers.Tiled.ParseTilesets * @since 3.0.0 * - * @param {object} json - [description] + * @param {object} json - The Tiled JSON data. * - * @return {object} [description] + * @return {object} An object containing the tileset and image collection data. */ var ParseTilesets = function (json) { @@ -106199,7 +108824,7 @@ module.exports = ParseTilesets; /***/ }), -/* 479 */ +/* 484 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106371,7 +108996,7 @@ module.exports = ImageCollection; /***/ }), -/* 480 */ +/* 485 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106380,7 +109005,7 @@ module.exports = ImageCollection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasValue = __webpack_require__(99); +var HasValue = __webpack_require__(108); /** * Returns a new object that only contains the `keys` that were found on the object provided. @@ -106415,7 +109040,7 @@ module.exports = Pick; /***/ }), -/* 481 */ +/* 486 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106425,9 +109050,9 @@ module.exports = Pick; */ var GetFastValue = __webpack_require__(2); -var ParseObject = __webpack_require__(223); -var ObjectLayer = __webpack_require__(482); -var CreateGroupLayer = __webpack_require__(222); +var ParseObject = __webpack_require__(226); +var ObjectLayer = __webpack_require__(487); +var CreateGroupLayer = __webpack_require__(225); /** * Parses a Tiled JSON object into an array of ObjectLayer objects. @@ -106514,7 +109139,7 @@ module.exports = ParseObjectLayers; /***/ }), -/* 482 */ +/* 487 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106636,8 +109261,8 @@ module.exports = ObjectLayer; /***/ }), -/* 483 */ -/***/ (function(module, exports) { +/* 488 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey @@ -106645,23 +109270,44 @@ module.exports = ObjectLayer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Tileset = __webpack_require__(104); + /** * Master list of tiles -> x, y, index in tileset. * * @function Phaser.Tilemaps.Parsers.Tiled.BuildTilesetIndex * @since 3.0.0 * - * @param {Phaser.Tilemaps.MapData} mapData - [description] + * @param {Phaser.Tilemaps.MapData} mapData - The Map Data object. * - * @return {array} [description] + * @return {array} An array of Tileset objects. */ var BuildTilesetIndex = function (mapData) { + var i; + var set; var tiles = []; - for (var i = 0; i < mapData.tilesets.length; i++) + for (i = 0; i < mapData.imageCollections.length; i++) { - var set = mapData.tilesets[i]; + var collection = mapData.imageCollections[i]; + var images = collection.images; + + for (var j = 0; j < images.length; j++) + { + var image = images[j]; + + set = new Tileset(image.image, image.gid, collection.imageWidth, collection.imageHeight, 0, 0); + + set.updateTileData(collection.imageWidth, collection.imageHeight); + + mapData.tilesets.push(set); + } + } + + for (i = 0; i < mapData.tilesets.length; i++) + { + set = mapData.tilesets[i]; var x = set.tileMargin; var y = set.tileMargin; @@ -106709,7 +109355,7 @@ module.exports = BuildTilesetIndex; /***/ }), -/* 484 */ +/* 489 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106718,7 +109364,7 @@ module.exports = BuildTilesetIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * Copy properties from tileset to tiles. @@ -106726,7 +109372,7 @@ var Extend = __webpack_require__(17); * @function Phaser.Tilemaps.Parsers.Tiled.AssignTileProperties * @since 3.0.0 * - * @param {Phaser.Tilemaps.MapData} mapData - [description] + * @param {Phaser.Tilemaps.MapData} mapData - The Map Data object. */ var AssignTileProperties = function (mapData) { @@ -106782,7 +109428,7 @@ module.exports = AssignTileProperties; /***/ }), -/* 485 */ +/* 490 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106791,10 +109437,10 @@ module.exports = AssignTileProperties; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Formats = __webpack_require__(31); -var MapData = __webpack_require__(105); -var ParseTileLayers = __webpack_require__(486); -var ParseTilesets = __webpack_require__(487); +var Formats = __webpack_require__(32); +var MapData = __webpack_require__(103); +var ParseTileLayers = __webpack_require__(491); +var ParseTilesets = __webpack_require__(492); /** * Parses a Weltmeister JSON object into a new MapData object. @@ -106811,7 +109457,7 @@ var ParseTilesets = __webpack_require__(487); * consumption. However if your map is small or you need to update the tiles dynamically, then leave * the default value set. * - * @return {?object} [description] + * @return {?Phaser.Tilemaps.MapData} The created MapData object, or `null` if the data can't be parsed. */ var ParseWeltmeister = function (name, json, insertNull) { @@ -106849,7 +109495,7 @@ module.exports = ParseWeltmeister; /***/ }), -/* 486 */ +/* 491 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106858,19 +109504,21 @@ module.exports = ParseWeltmeister; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var LayerData = __webpack_require__(104); +var LayerData = __webpack_require__(102); var Tile = __webpack_require__(74); /** - * [description] + * Parses all tilemap layers in an Impact JSON object into new LayerData objects. * * @function Phaser.Tilemaps.Parsers.Impact.ParseTileLayers * @since 3.0.0 * - * @param {object} json - [description] - * @param {boolean} insertNull - [description] + * @param {object} json - The Impact JSON object. + * @param {boolean} insertNull - Controls how empty tiles, tiles with an index of -1, in the map + * data are handled (see {@link Phaser.Tilemaps.Parsers.Tiled.ParseJSONTiled}). * - * @return {array} [description] + * @return {Phaser.Tilemaps.LayerData[]} - An array of LayerData objects, one for each entry in + * json.layers with the type 'tilelayer'. */ var ParseTileLayers = function (json, insertNull) { @@ -106933,7 +109581,7 @@ module.exports = ParseTileLayers; /***/ }), -/* 487 */ +/* 492 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106942,17 +109590,17 @@ module.exports = ParseTileLayers; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Tileset = __webpack_require__(141); +var Tileset = __webpack_require__(104); /** - * [description] + * Tilesets and Image Collections * * @function Phaser.Tilemaps.Parsers.Impact.ParseTilesets * @since 3.0.0 * - * @param {object} json - [description] + * @param {object} json - The Impact JSON data. * - * @return {array} [description] + * @return {array} An array of Tilesets. */ var ParseTilesets = function (json) { @@ -106984,7 +109632,7 @@ module.exports = ParseTilesets; /***/ }), -/* 488 */ +/* 493 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -106995,16 +109643,16 @@ module.exports = ParseTilesets; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); -var DynamicTilemapLayer = __webpack_require__(489); -var Extend = __webpack_require__(17); -var Formats = __webpack_require__(31); -var LayerData = __webpack_require__(104); -var Rotate = __webpack_require__(327); -var SpliceOne = __webpack_require__(79); -var StaticTilemapLayer = __webpack_require__(490); +var DynamicTilemapLayer = __webpack_require__(494); +var Extend = __webpack_require__(18); +var Formats = __webpack_require__(32); +var LayerData = __webpack_require__(102); +var Rotate = __webpack_require__(330); +var SpliceOne = __webpack_require__(80); +var StaticTilemapLayer = __webpack_require__(495); var Tile = __webpack_require__(74); -var TilemapComponents = __webpack_require__(137); -var Tileset = __webpack_require__(141); +var TilemapComponents = __webpack_require__(141); +var Tileset = __webpack_require__(104); /** * @callback TilemapFilterCallback @@ -107660,9 +110308,10 @@ var Tilemap = new Class({ if (obj.height) { sprite.displayHeight = obj.height; } // Origin is (0, 1) in Tiled, so find the offset that matches the Sprite's origin. + // Do not offset objects with zero dimensions (e.g. points). var offset = { - x: sprite.originX * sprite.displayWidth, - y: (sprite.originY - 1) * sprite.displayHeight + x: sprite.originX * obj.width, + y: (sprite.originY - 1) * obj.height }; // If the object is rotated, then the origin offset also needs to be rotated. @@ -108873,7 +111522,6 @@ var Tilemap = new Class({ * * @param {Phaser.GameObjects.Graphics} graphics - The target Graphics object to draw upon. * @param {Phaser.Types.Tilemaps.StyleConfig} styleConfig - An object specifying the colors to use for the debug drawing. - * @param {(string|integer|Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} [layer] - The tile layer to use. If not given the current layer is used. * * @return {?Phaser.Tilemaps.Tilemap} Return this Tilemap object, or null if the layer given was invalid. */ @@ -109541,7 +112189,7 @@ module.exports = Tilemap; /***/ }), -/* 489 */ +/* 494 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -109552,9 +112200,9 @@ module.exports = Tilemap; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var DynamicTilemapLayerRender = __webpack_require__(1333); -var GameObject = __webpack_require__(14); -var TilemapComponents = __webpack_require__(137); +var DynamicTilemapLayerRender = __webpack_require__(1343); +var GameObject = __webpack_require__(13); +var TilemapComponents = __webpack_require__(141); /** * @classdesc @@ -110862,7 +113510,7 @@ module.exports = DynamicTilemapLayer; /***/ }), -/* 490 */ +/* 495 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -110873,12 +113521,12 @@ module.exports = DynamicTilemapLayer; var Class = __webpack_require__(0); var Components = __webpack_require__(12); -var GameEvents = __webpack_require__(18); -var GameObject = __webpack_require__(14); -var StaticTilemapLayerRender = __webpack_require__(1336); -var TilemapComponents = __webpack_require__(137); -var TransformMatrix = __webpack_require__(32); -var Utils = __webpack_require__(10); +var GameEvents = __webpack_require__(20); +var GameObject = __webpack_require__(13); +var StaticTilemapLayerRender = __webpack_require__(1346); +var TilemapComponents = __webpack_require__(141); +var TransformMatrix = __webpack_require__(29); +var Utils = __webpack_require__(9); /** * @classdesc @@ -112356,7 +115004,7 @@ module.exports = StaticTilemapLayer; /***/ }), -/* 491 */ +/* 496 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112669,7 +115317,7 @@ module.exports = TimerEvent; /***/ }), -/* 492 */ +/* 497 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112678,7 +115326,7 @@ module.exports = TimerEvent; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RESERVED = __webpack_require__(1345); +var RESERVED = __webpack_require__(1355); /** * Internal function used by the Tween Builder to return an array of properties @@ -112730,7 +115378,7 @@ module.exports = GetProps; /***/ }), -/* 493 */ +/* 498 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112778,7 +115426,7 @@ module.exports = GetTweens; /***/ }), -/* 494 */ +/* 499 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112787,15 +115435,15 @@ module.exports = GetTweens; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Defaults = __webpack_require__(227); -var GetAdvancedValue = __webpack_require__(15); +var Defaults = __webpack_require__(230); +var GetAdvancedValue = __webpack_require__(14); var GetBoolean = __webpack_require__(88); -var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(142); +var GetEaseFunction = __webpack_require__(69); +var GetNewValue = __webpack_require__(145); var GetValue = __webpack_require__(6); -var GetValueOp = __webpack_require__(226); -var Tween = __webpack_require__(228); -var TweenData = __webpack_require__(230); +var GetValueOp = __webpack_require__(229); +var Tween = __webpack_require__(231); +var TweenData = __webpack_require__(233); /** * Creates a new Number Tween. @@ -112908,7 +115556,7 @@ module.exports = NumberTweenBuilder; /***/ }), -/* 495 */ +/* 500 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -112917,9 +115565,9 @@ module.exports = NumberTweenBuilder; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetEaseFunction = __webpack_require__(82); +var GetEaseFunction = __webpack_require__(69); var GetValue = __webpack_require__(6); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * Creates a Stagger function to be used by a Tween property. @@ -113154,7 +115802,7 @@ module.exports = StaggerBuilder; /***/ }), -/* 496 */ +/* 501 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113164,16 +115812,16 @@ module.exports = StaggerBuilder; */ var Clone = __webpack_require__(67); -var Defaults = __webpack_require__(227); -var GetAdvancedValue = __webpack_require__(15); +var Defaults = __webpack_require__(230); +var GetAdvancedValue = __webpack_require__(14); var GetBoolean = __webpack_require__(88); -var GetEaseFunction = __webpack_require__(82); -var GetNewValue = __webpack_require__(142); -var GetTargets = __webpack_require__(225); -var GetTweens = __webpack_require__(493); +var GetEaseFunction = __webpack_require__(69); +var GetNewValue = __webpack_require__(145); +var GetTargets = __webpack_require__(228); +var GetTweens = __webpack_require__(498); var GetValue = __webpack_require__(6); -var Timeline = __webpack_require__(497); -var TweenBuilder = __webpack_require__(143); +var Timeline = __webpack_require__(502); +var TweenBuilder = __webpack_require__(146); /** * Builds a Timeline of Tweens based on a configuration object. @@ -113306,7 +115954,7 @@ module.exports = TimelineBuilder; /***/ }), -/* 497 */ +/* 502 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -113316,9 +115964,9 @@ module.exports = TimelineBuilder; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(229); -var TweenBuilder = __webpack_require__(143); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(232); +var TweenBuilder = __webpack_require__(146); var TWEEN_CONST = __webpack_require__(89); /** @@ -114211,7 +116859,7 @@ module.exports = Timeline; /***/ }), -/* 498 */ +/* 503 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -114220,7 +116868,7 @@ module.exports = Timeline; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BaseAnimation = __webpack_require__(148); +var BaseAnimation = __webpack_require__(151); var Class = __webpack_require__(0); var Events = __webpack_require__(111); @@ -114513,14 +117161,14 @@ var Animation = new Class({ /** * Sets an animation to be played immediately after the current one completes. - * + * * The current animation must enter a 'completed' state for this to happen, i.e. finish all of its repeats, delays, etc, or have the `stop` method called directly on it. - * + * * An animation set to repeat forever will never enter a completed state. - * + * * You can chain a new animation at any point, including before the current one starts playing, during it, or when it ends (via its `animationcomplete` callback). * Chained animations are specific to a Game Object, meaning different Game Objects can have different chained animations without impacting the global animation they're playing. - * + * * Call this method with no arguments to reset the chained animation. * * @method Phaser.GameObjects.Components.Animation#chain @@ -114712,7 +117360,7 @@ var Animation = new Class({ /** * Plays an Animation on a Game Object that has the Animation component, such as a Sprite. - * + * * Animations are stored in the global Animation Manager and are referenced by a unique string-based key. * * @method Phaser.GameObjects.Components.Animation#play @@ -114786,9 +117434,9 @@ var Animation = new Class({ * Load an Animation and fires 'onStartEvent' event, extracted from 'play' method. * * @method Phaser.GameObjects.Components.Animation#_startAnimation - * @fires Phaser.Animations.Events#START_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_START_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_START_KEY_ANIMATION_EVENT + * @fires Phaser.Animations.Events#ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_START + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_START * @since 3.12.0 * * @param {string} key - The string-based key of the animation to play, as defined previously in the Animation Manager. @@ -114993,9 +117641,9 @@ var Animation = new Class({ * Restarts the current animation from its beginning, optionally including its delay value. * * @method Phaser.GameObjects.Components.Animation#restart - * @fires Phaser.Animations.Events#RESTART_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_RESTART_ANIMATION_EVENT - * @fires Phaser.Animations.Events#SPRITE_RESTART_KEY_ANIMATION_EVENT + * @fires Phaser.Animations.Events#ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_RESTART + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_RESTART * @since 3.0.0 * * @param {boolean} [includeDelay=false] - Whether to include the delay value of the animation when restarting. @@ -115032,9 +117680,9 @@ var Animation = new Class({ /** * Immediately stops the current animation from playing and dispatches the `animationcomplete` event. - * + * * If no animation is set, no event will be dispatched. - * + * * If there is another animation queued (via the `chain` method) then it will start playing immediately. * * @method Phaser.GameObjects.Components.Animation#stop @@ -115058,7 +117706,7 @@ var Animation = new Class({ anim.emit(Events.ANIMATION_COMPLETE, anim, frame, gameObject); gameObject.emit(Events.SPRITE_ANIMATION_KEY_COMPLETE + anim.key, anim, frame, gameObject); - + gameObject.emit(Events.SPRITE_ANIMATION_COMPLETE, anim, frame, gameObject); } @@ -115236,13 +117884,16 @@ var Animation = new Class({ gameObject.setSizeToFrame(); - if (animationFrame.frame.customPivot) + if (gameObject._originComponent) { - gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); - } - else - { - gameObject.updateDisplayOrigin(); + if (animationFrame.frame.customPivot) + { + gameObject.setOrigin(animationFrame.frame.pivotX, animationFrame.frame.pivotY); + } + else + { + gameObject.updateDisplayOrigin(); + } } return gameObject; @@ -115252,8 +117903,8 @@ var Animation = new Class({ * Internal frame change handler. * * @method Phaser.GameObjects.Components.Animation#updateFrame - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE_EVENT - * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE_EVENT + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_UPDATE + * @fires Phaser.Animations.Events#SPRITE_ANIMATION_KEY_UPDATE * @private * @since 3.0.0 * @@ -115286,7 +117937,7 @@ var Animation = new Class({ /** * Advances the animation to the next frame, regardless of the time or animation state. * If the animation is set to repeat, or yoyo, this will still take effect. - * + * * Calling this does not change the direction of the animation. I.e. if it was currently * playing in reverse, calling this method doesn't then change the direction to forwards. * @@ -115308,7 +117959,7 @@ var Animation = new Class({ /** * Advances the animation to the previous frame, regardless of the time or animation state. * If the animation is set to repeat, or yoyo, this will still take effect. - * + * * Calling this does not change the direction of the animation. I.e. if it was currently * playing in forwards, calling this method doesn't then change the direction to backwards. * @@ -115386,7 +118037,7 @@ module.exports = Animation; /***/ }), -/* 499 */ +/* 504 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -115396,13 +118047,13 @@ module.exports = Animation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CanvasSnapshot = __webpack_require__(500); -var CameraEvents = __webpack_require__(48); +var CanvasSnapshot = __webpack_require__(505); +var CameraEvents = __webpack_require__(36); var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); -var GetBlendModes = __webpack_require__(501); +var CONST = __webpack_require__(33); +var GetBlendModes = __webpack_require__(506); var ScaleEvents = __webpack_require__(92); -var TransformMatrix = __webpack_require__(32); +var TransformMatrix = __webpack_require__(29); /** * @classdesc @@ -115847,7 +118498,10 @@ var CanvasRenderer = new Class({ { camera.emit(CameraEvents.POST_RENDER, camera); - scene.sys.context.drawImage(camera.canvas, cx, cy); + if (camera.renderToGame) + { + scene.sys.context.drawImage(camera.canvas, cx, cy); + } } }, @@ -116180,7 +118834,7 @@ module.exports = CanvasRenderer; /***/ }), -/* 500 */ +/* 505 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116190,7 +118844,7 @@ module.exports = CanvasRenderer; */ var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); var GetFastValue = __webpack_require__(2); /** @@ -116273,7 +118927,7 @@ module.exports = CanvasSnapshot; /***/ }), -/* 501 */ +/* 506 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116283,7 +118937,7 @@ module.exports = CanvasSnapshot; */ var modes = __webpack_require__(52); -var CanvasFeatures = __webpack_require__(313); +var CanvasFeatures = __webpack_require__(316); /** * Returns an array which maps the default blend modes to supported Canvas blend modes. @@ -116337,7 +118991,7 @@ module.exports = GetBlendModes; /***/ }), -/* 502 */ +/* 507 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -116348,23 +119002,24 @@ module.exports = GetBlendModes; */ var BaseCamera = __webpack_require__(91); -var CameraEvents = __webpack_require__(48); +var CameraEvents = __webpack_require__(36); var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); -var GameEvents = __webpack_require__(18); -var IsSizePowerOfTwo = __webpack_require__(118); +var CONST = __webpack_require__(33); +var GameEvents = __webpack_require__(20); +var IsSizePowerOfTwo = __webpack_require__(120); var NOOP = __webpack_require__(1); var ScaleEvents = __webpack_require__(92); -var SpliceOne = __webpack_require__(79); -var TextureEvents = __webpack_require__(119); -var TransformMatrix = __webpack_require__(32); -var Utils = __webpack_require__(10); -var WebGLSnapshot = __webpack_require__(503); +var SpliceOne = __webpack_require__(80); +var TextureEvents = __webpack_require__(121); +var TransformMatrix = __webpack_require__(29); +var Utils = __webpack_require__(9); +var WebGLSnapshot = __webpack_require__(508); // Default Pipelines -var BitmapMaskPipeline = __webpack_require__(504); -var ForwardDiffuseLightPipeline = __webpack_require__(505); -var TextureTintPipeline = __webpack_require__(235); +var BitmapMaskPipeline = __webpack_require__(509); +var ForwardDiffuseLightPipeline = __webpack_require__(510); +var TextureTintPipeline = __webpack_require__(237); +var TextureTintStripPipeline = __webpack_require__(511); /** * @callback WebGLContextCallback @@ -117053,6 +119708,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 })); @@ -118263,6 +120919,8 @@ var WebGLRenderer = new Class({ */ postRenderCamera: function (camera) { + this.setPipeline(this.pipelines.TextureTintPipeline); + var TextureTintPipeline = this.pipelines.TextureTintPipeline; camera.flashEffect.postRenderWebGL(TextureTintPipeline, Utils.getTintFromFloats); @@ -118280,33 +120938,36 @@ var WebGLRenderer = new Class({ camera.emit(CameraEvents.POST_RENDER, camera); - TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); + if (camera.renderToGame) + { + TextureTintPipeline.projOrtho(0, TextureTintPipeline.width, TextureTintPipeline.height, 0, -1000.0, 1000.0); - var getTint = Utils.getTintAppendFloatAlpha; - - var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; - - pipeline.batchTexture( - camera, - camera.glTexture, - camera.width, camera.height, - camera.x, camera.y, - camera.width, camera.height, - camera.zoom, camera.zoom, - camera.rotation, - camera.flipX, !camera.flipY, - 1, 1, - 0, 0, - 0, 0, camera.width, camera.height, - getTint(camera._tintTL, camera._alphaTL), - getTint(camera._tintTR, camera._alphaTR), - getTint(camera._tintBL, camera._alphaBL), - getTint(camera._tintBR, camera._alphaBR), - (camera._isTinted && camera.tintFill), - 0, 0, - this.defaultCamera, - null - ); + var getTint = Utils.getTintAppendFloatAlpha; + + var pipeline = (camera.pipeline) ? camera.pipeline : TextureTintPipeline; + + pipeline.batchTexture( + camera, + camera.glTexture, + camera.width, camera.height, + camera.x, camera.y, + camera.width, camera.height, + camera.zoom, camera.zoom, + camera.rotation, + camera.flipX, !camera.flipY, + 1, 1, + 0, 0, + 0, 0, camera.width, camera.height, + getTint(camera._tintTL, camera._alphaTL), + getTint(camera._tintTR, camera._alphaTR), + getTint(camera._tintBL, camera._alphaBL), + getTint(camera._tintBR, camera._alphaBR), + (camera._isTinted && camera.tintFill), + 0, 0, + this.defaultCamera, + null + ); + } // Force clear the current texture so that items next in the batch (like Graphics) don't try and use it this.setBlankTexture(true); @@ -118884,14 +121545,16 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets a 1f uniform value on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] + * @param {number} x - The 1f value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -118905,15 +121568,17 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the 2f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] - * @param {number} y - [description] + * @param {number} x - The 2f x value to set on the named uniform. + * @param {number} y - The 2f y value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -118927,16 +121592,18 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the 3f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} z - [description] + * @param {number} x - The 3f x value to set on the named uniform. + * @param {number} y - The 3f y value to set on the named uniform. + * @param {number} z - The 3f z value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -118950,17 +121617,19 @@ var WebGLRenderer = new Class({ }, /** - * Sets uniform of a WebGLProgram + * Sets the 4f uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {number} x - X component - * @param {number} y - Y component - * @param {number} z - Z component - * @param {number} w - W component + * @param {number} x - The 4f x value to set on the named uniform. + * @param {number} y - The 4f y value to set on the named uniform. + * @param {number} z - The 4f z value to set on the named uniform. + * @param {number} w - The 4f w value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -118974,7 +121643,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 1fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat1v * @since 3.13.0 @@ -118995,7 +121666,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 2fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat2v * @since 3.13.0 @@ -119016,7 +121689,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 3fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat3v * @since 3.13.0 @@ -119037,7 +121712,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the value of a 4fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setFloat4v * @since 3.13.0 @@ -119059,14 +121736,16 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets a 1i uniform value on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt1 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - [description] + * @param {integer} x - The 1i value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -119080,15 +121759,17 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 2i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt2 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component - * @param {integer} y - The new Y component + * @param {integer} x - The 2i x value to set on the named uniform. + * @param {integer} y - The 2i y value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -119102,16 +121783,18 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 3i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - The new X component - * @param {integer} y - The new Y component - * @param {integer} z - The new Z component + * @param {integer} x - The 3i x value to set on the named uniform. + * @param {integer} y - The 3i y value to set on the named uniform. + * @param {integer} z - The 3i z value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -119125,17 +121808,19 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a uniform variable in the given WebGLProgram. + * Sets the 4i uniform values on the given shader. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setInt4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {integer} x - X component - * @param {integer} y - Y component - * @param {integer} z - Z component - * @param {integer} w - W component + * @param {integer} x - The 4i x value to set on the named uniform. + * @param {integer} y - The 4i y value to set on the named uniform. + * @param {integer} z - The 4i z value to set on the named uniform. + * @param {integer} w - The 4i w value to set on the named uniform. * * @return {this} This WebGL Renderer instance. */ @@ -119149,7 +121834,9 @@ var WebGLRenderer = new Class({ }, /** - * Sets the value of a 2x2 matrix uniform variable in the given WebGLProgram. + * Sets the value of a matrix 2fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix2 * @since 3.0.0 @@ -119157,7 +121844,7 @@ var WebGLRenderer = new Class({ * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. - * @param {Float32Array} matrix - The new matrix value. + * @param {Float32Array} matrix - A Float32Array or sequence of 4 float values. * * @return {this} This WebGL Renderer instance. */ @@ -119171,15 +121858,17 @@ var WebGLRenderer = new Class({ }, /** - * [description] + * Sets the value of a matrix 3fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix3 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - [description] - * @param {Float32Array} matrix - [description] + * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. + * @param {Float32Array} matrix - A Float32Array or sequence of 9 float values. * * @return {this} This WebGL Renderer instance. */ @@ -119193,15 +121882,17 @@ var WebGLRenderer = new Class({ }, /** - * Sets uniform of a WebGLProgram + * Sets the value of a matrix 4fv uniform variable in the given WebGLProgram. + * + * If the shader is not currently active, it is made active first. * * @method Phaser.Renderer.WebGL.WebGLRenderer#setMatrix4 * @since 3.0.0 * * @param {WebGLProgram} program - The target WebGLProgram from which the uniform location will be looked-up. * @param {string} name - The name of the uniform to look-up and modify. - * @param {boolean} transpose - Is the matrix transposed - * @param {Float32Array} matrix - Matrix data + * @param {boolean} transpose - The value indicating whether to transpose the matrix. Must be false. + * @param {Float32Array} matrix - A Float32Array or sequence of 16 float values. * * @return {this} This WebGL Renderer instance. */ @@ -119291,7 +121982,7 @@ module.exports = WebGLRenderer; /***/ }), -/* 503 */ +/* 508 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119301,7 +121992,7 @@ module.exports = WebGLRenderer; */ var CanvasPool = __webpack_require__(26); -var Color = __webpack_require__(33); +var Color = __webpack_require__(31); var GetFastValue = __webpack_require__(2); /** @@ -119401,7 +122092,7 @@ module.exports = WebGLSnapshot; /***/ }), -/* 504 */ +/* 509 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119412,9 +122103,9 @@ module.exports = WebGLSnapshot; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(776); -var ShaderSourceVS = __webpack_require__(777); -var WebGLPipeline = __webpack_require__(234); +var ShaderSourceFS = __webpack_require__(785); +var ShaderSourceVS = __webpack_require__(786); +var WebGLPipeline = __webpack_require__(147); /** * @classdesc @@ -119532,21 +122223,23 @@ var BitmapMaskPipeline = new Class({ }, /** - * [description] + * Resizes this pipeline and updates the projection. * * @method Phaser.Renderer.WebGL.Pipelines.BitmapMaskPipeline#resize * @since 3.0.0 * - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} resolution - [description] + * @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.resolutionDirty = true; + return this; }, @@ -119559,7 +122252,7 @@ var BitmapMaskPipeline = new Class({ * * @param {Phaser.GameObjects.GameObject} mask - GameObject used as mask. * @param {Phaser.GameObjects.GameObject} maskedObject - GameObject masked by the mask GameObject. - * @param {Phaser.Cameras.Scene2D.Camera} camera - [description] + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera rendering the current mask. */ beginMask: function (mask, maskedObject, camera) { @@ -119664,7 +122357,7 @@ module.exports = BitmapMaskPipeline; /***/ }), -/* 505 */ +/* 510 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -119675,8 +122368,8 @@ module.exports = BitmapMaskPipeline; */ var Class = __webpack_require__(0); -var ShaderSourceFS = __webpack_require__(778); -var TextureTintPipeline = __webpack_require__(235); +var ShaderSourceFS = __webpack_require__(787); +var TextureTintPipeline = __webpack_require__(237); var LIGHT_COUNT = 10; @@ -120185,757 +122878,417 @@ module.exports = ForwardDiffuseLightPipeline; /***/ }), -/* 506 */ -/***/ (function(module, exports) { +/* 511 */ +/***/ (function(module, exports, __webpack_require__) { /** * @author Richard Davey + * @author Felipe Alfonso <@bitnenfer> * @copyright 2020 Photon Storm Ltd. * @license {@link https://opensource.org/licenses/MIT|MIT License} */ +var Class = __webpack_require__(0); +var GetFastValue = __webpack_require__(2); +var ModelViewProjection = __webpack_require__(238); +var ShaderSourceFS = __webpack_require__(339); +var ShaderSourceVS = __webpack_require__(340); +var TransformMatrix = __webpack_require__(29); +var WebGLPipeline = __webpack_require__(147); + /** - * Implements a model view projection matrices. - * Pipelines can implement this for doing 2D and 3D rendering. + * @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. * - * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection - * @since 3.0.0 + * @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 ModelViewProjection = { +var TextureTintStripPipeline = new Class({ - /** - * Dirty flag for checking if model matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - modelMatrixDirty: false, + Extends: WebGLPipeline, - /** - * Dirty flag for checking if view matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - viewMatrixDirty: false, + Mixins: [ + ModelViewProjection + ], - /** - * Dirty flag for checking if projection matrix needs to be updated on GPU. - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrixDirty - * @type {boolean} - * @since 3.0.0 - */ - projectionMatrixDirty: false, + initialize: - /** - * Model matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - modelMatrix: null, - - /** - * View matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - viewMatrix: null, - - /** - * Projection matrix - * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projectionMatrix - * @type {?Float32Array} - * @since 3.0.0 - */ - projectionMatrix: null, - - /** - * Initializes MVP matrices with an identity matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpInit - * @since 3.0.0 - */ - mvpInit: function () + function TextureTintStripPipeline (config) { - this.modelMatrixDirty = true; - this.viewMatrixDirty = true; - this.projectionMatrixDirty = true; - - 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 - ]); - + 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; }, /** - * If dirty flags are set then the matrices are uploaded to the GPU. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#mvpUpdate - * @since 3.0.0 + * 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. */ - mvpUpdate: function () + resize: function (width, height, resolution) { - var program = this.program; + WebGLPipeline.prototype.resize.call(this, width, height, resolution); - if (this.modelMatrixDirty) - { - this.renderer.setMatrix4(program, 'uModelMatrix', false, this.modelMatrix); - this.modelMatrixDirty = false; - } - - if (this.viewMatrixDirty) - { - this.renderer.setMatrix4(program, 'uViewMatrix', false, this.viewMatrix); - this.viewMatrixDirty = false; - } + this.projOrtho(0, this.width, this.height, 0, -1000.0, 1000.0); - if (this.projectionMatrixDirty) + 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.renderer.setMatrix4(program, 'uProjectionMatrix', false, this.projectionMatrix); - this.projectionMatrixDirty = false; + this.pushBatch(texture, unit); } return this; }, /** - * Loads an identity matrix to the model matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelIdentity - * @since 3.0.0 + * 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`. */ - modelIdentity: function () + requireTextureBatch: function (texture, unit) { - var modelMatrix = this.modelMatrix; - - modelMatrix[0] = 1; - modelMatrix[1] = 0; - modelMatrix[2] = 0; - modelMatrix[3] = 0; - modelMatrix[4] = 0; - modelMatrix[5] = 1; - modelMatrix[6] = 0; - modelMatrix[7] = 0; - modelMatrix[8] = 0; - modelMatrix[9] = 0; - modelMatrix[10] = 1; - modelMatrix[11] = 0; - modelMatrix[12] = 0; - modelMatrix[13] = 0; - modelMatrix[14] = 0; - modelMatrix[15] = 1; + var batches = this.batches; + var batchLength = batches.length; - this.modelMatrixDirty = true; - - return this; + 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; }, /** - * Scale model matrix + * 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 * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelScale - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. + * @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. */ - modelScale: function (x, y, z) + pushBatch: function (texture, unit) { - var modelMatrix = this.modelMatrix; + if (unit === 0) + { + this.batches.push({ + first: this.vertexCount, + texture: texture, + textures: [] + }); + } + else + { + var textures = []; - modelMatrix[0] = modelMatrix[0] * x; - modelMatrix[1] = modelMatrix[1] * x; - modelMatrix[2] = modelMatrix[2] * x; - modelMatrix[3] = modelMatrix[3] * x; - modelMatrix[4] = modelMatrix[4] * y; - modelMatrix[5] = modelMatrix[5] * y; - modelMatrix[6] = modelMatrix[6] * y; - modelMatrix[7] = modelMatrix[7] * y; - modelMatrix[8] = modelMatrix[8] * z; - modelMatrix[9] = modelMatrix[9] * z; - modelMatrix[10] = modelMatrix[10] * z; - modelMatrix[11] = modelMatrix[11] * z; - - this.modelMatrixDirty = true; + textures[unit - 1] = texture; - return this; + this.batches.push({ + first: this.vertexCount, + texture: null, + textures: textures + }); + } }, /** - * Translate model matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelTranslate - * @since 3.0.0 + * Uploads the vertex data and emits a draw call for the current batch of vertices. * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. + * @method Phaser.Renderer.WebGL.Pipelines.TextureTintStripPipeline#flush + * @since 3.23.0 * - * @return {this} This Model View Projection. + * @return {this} This WebGLPipeline instance. */ - modelTranslate: function (x, y, z) + flush: function () { - var modelMatrix = this.modelMatrix; + if (this.flushLocked) + { + return this; + } - modelMatrix[12] = modelMatrix[0] * x + modelMatrix[4] * y + modelMatrix[8] * z + modelMatrix[12]; - modelMatrix[13] = modelMatrix[1] * x + modelMatrix[5] * y + modelMatrix[9] * z + modelMatrix[13]; - modelMatrix[14] = modelMatrix[2] * x + modelMatrix[6] * y + modelMatrix[10] * z + modelMatrix[14]; - modelMatrix[15] = modelMatrix[3] * x + modelMatrix[7] * y + modelMatrix[11] * z + modelMatrix[15]; + this.flushLocked = true; - this.modelMatrixDirty = true; + var gl = this.gl; + var vertexCount = this.vertexCount; + var topology = this.topology; + var vertexSize = this.vertexSize; + var renderer = this.renderer; - return this; - }, + var batches = this.batches; + var batchCount = batches.length; + var batchVertexCount = 0; + var batch = null; + var batchNext; + var textureIndex; + var nTexture; - /** - * Rotates the model matrix in the X axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateX - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateX: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a10 = modelMatrix[4]; - var a11 = modelMatrix[5]; - var a12 = modelMatrix[6]; - var a13 = modelMatrix[7]; - var a20 = modelMatrix[8]; - var a21 = modelMatrix[9]; - var a22 = modelMatrix[10]; - var a23 = modelMatrix[11]; + if (batchCount === 0 || vertexCount === 0) + { + this.flushLocked = false; - modelMatrix[4] = a10 * c + a20 * s; - modelMatrix[5] = a11 * c + a21 * s; - modelMatrix[6] = a12 * c + a22 * s; - modelMatrix[7] = a13 * c + a23 * s; - modelMatrix[8] = a20 * c - a10 * s; - modelMatrix[9] = a21 * c - a11 * s; - modelMatrix[10] = a22 * c - a12 * s; - modelMatrix[11] = a23 * c - a13 * s; + return this; + } - this.modelMatrixDirty = true; + gl.bufferSubData(gl.ARRAY_BUFFER, 0, this.bytes.subarray(0, vertexCount * vertexSize)); - return this; - }, + // Process the TEXTURE BATCHES - /** - * Rotates the model matrix in the Y axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateY - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateY: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = modelMatrix[0]; - var a01 = modelMatrix[1]; - var a02 = modelMatrix[2]; - var a03 = modelMatrix[3]; - var a20 = modelMatrix[8]; - var a21 = modelMatrix[9]; - var a22 = modelMatrix[10]; - var a23 = modelMatrix[11]; + for (var index = 0; index < batchCount - 1; index++) + { + batch = batches[index]; + batchNext = batches[index + 1]; - modelMatrix[0] = a00 * c - a20 * s; - modelMatrix[1] = a01 * c - a21 * s; - modelMatrix[2] = a02 * c - a22 * s; - modelMatrix[3] = a03 * c - a23 * s; - modelMatrix[8] = a00 * s + a20 * c; - modelMatrix[9] = a01 * s + a21 * c; - modelMatrix[10] = a02 * s + a22 * c; - modelMatrix[11] = a03 * s + a23 * c; + // 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]; - this.modelMatrixDirty = true; - - return this; - }, - - /** - * Rotates the model matrix in the Z axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#modelRotateZ - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - modelRotateZ: function (radians) - { - var modelMatrix = this.modelMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = modelMatrix[0]; - var a01 = modelMatrix[1]; - var a02 = modelMatrix[2]; - var a03 = modelMatrix[3]; - var a10 = modelMatrix[4]; - var a11 = modelMatrix[5]; - var a12 = modelMatrix[6]; - var a13 = modelMatrix[7]; + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex, false); + } + } - modelMatrix[0] = a00 * c + a10 * s; - modelMatrix[1] = a01 * c + a11 * s; - modelMatrix[2] = a02 * c + a12 * s; - modelMatrix[3] = a03 * c + a13 * s; - modelMatrix[4] = a10 * c - a00 * s; - modelMatrix[5] = a11 * c - a01 * s; - modelMatrix[6] = a12 * c - a02 * s; - modelMatrix[7] = a13 * c - a03 * s; + gl.activeTexture(gl.TEXTURE0); + } - this.modelMatrixDirty = true; + batchVertexCount = batchNext.first - batch.first; - return this; - }, + // Bail out if texture property is null (i.e. if a texture unit > 0) + if (batch.texture === null || batchVertexCount <= 0) + { + continue; + } - /** - * Loads identity matrix into the view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewIdentity - * @since 3.0.0 - * - * @return {this} This Model View Projection. - */ - viewIdentity: function () - { - var viewMatrix = this.viewMatrix; - - viewMatrix[0] = 1; - viewMatrix[1] = 0; - viewMatrix[2] = 0; - viewMatrix[3] = 0; - viewMatrix[4] = 0; - viewMatrix[5] = 1; - viewMatrix[6] = 0; - viewMatrix[7] = 0; - viewMatrix[8] = 0; - viewMatrix[9] = 0; - viewMatrix[10] = 1; - viewMatrix[11] = 0; - viewMatrix[12] = 0; - viewMatrix[13] = 0; - viewMatrix[14] = 0; - viewMatrix[15] = 1; + renderer.setTexture2D(batch.texture, 0, false); - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Scales view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewScale - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. - */ - viewScale: function (x, y, z) - { - var viewMatrix = this.viewMatrix; + gl.drawArrays(topology, batch.first, batchVertexCount); + } - viewMatrix[0] = viewMatrix[0] * x; - viewMatrix[1] = viewMatrix[1] * x; - viewMatrix[2] = viewMatrix[2] * x; - viewMatrix[3] = viewMatrix[3] * x; - viewMatrix[4] = viewMatrix[4] * y; - viewMatrix[5] = viewMatrix[5] * y; - viewMatrix[6] = viewMatrix[6] * y; - viewMatrix[7] = viewMatrix[7] * y; - viewMatrix[8] = viewMatrix[8] * z; - viewMatrix[9] = viewMatrix[9] * z; - viewMatrix[10] = viewMatrix[10] * z; - viewMatrix[11] = viewMatrix[11] * z; - - this.viewMatrixDirty = true; + // Left over data + batch = batches[batchCount - 1]; - return this; - }, + // Multi-texture check (for non-zero texture units) - /** - * Translates view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewTranslate - * @since 3.0.0 - * - * @param {number} x - The x component. - * @param {number} y - The y component. - * @param {number} z - The z component. - * - * @return {this} This Model View Projection. - */ - viewTranslate: function (x, y, z) - { - var viewMatrix = this.viewMatrix; + if (batch.textures.length > 0) + { + for (textureIndex = 0; textureIndex < batch.textures.length; ++textureIndex) + { + nTexture = batch.textures[textureIndex]; - viewMatrix[12] = viewMatrix[0] * x + viewMatrix[4] * y + viewMatrix[8] * z + viewMatrix[12]; - viewMatrix[13] = viewMatrix[1] * x + viewMatrix[5] * y + viewMatrix[9] * z + viewMatrix[13]; - viewMatrix[14] = viewMatrix[2] * x + viewMatrix[6] * y + viewMatrix[10] * z + viewMatrix[14]; - viewMatrix[15] = viewMatrix[3] * x + viewMatrix[7] * y + viewMatrix[11] * z + viewMatrix[15]; + if (nTexture) + { + renderer.setTexture2D(nTexture, 1 + textureIndex, false); + } + } - this.viewMatrixDirty = true; + gl.activeTexture(gl.TEXTURE0); + } - return this; - }, - - /** - * Rotates view matrix in the X axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateX - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateX: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a10 = viewMatrix[4]; - var a11 = viewMatrix[5]; - var a12 = viewMatrix[6]; - var a13 = viewMatrix[7]; - var a20 = viewMatrix[8]; - var a21 = viewMatrix[9]; - var a22 = viewMatrix[10]; - var a23 = viewMatrix[11]; + batchVertexCount = vertexCount - batch.first; - viewMatrix[4] = a10 * c + a20 * s; - viewMatrix[5] = a11 * c + a21 * s; - viewMatrix[6] = a12 * c + a22 * s; - viewMatrix[7] = a13 * c + a23 * s; - viewMatrix[8] = a20 * c - a10 * s; - viewMatrix[9] = a21 * c - a11 * s; - viewMatrix[10] = a22 * c - a12 * s; - viewMatrix[11] = a23 * c - a13 * s; + if (batch.texture && batchVertexCount > 0) + { + renderer.setTexture2D(batch.texture, 0, false); - this.viewMatrixDirty = true; + gl.drawArrays(topology, batch.first, batchVertexCount); + } - return this; - }, - - /** - * Rotates view matrix in the Y axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateY - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateY: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = viewMatrix[0]; - var a01 = viewMatrix[1]; - var a02 = viewMatrix[2]; - var a03 = viewMatrix[3]; - var a20 = viewMatrix[8]; - var a21 = viewMatrix[9]; - var a22 = viewMatrix[10]; - var a23 = viewMatrix[11]; + this.vertexCount = 0; - viewMatrix[0] = a00 * c - a20 * s; - viewMatrix[1] = a01 * c - a21 * s; - viewMatrix[2] = a02 * c - a22 * s; - viewMatrix[3] = a03 * c - a23 * s; - viewMatrix[8] = a00 * s + a20 * c; - viewMatrix[9] = a01 * s + a21 * c; - viewMatrix[10] = a02 * s + a22 * c; - viewMatrix[11] = a03 * s + a23 * c; + batches.length = 0; - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Rotates view matrix in the Z axis. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewRotateZ - * @since 3.0.0 - * - * @param {number} radians - The amount to rotate by. - * - * @return {this} This Model View Projection. - */ - viewRotateZ: function (radians) - { - var viewMatrix = this.viewMatrix; - var s = Math.sin(radians); - var c = Math.cos(radians); - var a00 = viewMatrix[0]; - var a01 = viewMatrix[1]; - var a02 = viewMatrix[2]; - var a03 = viewMatrix[3]; - var a10 = viewMatrix[4]; - var a11 = viewMatrix[5]; - var a12 = viewMatrix[6]; - var a13 = viewMatrix[7]; - - viewMatrix[0] = a00 * c + a10 * s; - viewMatrix[1] = a01 * c + a11 * s; - viewMatrix[2] = a02 * c + a12 * s; - viewMatrix[3] = a03 * c + a13 * s; - viewMatrix[4] = a10 * c - a00 * s; - viewMatrix[5] = a11 * c - a01 * s; - viewMatrix[6] = a12 * c - a02 * s; - viewMatrix[7] = a13 * c - a03 * s; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Loads a 2D view matrix (3x2 matrix) into a 4x4 view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad2D - * @since 3.0.0 - * - * @param {Float32Array} matrix2D - The Matrix2D. - * - * @return {this} This Model View Projection. - */ - viewLoad2D: function (matrix2D) - { - var vm = this.viewMatrix; - - vm[0] = matrix2D[0]; - vm[1] = matrix2D[1]; - vm[2] = 0.0; - vm[3] = 0.0; - vm[4] = matrix2D[2]; - vm[5] = matrix2D[3]; - vm[6] = 0.0; - vm[7] = 0.0; - vm[8] = matrix2D[4]; - vm[9] = matrix2D[5]; - vm[10] = 1.0; - vm[11] = 0.0; - vm[12] = 0.0; - vm[13] = 0.0; - vm[14] = 0.0; - vm[15] = 1.0; - - this.viewMatrixDirty = true; - - return this; - }, - - - /** - * Copies a 4x4 matrix into the view matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#viewLoad - * @since 3.0.0 - * - * @param {Float32Array} matrix - The Matrix2D. - * - * @return {this} This Model View Projection. - */ - viewLoad: function (matrix) - { - var vm = this.viewMatrix; - - vm[0] = matrix[0]; - vm[1] = matrix[1]; - vm[2] = matrix[2]; - vm[3] = matrix[3]; - vm[4] = matrix[4]; - vm[5] = matrix[5]; - vm[6] = matrix[6]; - vm[7] = matrix[7]; - vm[8] = matrix[8]; - vm[9] = matrix[9]; - vm[10] = matrix[10]; - vm[11] = matrix[11]; - vm[12] = matrix[12]; - vm[13] = matrix[13]; - vm[14] = matrix[14]; - vm[15] = matrix[15]; - - this.viewMatrixDirty = true; - - return this; - }, - - /** - * Loads identity matrix into the projection matrix. - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projIdentity - * @since 3.0.0 - * - * @return {this} This Model View Projection. - */ - projIdentity: function () - { - var projectionMatrix = this.projectionMatrix; - - projectionMatrix[0] = 1; - projectionMatrix[1] = 0; - projectionMatrix[2] = 0; - projectionMatrix[3] = 0; - projectionMatrix[4] = 0; - projectionMatrix[5] = 1; - projectionMatrix[6] = 0; - projectionMatrix[7] = 0; - projectionMatrix[8] = 0; - projectionMatrix[9] = 0; - projectionMatrix[10] = 1; - projectionMatrix[11] = 0; - projectionMatrix[12] = 0; - projectionMatrix[13] = 0; - projectionMatrix[14] = 0; - projectionMatrix[15] = 1; - - this.projectionMatrixDirty = true; - - return this; - }, - - /** - * Sets up an orthographic projection matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projOrtho - * @since 3.0.0 - * - * @param {number} left - The left value. - * @param {number} right - The right value. - * @param {number} bottom - The bottom value. - * @param {number} top - The top value. - * @param {number} near - The near value. - * @param {number} far - The far value. - * - * @return {this} This Model View Projection. - */ - projOrtho: function (left, right, bottom, top, near, far) - { - var projectionMatrix = this.projectionMatrix; - var leftRight = 1.0 / (left - right); - var bottomTop = 1.0 / (bottom - top); - var nearFar = 1.0 / (near - far); - - projectionMatrix[0] = -2.0 * leftRight; - projectionMatrix[1] = 0.0; - projectionMatrix[2] = 0.0; - projectionMatrix[3] = 0.0; - projectionMatrix[4] = 0.0; - projectionMatrix[5] = -2.0 * bottomTop; - projectionMatrix[6] = 0.0; - projectionMatrix[7] = 0.0; - projectionMatrix[8] = 0.0; - projectionMatrix[9] = 0.0; - projectionMatrix[10] = 2.0 * nearFar; - projectionMatrix[11] = 0.0; - projectionMatrix[12] = (left + right) * leftRight; - projectionMatrix[13] = (top + bottom) * bottomTop; - projectionMatrix[14] = (far + near) * nearFar; - projectionMatrix[15] = 1.0; - - this.projectionMatrixDirty = true; - - return this; - }, - - /** - * Sets up a perspective projection matrix - * - * @method Phaser.Renderer.WebGL.Pipelines.ModelViewProjection#projPersp - * @since 3.0.0 - * - * @param {number} fovY - The fov value. - * @param {number} aspectRatio - The aspectRatio value. - * @param {number} near - The near value. - * @param {number} far - The far value. - * - * @return {this} This Model View Projection. - */ - projPersp: function (fovY, aspectRatio, near, far) - { - var projectionMatrix = this.projectionMatrix; - var fov = 1.0 / Math.tan(fovY / 2.0); - var nearFar = 1.0 / (near - far); - - projectionMatrix[0] = fov / aspectRatio; - projectionMatrix[1] = 0.0; - projectionMatrix[2] = 0.0; - projectionMatrix[3] = 0.0; - projectionMatrix[4] = 0.0; - projectionMatrix[5] = fov; - projectionMatrix[6] = 0.0; - projectionMatrix[7] = 0.0; - projectionMatrix[8] = 0.0; - projectionMatrix[9] = 0.0; - projectionMatrix[10] = (far + near) * nearFar; - projectionMatrix[11] = -1.0; - projectionMatrix[12] = 0.0; - projectionMatrix[13] = 0.0; - projectionMatrix[14] = (2.0 * far * near) * nearFar; - projectionMatrix[15] = 0.0; - - this.projectionMatrixDirty = true; + this.flushLocked = false; return this; } -}; -module.exports = ModelViewProjection; +}); + +module.exports = TextureTintStripPipeline; /***/ }), -/* 507 */ +/* 512 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -120948,8 +123301,8 @@ var Axes = {}; module.exports = Axes; -var Vector = __webpack_require__(101); -var Common = __webpack_require__(37); +var Vector = __webpack_require__(99); +var Common = __webpack_require__(38); (function() { @@ -121005,7 +123358,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 508 */ +/* 513 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121020,24 +123373,24 @@ var Common = __webpack_require__(37); module.exports = { - 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) + Bounce: __webpack_require__(1394), + Collision: __webpack_require__(1395), + Force: __webpack_require__(1396), + Friction: __webpack_require__(1397), + Gravity: __webpack_require__(1398), + Mass: __webpack_require__(1399), + Static: __webpack_require__(1400), + Sensor: __webpack_require__(1401), + SetBody: __webpack_require__(1402), + Sleep: __webpack_require__(1403), + Transform: __webpack_require__(1420), + Velocity: __webpack_require__(1421) }; /***/ }), -/* 509 */ +/* 514 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121052,9 +123405,9 @@ var Detector = {}; module.exports = Detector; -var SAT = __webpack_require__(510); -var Pair = __webpack_require__(467); -var Bounds = __webpack_require__(102); +var SAT = __webpack_require__(515); +var Pair = __webpack_require__(472); +var Bounds = __webpack_require__(100); (function() { @@ -121150,7 +123503,7 @@ var Bounds = __webpack_require__(102); /***/ }), -/* 510 */ +/* 515 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121166,7 +123519,7 @@ var SAT = {}; module.exports = SAT; var Vertices = __webpack_require__(86); -var Vector = __webpack_require__(101); +var Vector = __webpack_require__(99); (function() { @@ -121426,7 +123779,7 @@ var Vector = __webpack_require__(101); /***/ }), -/* 511 */ +/* 516 */ /***/ (function(module, exports) { var g; @@ -121452,21 +123805,21 @@ module.exports = g; /***/ }), -/* 512 */ +/* 517 */ /***/ (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); +__webpack_require__(521); +__webpack_require__(522); +__webpack_require__(523); +__webpack_require__(524); +__webpack_require__(525); /***/ }), -/* 513 */ +/* 518 */ /***/ (function(module, exports) { /** @@ -121506,7 +123859,7 @@ if (!Array.prototype.forEach) /***/ }), -/* 514 */ +/* 519 */ /***/ (function(module, exports) { /** @@ -121522,7 +123875,7 @@ if (!Array.isArray) /***/ }), -/* 515 */ +/* 520 */ /***/ (function(module, exports) { /* Copyright 2013 Chris Wilson @@ -121709,7 +124062,7 @@ BiquadFilterNode.type and OscillatorNode.type. /***/ }), -/* 516 */ +/* 521 */ /***/ (function(module, exports) { /** @@ -121724,7 +124077,7 @@ if (!window.console) /***/ }), -/* 517 */ +/* 522 */ /***/ (function(module, exports) { // ES6 Math.trunc - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Math/trunc @@ -121736,7 +124089,7 @@ if (!Math.trunc) { /***/ }), -/* 518 */ +/* 523 */ /***/ (function(module, exports) { /** @@ -121773,7 +124126,7 @@ if (!Math.trunc) { /***/ }), -/* 519 */ +/* 524 */ /***/ (function(module, exports) { // References: @@ -121830,7 +124183,7 @@ if (!window.cancelAnimationFrame) /***/ }), -/* 520 */ +/* 525 */ /***/ (function(module, exports) { /** @@ -121883,7 +124236,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o /***/ }), -/* 521 */ +/* 526 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121892,7 +124245,7 @@ if (typeof window.Uint32Array !== 'function' && typeof window.Uint32Array !== 'o * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var QuickSet = __webpack_require__(239); +var QuickSet = __webpack_require__(242); /** * Takes an array of Game Objects, or any objects that have public `x` and `y` properties, and aligns them next to each other. @@ -121931,7 +124284,7 @@ module.exports = AlignTo; /***/ }), -/* 522 */ +/* 527 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -121972,7 +124325,7 @@ module.exports = Angle; /***/ }), -/* 523 */ +/* 528 */ /***/ (function(module, exports) { /** @@ -122011,7 +124364,7 @@ module.exports = Call; /***/ }), -/* 524 */ +/* 529 */ /***/ (function(module, exports) { /** @@ -122069,7 +124422,7 @@ module.exports = GetFirst; /***/ }), -/* 525 */ +/* 530 */ /***/ (function(module, exports) { /** @@ -122127,7 +124480,7 @@ module.exports = GetLast; /***/ }), -/* 526 */ +/* 531 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122136,8 +124489,8 @@ module.exports = GetLast; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AlignIn = __webpack_require__(252); -var CONST = __webpack_require__(106); +var AlignIn = __webpack_require__(255); +var CONST = __webpack_require__(105); var GetFastValue = __webpack_require__(2); var NOOP = __webpack_require__(1); var Zone = __webpack_require__(110); @@ -122226,7 +124579,7 @@ module.exports = GridAlign; /***/ }), -/* 527 */ +/* 532 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -122235,7 +124588,7 @@ module.exports = GridAlign; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); // bitmask flag for GameObject.renderMask var _FLAG = 2; // 0010 @@ -122521,7 +124874,7 @@ module.exports = Alpha; /***/ }), -/* 528 */ +/* 533 */ /***/ (function(module, exports) { /** @@ -122548,7 +124901,7 @@ module.exports = 'add'; /***/ }), -/* 529 */ +/* 534 */ /***/ (function(module, exports) { /** @@ -122576,7 +124929,7 @@ module.exports = 'complete'; /***/ }), -/* 530 */ +/* 535 */ /***/ (function(module, exports) { /** @@ -122603,7 +124956,7 @@ module.exports = 'repeat'; /***/ }), -/* 531 */ +/* 536 */ /***/ (function(module, exports) { /** @@ -122631,7 +124984,7 @@ module.exports = 'restart'; /***/ }), -/* 532 */ +/* 537 */ /***/ (function(module, exports) { /** @@ -122659,7 +125012,7 @@ module.exports = 'start'; /***/ }), -/* 533 */ +/* 538 */ /***/ (function(module, exports) { /** @@ -122683,7 +125036,7 @@ module.exports = 'pauseall'; /***/ }), -/* 534 */ +/* 539 */ /***/ (function(module, exports) { /** @@ -122707,7 +125060,7 @@ module.exports = 'remove'; /***/ }), -/* 535 */ +/* 540 */ /***/ (function(module, exports) { /** @@ -122730,7 +125083,7 @@ module.exports = 'resumeall'; /***/ }), -/* 536 */ +/* 541 */ /***/ (function(module, exports) { /** @@ -122759,7 +125112,7 @@ module.exports = 'animationcomplete'; /***/ }), -/* 537 */ +/* 542 */ /***/ (function(module, exports) { /** @@ -122787,7 +125140,7 @@ module.exports = 'animationcomplete-'; /***/ }), -/* 538 */ +/* 543 */ /***/ (function(module, exports) { /** @@ -122816,7 +125169,7 @@ module.exports = 'animationrepeat-'; /***/ }), -/* 539 */ +/* 544 */ /***/ (function(module, exports) { /** @@ -122844,7 +125197,7 @@ module.exports = 'animationrestart-'; /***/ }), -/* 540 */ +/* 545 */ /***/ (function(module, exports) { /** @@ -122872,7 +125225,7 @@ module.exports = 'animationstart-'; /***/ }), -/* 541 */ +/* 546 */ /***/ (function(module, exports) { /** @@ -122901,7 +125254,7 @@ module.exports = 'animationupdate-'; /***/ }), -/* 542 */ +/* 547 */ /***/ (function(module, exports) { /** @@ -122931,7 +125284,7 @@ module.exports = 'animationrepeat'; /***/ }), -/* 543 */ +/* 548 */ /***/ (function(module, exports) { /** @@ -122960,7 +125313,7 @@ module.exports = 'animationrestart'; /***/ }), -/* 544 */ +/* 549 */ /***/ (function(module, exports) { /** @@ -122989,7 +125342,7 @@ module.exports = 'animationstart'; /***/ }), -/* 545 */ +/* 550 */ /***/ (function(module, exports) { /** @@ -123019,7 +125372,7 @@ module.exports = 'animationupdate'; /***/ }), -/* 546 */ +/* 551 */ /***/ (function(module, exports) { /** @@ -123168,7 +125521,7 @@ module.exports = ComputedSize; /***/ }), -/* 547 */ +/* 552 */ /***/ (function(module, exports) { /** @@ -123293,7 +125646,7 @@ module.exports = Crop; /***/ }), -/* 548 */ +/* 553 */ /***/ (function(module, exports) { /** @@ -123457,7 +125810,7 @@ module.exports = Flip; /***/ }), -/* 549 */ +/* 554 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -123467,7 +125820,7 @@ module.exports = Flip; */ var Rectangle = __webpack_require__(11); -var RotateAround = __webpack_require__(273); +var RotateAround = __webpack_require__(276); var Vector2 = __webpack_require__(3); /** @@ -123816,7 +126169,7 @@ module.exports = GetBounds; /***/ }), -/* 550 */ +/* 555 */ /***/ (function(module, exports) { /** @@ -123839,7 +126192,7 @@ module.exports = 'blur'; /***/ }), -/* 551 */ +/* 556 */ /***/ (function(module, exports) { /** @@ -123861,7 +126214,7 @@ module.exports = 'boot'; /***/ }), -/* 552 */ +/* 557 */ /***/ (function(module, exports) { /** @@ -123884,7 +126237,7 @@ module.exports = 'contextlost'; /***/ }), -/* 553 */ +/* 558 */ /***/ (function(module, exports) { /** @@ -123907,7 +126260,7 @@ module.exports = 'contextrestored'; /***/ }), -/* 554 */ +/* 559 */ /***/ (function(module, exports) { /** @@ -123930,7 +126283,7 @@ module.exports = 'destroy'; /***/ }), -/* 555 */ +/* 560 */ /***/ (function(module, exports) { /** @@ -123952,7 +126305,7 @@ module.exports = 'focus'; /***/ }), -/* 556 */ +/* 561 */ /***/ (function(module, exports) { /** @@ -123978,7 +126331,7 @@ module.exports = 'hidden'; /***/ }), -/* 557 */ +/* 562 */ /***/ (function(module, exports) { /** @@ -123999,7 +126352,7 @@ module.exports = 'pause'; /***/ }), -/* 558 */ +/* 563 */ /***/ (function(module, exports) { /** @@ -124025,7 +126378,7 @@ module.exports = 'postrender'; /***/ }), -/* 559 */ +/* 564 */ /***/ (function(module, exports) { /** @@ -124050,7 +126403,7 @@ module.exports = 'poststep'; /***/ }), -/* 560 */ +/* 565 */ /***/ (function(module, exports) { /** @@ -124075,7 +126428,7 @@ module.exports = 'prerender'; /***/ }), -/* 561 */ +/* 566 */ /***/ (function(module, exports) { /** @@ -124100,7 +126453,7 @@ module.exports = 'prestep'; /***/ }), -/* 562 */ +/* 567 */ /***/ (function(module, exports) { /** @@ -124122,7 +126475,7 @@ module.exports = 'ready'; /***/ }), -/* 563 */ +/* 568 */ /***/ (function(module, exports) { /** @@ -124143,7 +126496,7 @@ module.exports = 'resume'; /***/ }), -/* 564 */ +/* 569 */ /***/ (function(module, exports) { /** @@ -124168,7 +126521,7 @@ module.exports = 'step'; /***/ }), -/* 565 */ +/* 570 */ /***/ (function(module, exports) { /** @@ -124192,7 +126545,7 @@ module.exports = 'visible'; /***/ }), -/* 566 */ +/* 571 */ /***/ (function(module, exports) { /** @@ -124395,7 +126748,7 @@ module.exports = Origin; /***/ }), -/* 567 */ +/* 572 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -124470,6 +126823,15 @@ var PathFollower = { */ pathVector: null, + /** + * The distance the follower has traveled from the previous point to the current one, at the last update. + * + * @name Phaser.GameObjects.PathFollower#pathDelta + * @type {Phaser.Math.Vector2} + * @since 3.23.0 + */ + pathDelta: null, + /** * The Tween used for following the Path. * @@ -124510,7 +126872,7 @@ var PathFollower = { * @param {Phaser.Curves.Path} path - The Path this PathFollower is following. It can only follow one Path at a time. * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config] - Settings for the PathFollower. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ setPath: function (path, config) { @@ -124542,7 +126904,7 @@ var PathFollower = { * @param {boolean} value - Whether the PathFollower should automatically rotate to point in the direction of the Path. * @param {number} [offset=0] - Rotation offset in degrees. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ setRotateToPath: function (value, offset) { @@ -124581,7 +126943,7 @@ var PathFollower = { * @param {(number|Phaser.Types.GameObjects.PathFollower.PathConfig|Phaser.Types.Tweens.NumberTweenBuilderConfig)} [config={}] - The duration of the follow, or a PathFollower config object. * @param {number} [startAt=0] - Optional start position of the follow, between 0 and 1. * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ startFollow: function (config, startAt) { @@ -124635,6 +126997,13 @@ var PathFollower = { this.pathVector = new Vector2(); } + if (!this.pathDelta) + { + this.pathDelta = new Vector2(); + } + + this.pathDelta.reset(); + this.pathTween = this.scene.sys.tweens.addCounter(config); // The starting point of the path, relative to this follower @@ -124671,7 +127040,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#pauseFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ pauseFollow: function () { @@ -124693,7 +127062,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#resumeFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ resumeFollow: function () { @@ -124715,7 +127084,7 @@ var PathFollower = { * @method Phaser.GameObjects.Components.PathFollower#stopFollow * @since 3.3.0 * - * @return {Phaser.GameObjects.PathFollower} This Game Object. + * @return {this} This Game Object. */ stopFollow: function () { @@ -124744,14 +127113,18 @@ var PathFollower = { if (tween) { var tweenData = tween.data[0]; + var pathDelta = this.pathDelta; var pathVector = this.pathVector; - if (tweenData.state !== TWEEN_CONST.COMPLETE) + pathDelta.copy(pathVector).negate(); + + if (tweenData.state === TWEEN_CONST.COMPLETE) { this.path.getPoint(1, pathVector); + pathDelta.add(pathVector); pathVector.add(this.pathOffset); - + this.setPosition(pathVector.x, pathVector.y); return; @@ -124764,6 +127137,7 @@ var PathFollower = { this.path.getPoint(tween.getValue(), pathVector); + pathDelta.add(pathVector); pathVector.add(this.pathOffset); var oldX = this.x; @@ -124801,7 +127175,7 @@ module.exports = PathFollower; /***/ }), -/* 568 */ +/* 573 */ /***/ (function(module, exports) { /** @@ -124988,7 +127362,7 @@ module.exports = Size; /***/ }), -/* 569 */ +/* 574 */ /***/ (function(module, exports) { /** @@ -125118,7 +127492,7 @@ module.exports = Texture; /***/ }), -/* 570 */ +/* 575 */ /***/ (function(module, exports) { /** @@ -125326,7 +127700,7 @@ module.exports = TextureCrop; /***/ }), -/* 571 */ +/* 576 */ /***/ (function(module, exports) { /** @@ -125666,7 +128040,7 @@ module.exports = Tint; /***/ }), -/* 572 */ +/* 577 */ /***/ (function(module, exports) { /** @@ -125698,7 +128072,7 @@ module.exports = 'changedata'; /***/ }), -/* 573 */ +/* 578 */ /***/ (function(module, exports) { /** @@ -125728,7 +128102,7 @@ module.exports = 'changedata-'; /***/ }), -/* 574 */ +/* 579 */ /***/ (function(module, exports) { /** @@ -125756,7 +128130,7 @@ module.exports = 'removedata'; /***/ }), -/* 575 */ +/* 580 */ /***/ (function(module, exports) { /** @@ -125784,7 +128158,7 @@ module.exports = 'setdata'; /***/ }), -/* 576 */ +/* 581 */ /***/ (function(module, exports) { /** @@ -125809,7 +128183,7 @@ module.exports = 'destroy'; /***/ }), -/* 577 */ +/* 582 */ /***/ (function(module, exports) { /** @@ -125841,7 +128215,7 @@ module.exports = 'complete'; /***/ }), -/* 578 */ +/* 583 */ /***/ (function(module, exports) { /** @@ -125870,7 +128244,7 @@ module.exports = 'created'; /***/ }), -/* 579 */ +/* 584 */ /***/ (function(module, exports) { /** @@ -125896,7 +128270,7 @@ module.exports = 'error'; /***/ }), -/* 580 */ +/* 585 */ /***/ (function(module, exports) { /** @@ -125928,7 +128302,7 @@ module.exports = 'loop'; /***/ }), -/* 581 */ +/* 586 */ /***/ (function(module, exports) { /** @@ -125956,7 +128330,7 @@ module.exports = 'play'; /***/ }), -/* 582 */ +/* 587 */ /***/ (function(module, exports) { /** @@ -125981,7 +128355,7 @@ module.exports = 'seeked'; /***/ }), -/* 583 */ +/* 588 */ /***/ (function(module, exports) { /** @@ -126007,7 +128381,7 @@ module.exports = 'seeking'; /***/ }), -/* 584 */ +/* 589 */ /***/ (function(module, exports) { /** @@ -126033,7 +128407,7 @@ module.exports = 'stop'; /***/ }), -/* 585 */ +/* 590 */ /***/ (function(module, exports) { /** @@ -126059,7 +128433,7 @@ module.exports = 'timeout'; /***/ }), -/* 586 */ +/* 591 */ /***/ (function(module, exports) { /** @@ -126085,7 +128459,7 @@ module.exports = 'unlocked'; /***/ }), -/* 587 */ +/* 592 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126126,7 +128500,7 @@ module.exports = IncAlpha; /***/ }), -/* 588 */ +/* 593 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126167,7 +128541,7 @@ module.exports = IncX; /***/ }), -/* 589 */ +/* 594 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126214,7 +128588,7 @@ module.exports = IncXY; /***/ }), -/* 590 */ +/* 595 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126255,7 +128629,7 @@ module.exports = IncY; /***/ }), -/* 591 */ +/* 596 */ /***/ (function(module, exports) { /** @@ -126304,7 +128678,7 @@ module.exports = PlaceOnCircle; /***/ }), -/* 592 */ +/* 597 */ /***/ (function(module, exports) { /** @@ -126356,7 +128730,7 @@ module.exports = PlaceOnEllipse; /***/ }), -/* 593 */ +/* 598 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126365,7 +128739,7 @@ module.exports = PlaceOnEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetPoints = __webpack_require__(150); +var GetPoints = __webpack_require__(153); /** * Positions an array of Game Objects on evenly spaced points of a Line. @@ -126400,7 +128774,7 @@ module.exports = PlaceOnLine; /***/ }), -/* 594 */ +/* 599 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126409,9 +128783,9 @@ module.exports = PlaceOnLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MarchingAnts = __webpack_require__(282); -var RotateLeft = __webpack_require__(283); -var RotateRight = __webpack_require__(284); +var MarchingAnts = __webpack_require__(285); +var RotateLeft = __webpack_require__(286); +var RotateRight = __webpack_require__(287); /** * Takes an array of Game Objects and positions them on evenly spaced points around the perimeter of a Rectangle. @@ -126458,7 +128832,7 @@ module.exports = PlaceOnRectangle; /***/ }), -/* 595 */ +/* 600 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126467,7 +128841,7 @@ module.exports = PlaceOnRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BresenhamPoints = __webpack_require__(285); +var BresenhamPoints = __webpack_require__(288); /** * Takes an array of Game Objects and positions them on evenly spaced points around the edges of a Triangle. @@ -126519,7 +128893,7 @@ module.exports = PlaceOnTriangle; /***/ }), -/* 596 */ +/* 601 */ /***/ (function(module, exports) { /** @@ -126556,7 +128930,7 @@ module.exports = PlayAnimation; /***/ }), -/* 597 */ +/* 602 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126565,7 +128939,7 @@ module.exports = PlayAnimation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(147); +var Random = __webpack_require__(150); /** * Takes an array of Game Objects and positions them at random locations within the Circle. @@ -126596,7 +128970,7 @@ module.exports = RandomCircle; /***/ }), -/* 598 */ +/* 603 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126605,7 +128979,7 @@ module.exports = RandomCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(154); +var Random = __webpack_require__(157); /** * Takes an array of Game Objects and positions them at random locations within the Ellipse. @@ -126636,7 +129010,7 @@ module.exports = RandomEllipse; /***/ }), -/* 599 */ +/* 604 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126645,7 +129019,7 @@ module.exports = RandomEllipse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(151); +var Random = __webpack_require__(154); /** * Takes an array of Game Objects and positions them at random locations on the Line. @@ -126676,7 +129050,7 @@ module.exports = RandomLine; /***/ }), -/* 600 */ +/* 605 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126685,7 +129059,7 @@ module.exports = RandomLine; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(152); +var Random = __webpack_require__(155); /** * Takes an array of Game Objects and positions them at random locations within the Rectangle. @@ -126714,7 +129088,7 @@ module.exports = RandomRectangle; /***/ }), -/* 601 */ +/* 606 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126723,7 +129097,7 @@ module.exports = RandomRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Random = __webpack_require__(155); +var Random = __webpack_require__(158); /** * Takes an array of Game Objects and positions them at random locations within the Triangle. @@ -126754,7 +129128,7 @@ module.exports = RandomTriangle; /***/ }), -/* 602 */ +/* 607 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126795,7 +129169,7 @@ module.exports = Rotate; /***/ }), -/* 603 */ +/* 608 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126804,7 +129178,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundDistance = __webpack_require__(156); +var RotateAroundDistance = __webpack_require__(159); var DistanceBetween = __webpack_require__(53); /** @@ -126841,7 +129215,7 @@ module.exports = RotateAround; /***/ }), -/* 604 */ +/* 609 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126850,7 +129224,7 @@ module.exports = RotateAround; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathRotateAroundDistance = __webpack_require__(156); +var MathRotateAroundDistance = __webpack_require__(159); /** * Rotates an array of Game Objects around a point by the given angle and distance. @@ -126890,7 +129264,7 @@ module.exports = RotateAroundDistance; /***/ }), -/* 605 */ +/* 610 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126931,7 +129305,7 @@ module.exports = ScaleX; /***/ }), -/* 606 */ +/* 611 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -126978,7 +129352,7 @@ module.exports = ScaleXY; /***/ }), -/* 607 */ +/* 612 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127019,7 +129393,7 @@ module.exports = ScaleY; /***/ }), -/* 608 */ +/* 613 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127060,7 +129434,7 @@ module.exports = SetAlpha; /***/ }), -/* 609 */ +/* 614 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127100,7 +129474,7 @@ module.exports = SetBlendMode; /***/ }), -/* 610 */ +/* 615 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127141,7 +129515,7 @@ module.exports = SetDepth; /***/ }), -/* 611 */ +/* 616 */ /***/ (function(module, exports) { /** @@ -127180,7 +129554,7 @@ module.exports = SetHitArea; /***/ }), -/* 612 */ +/* 617 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127227,7 +129601,7 @@ module.exports = SetOrigin; /***/ }), -/* 613 */ +/* 618 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127268,7 +129642,7 @@ module.exports = SetRotation; /***/ }), -/* 614 */ +/* 619 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127315,7 +129689,7 @@ module.exports = SetScale; /***/ }), -/* 615 */ +/* 620 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127356,7 +129730,7 @@ module.exports = SetScaleX; /***/ }), -/* 616 */ +/* 621 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127397,7 +129771,7 @@ module.exports = SetScaleY; /***/ }), -/* 617 */ +/* 622 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127444,7 +129818,7 @@ module.exports = SetScrollFactor; /***/ }), -/* 618 */ +/* 623 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127485,7 +129859,7 @@ module.exports = SetScrollFactorX; /***/ }), -/* 619 */ +/* 624 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127526,7 +129900,7 @@ module.exports = SetScrollFactorY; /***/ }), -/* 620 */ +/* 625 */ /***/ (function(module, exports) { /** @@ -127565,7 +129939,7 @@ module.exports = SetTint; /***/ }), -/* 621 */ +/* 626 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127603,7 +129977,7 @@ module.exports = SetVisible; /***/ }), -/* 622 */ +/* 627 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127644,7 +130018,7 @@ module.exports = SetX; /***/ }), -/* 623 */ +/* 628 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127691,7 +130065,7 @@ module.exports = SetXY; /***/ }), -/* 624 */ +/* 629 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127732,7 +130106,7 @@ module.exports = SetY; /***/ }), -/* 625 */ +/* 630 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127862,7 +130236,7 @@ module.exports = ShiftPosition; /***/ }), -/* 626 */ +/* 631 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127895,7 +130269,7 @@ module.exports = Shuffle; /***/ }), -/* 627 */ +/* 632 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127904,7 +130278,7 @@ module.exports = Shuffle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmootherStep = __webpack_require__(157); +var MathSmootherStep = __webpack_require__(160); /** * Smootherstep is a sigmoid-like interpolation and clamping function. @@ -127953,7 +130327,7 @@ module.exports = SmootherStep; /***/ }), -/* 628 */ +/* 633 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -127962,7 +130336,7 @@ module.exports = SmootherStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MathSmoothStep = __webpack_require__(158); +var MathSmoothStep = __webpack_require__(161); /** * Smoothstep is a sigmoid-like interpolation and clamping function. @@ -128011,7 +130385,7 @@ module.exports = SmoothStep; /***/ }), -/* 629 */ +/* 634 */ /***/ (function(module, exports) { /** @@ -128074,7 +130448,7 @@ module.exports = Spread; /***/ }), -/* 630 */ +/* 635 */ /***/ (function(module, exports) { /** @@ -128110,7 +130484,7 @@ module.exports = ToggleVisible; /***/ }), -/* 631 */ +/* 636 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128159,7 +130533,7 @@ module.exports = WrapInRectangle; /***/ }), -/* 632 */ +/* 637 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128174,16 +130548,16 @@ module.exports = WrapInRectangle; module.exports = { - Animation: __webpack_require__(148), - AnimationFrame: __webpack_require__(268), - AnimationManager: __webpack_require__(286), + Animation: __webpack_require__(151), + AnimationFrame: __webpack_require__(271), + AnimationManager: __webpack_require__(289), Events: __webpack_require__(111) }; /***/ }), -/* 633 */ +/* 638 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128198,15 +130572,15 @@ module.exports = { module.exports = { - BaseCache: __webpack_require__(287), - CacheManager: __webpack_require__(289), - Events: __webpack_require__(288) + BaseCache: __webpack_require__(290), + CacheManager: __webpack_require__(292), + Events: __webpack_require__(291) }; /***/ }), -/* 634 */ +/* 639 */ /***/ (function(module, exports) { /** @@ -128231,7 +130605,7 @@ module.exports = 'add'; /***/ }), -/* 635 */ +/* 640 */ /***/ (function(module, exports) { /** @@ -128256,7 +130630,7 @@ module.exports = 'remove'; /***/ }), -/* 636 */ +/* 641 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128275,14 +130649,14 @@ module.exports = 'remove'; module.exports = { - Controls: __webpack_require__(637), - Scene2D: __webpack_require__(640) + Controls: __webpack_require__(642), + Scene2D: __webpack_require__(645) }; /***/ }), -/* 637 */ +/* 642 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128297,14 +130671,14 @@ module.exports = { module.exports = { - FixedKeyControl: __webpack_require__(638), - SmoothedKeyControl: __webpack_require__(639) + FixedKeyControl: __webpack_require__(643), + SmoothedKeyControl: __webpack_require__(644) }; /***/ }), -/* 638 */ +/* 643 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128488,7 +130862,7 @@ var FixedKeyControl = new Class({ * @method Phaser.Cameras.Controls.FixedKeyControl#start * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ start: function () { @@ -128503,7 +130877,7 @@ var FixedKeyControl = new Class({ * @method Phaser.Cameras.Controls.FixedKeyControl#stop * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ stop: function () { @@ -128520,7 +130894,7 @@ var FixedKeyControl = new Class({ * * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to. * - * @return {Phaser.Cameras.Controls.FixedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ setCamera: function (camera) { @@ -128610,7 +130984,7 @@ module.exports = FixedKeyControl; /***/ }), -/* 639 */ +/* 644 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -128888,7 +131262,7 @@ var SmoothedKeyControl = new Class({ * @method Phaser.Cameras.Controls.SmoothedKeyControl#start * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ start: function () { @@ -128903,7 +131277,7 @@ var SmoothedKeyControl = new Class({ * @method Phaser.Cameras.Controls.SmoothedKeyControl#stop * @since 3.0.0 * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ stop: function () { @@ -128920,7 +131294,7 @@ var SmoothedKeyControl = new Class({ * * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera to bind this Key Control to. * - * @return {Phaser.Cameras.Controls.SmoothedKeyControl} This Key Control instance. + * @return {this} This Key Control instance. */ setCamera: function (camera) { @@ -129093,7 +131467,7 @@ module.exports = SmoothedKeyControl; /***/ }), -/* 640 */ +/* 645 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129108,17 +131482,17 @@ module.exports = SmoothedKeyControl; module.exports = { - Camera: __webpack_require__(290), + Camera: __webpack_require__(293), BaseCamera: __webpack_require__(91), - CameraManager: __webpack_require__(693), - Effects: __webpack_require__(298), - Events: __webpack_require__(48) + CameraManager: __webpack_require__(701), + Effects: __webpack_require__(301), + Events: __webpack_require__(36) }; /***/ }), -/* 641 */ +/* 646 */ /***/ (function(module, exports) { /** @@ -129141,7 +131515,7 @@ module.exports = 'cameradestroy'; /***/ }), -/* 642 */ +/* 647 */ /***/ (function(module, exports) { /** @@ -129167,7 +131541,7 @@ module.exports = 'camerafadeincomplete'; /***/ }), -/* 643 */ +/* 648 */ /***/ (function(module, exports) { /** @@ -129197,7 +131571,7 @@ module.exports = 'camerafadeinstart'; /***/ }), -/* 644 */ +/* 649 */ /***/ (function(module, exports) { /** @@ -129223,7 +131597,7 @@ module.exports = 'camerafadeoutcomplete'; /***/ }), -/* 645 */ +/* 650 */ /***/ (function(module, exports) { /** @@ -129253,7 +131627,7 @@ module.exports = 'camerafadeoutstart'; /***/ }), -/* 646 */ +/* 651 */ /***/ (function(module, exports) { /** @@ -129277,7 +131651,7 @@ module.exports = 'cameraflashcomplete'; /***/ }), -/* 647 */ +/* 652 */ /***/ (function(module, exports) { /** @@ -129305,7 +131679,7 @@ module.exports = 'cameraflashstart'; /***/ }), -/* 648 */ +/* 653 */ /***/ (function(module, exports) { /** @@ -129329,7 +131703,7 @@ module.exports = 'camerapancomplete'; /***/ }), -/* 649 */ +/* 654 */ /***/ (function(module, exports) { /** @@ -129356,7 +131730,7 @@ module.exports = 'camerapanstart'; /***/ }), -/* 650 */ +/* 655 */ /***/ (function(module, exports) { /** @@ -129382,7 +131756,7 @@ module.exports = 'postrender'; /***/ }), -/* 651 */ +/* 656 */ /***/ (function(module, exports) { /** @@ -129408,7 +131782,57 @@ module.exports = 'prerender'; /***/ }), -/* 652 */ +/* 657 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Camera Rotate Complete Event. + * + * This event is dispatched by a Camera instance when the Rotate Effect completes. + * + * @event Phaser.Cameras.Scene2D.Events#ROTATE_COMPLETE + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on. + * @param {Phaser.Cameras.Scene2D.Effects.RotateTo} effect - A reference to the effect instance. + */ +module.exports = 'camerarotatecomplete'; + + +/***/ }), +/* 658 */ +/***/ (function(module, exports) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +/** + * The Camera Rotate Start Event. + * + * This event is dispatched by a Camera instance when the Rotate Effect starts. + * + * @event Phaser.Cameras.Scene2D.Events#ROTATE_START + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera that the effect began on. + * @param {Phaser.Cameras.Scene2D.Effects.RotateTo} effect - A reference to the effect instance. + * @param {integer} duration - The duration of the effect. + * @param {number} destination - The destination value. + */ +module.exports = 'camerarotatestart'; + + +/***/ }), +/* 659 */ /***/ (function(module, exports) { /** @@ -129432,7 +131856,7 @@ module.exports = 'camerashakecomplete'; /***/ }), -/* 653 */ +/* 660 */ /***/ (function(module, exports) { /** @@ -129458,7 +131882,7 @@ module.exports = 'camerashakestart'; /***/ }), -/* 654 */ +/* 661 */ /***/ (function(module, exports) { /** @@ -129482,7 +131906,7 @@ module.exports = 'camerazoomcomplete'; /***/ }), -/* 655 */ +/* 662 */ /***/ (function(module, exports) { /** @@ -129508,7 +131932,7 @@ module.exports = 'camerazoomstart'; /***/ }), -/* 656 */ +/* 663 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129517,9 +131941,9 @@ module.exports = 'camerazoomstart'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(48); +var Events = __webpack_require__(36); /** * @classdesc @@ -129896,7 +132320,7 @@ module.exports = Fade; /***/ }), -/* 657 */ +/* 664 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -129905,9 +132329,9 @@ module.exports = Fade; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(48); +var Events = __webpack_require__(36); /** * @classdesc @@ -130247,7 +132671,7 @@ module.exports = Flash; /***/ }), -/* 658 */ +/* 665 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -130256,10 +132680,10 @@ module.exports = Flash; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(166); -var Events = __webpack_require__(48); +var EaseMap = __webpack_require__(115); +var Events = __webpack_require__(36); var Vector2 = __webpack_require__(3); /** @@ -130572,7 +132996,7 @@ module.exports = Pan; /***/ }), -/* 659 */ +/* 666 */ /***/ (function(module, exports) { /** @@ -130603,7 +133027,7 @@ module.exports = In; /***/ }), -/* 660 */ +/* 667 */ /***/ (function(module, exports) { /** @@ -130634,7 +133058,7 @@ module.exports = Out; /***/ }), -/* 661 */ +/* 668 */ /***/ (function(module, exports) { /** @@ -130674,7 +133098,7 @@ module.exports = InOut; /***/ }), -/* 662 */ +/* 669 */ /***/ (function(module, exports) { /** @@ -130719,7 +133143,7 @@ module.exports = In; /***/ }), -/* 663 */ +/* 670 */ /***/ (function(module, exports) { /** @@ -130762,7 +133186,7 @@ module.exports = Out; /***/ }), -/* 664 */ +/* 671 */ /***/ (function(module, exports) { /** @@ -130826,7 +133250,7 @@ module.exports = InOut; /***/ }), -/* 665 */ +/* 672 */ /***/ (function(module, exports) { /** @@ -130854,7 +133278,7 @@ module.exports = In; /***/ }), -/* 666 */ +/* 673 */ /***/ (function(module, exports) { /** @@ -130882,7 +133306,7 @@ module.exports = Out; /***/ }), -/* 667 */ +/* 674 */ /***/ (function(module, exports) { /** @@ -130917,7 +133341,7 @@ module.exports = InOut; /***/ }), -/* 668 */ +/* 675 */ /***/ (function(module, exports) { /** @@ -130945,7 +133369,7 @@ module.exports = In; /***/ }), -/* 669 */ +/* 676 */ /***/ (function(module, exports) { /** @@ -130973,7 +133397,7 @@ module.exports = Out; /***/ }), -/* 670 */ +/* 677 */ /***/ (function(module, exports) { /** @@ -131008,7 +133432,7 @@ module.exports = InOut; /***/ }), -/* 671 */ +/* 678 */ /***/ (function(module, exports) { /** @@ -131063,7 +133487,7 @@ module.exports = In; /***/ }), -/* 672 */ +/* 679 */ /***/ (function(module, exports) { /** @@ -131118,7 +133542,7 @@ module.exports = Out; /***/ }), -/* 673 */ +/* 680 */ /***/ (function(module, exports) { /** @@ -131180,7 +133604,7 @@ module.exports = InOut; /***/ }), -/* 674 */ +/* 681 */ /***/ (function(module, exports) { /** @@ -131208,7 +133632,7 @@ module.exports = In; /***/ }), -/* 675 */ +/* 682 */ /***/ (function(module, exports) { /** @@ -131236,7 +133660,7 @@ module.exports = Out; /***/ }), -/* 676 */ +/* 683 */ /***/ (function(module, exports) { /** @@ -131271,7 +133695,7 @@ module.exports = InOut; /***/ }), -/* 677 */ +/* 684 */ /***/ (function(module, exports) { /** @@ -131283,7 +133707,7 @@ module.exports = InOut; /** * Linear easing (no variation). * - * @function Phaser.Math.Easing.Linear.Linear + * @function Phaser.Math.Easing.Linear * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -131299,7 +133723,7 @@ module.exports = Linear; /***/ }), -/* 678 */ +/* 685 */ /***/ (function(module, exports) { /** @@ -131327,7 +133751,7 @@ module.exports = In; /***/ }), -/* 679 */ +/* 686 */ /***/ (function(module, exports) { /** @@ -131355,7 +133779,7 @@ module.exports = Out; /***/ }), -/* 680 */ +/* 687 */ /***/ (function(module, exports) { /** @@ -131390,7 +133814,7 @@ module.exports = InOut; /***/ }), -/* 681 */ +/* 688 */ /***/ (function(module, exports) { /** @@ -131418,7 +133842,7 @@ module.exports = In; /***/ }), -/* 682 */ +/* 689 */ /***/ (function(module, exports) { /** @@ -131446,7 +133870,7 @@ module.exports = Out; /***/ }), -/* 683 */ +/* 690 */ /***/ (function(module, exports) { /** @@ -131481,7 +133905,7 @@ module.exports = InOut; /***/ }), -/* 684 */ +/* 691 */ /***/ (function(module, exports) { /** @@ -131509,7 +133933,7 @@ module.exports = In; /***/ }), -/* 685 */ +/* 692 */ /***/ (function(module, exports) { /** @@ -131537,7 +133961,7 @@ module.exports = Out; /***/ }), -/* 686 */ +/* 693 */ /***/ (function(module, exports) { /** @@ -131572,7 +133996,7 @@ module.exports = InOut; /***/ }), -/* 687 */ +/* 694 */ /***/ (function(module, exports) { /** @@ -131611,7 +134035,7 @@ module.exports = In; /***/ }), -/* 688 */ +/* 695 */ /***/ (function(module, exports) { /** @@ -131650,7 +134074,7 @@ module.exports = Out; /***/ }), -/* 689 */ +/* 696 */ /***/ (function(module, exports) { /** @@ -131689,7 +134113,7 @@ module.exports = InOut; /***/ }), -/* 690 */ +/* 697 */ /***/ (function(module, exports) { /** @@ -131701,7 +134125,7 @@ module.exports = InOut; /** * Stepped easing. * - * @function Phaser.Math.Easing.Stepped.Stepped + * @function Phaser.Math.Easing.Stepped * @since 3.0.0 * * @param {number} v - The value to be tweened. @@ -131731,7 +134155,7 @@ module.exports = Stepped; /***/ }), -/* 691 */ +/* 698 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -131740,9 +134164,9 @@ module.exports = Stepped; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(48); +var Events = __webpack_require__(36); var Vector2 = __webpack_require__(3); /** @@ -132050,7 +134474,440 @@ module.exports = Shake; /***/ }), -/* 692 */ +/* 699 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Jason Nicholls + * @copyright 2018 Photon Storm Ltd. + * @license {@link https://github.com/photonstorm/phaser/blob/master/license.txt|MIT License} + */ + +var Clamp = __webpack_require__(19); +var Class = __webpack_require__(0); +var Events = __webpack_require__(36); +var EaseMap = __webpack_require__(115); + +/** + * @classdesc + * A Camera Rotate effect. + * + * This effect will rotate the Camera so that the its viewport finishes at the given angle in radians, + * over the duration and with the ease specified. + * + * Camera rotation always takes place based on the Camera viewport. By default, rotation happens + * in the center of the viewport. You can adjust this with the `originX` and `originY` properties. + * + * Rotation influences the rendering of _all_ Game Objects visible by this Camera. However, it does not + * rotate the Camera viewport itself, which always remains an axis-aligned rectangle. + * + * Only the camera is rotates. None of the objects it is displaying are impacted, i.e. their positions do + * not change. + * + * The effect will dispatch several events on the Camera itself and you can also specify an `onUpdate` callback, + * which is invoked each frame for the duration of the effect if required. + * + * @class RotateTo + * @memberof Phaser.Cameras.Scene2D.Effects + * @constructor + * @since 3.23.0 + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera this effect is acting upon. + */ +var RotateTo = new Class({ + + initialize: + + function RotateTo (camera) + { + /** + * The Camera this effect belongs to. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#camera + * @type {Phaser.Cameras.Scene2D.Camera} + * @readonly + * @since 3.23.0 + */ + this.camera = camera; + + /** + * Is this effect actively running? + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#isRunning + * @type {boolean} + * @readonly + * @default false + * @since 3.23.0 + */ + this.isRunning = false; + + /** + * The duration of the effect, in milliseconds. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#duration + * @type {integer} + * @readonly + * @default 0 + * @since 3.23.0 + */ + this.duration = 0; + + /** + * The starting angle to rotate the camera from. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#source + * @type {number} + * @since 3.23.0 + */ + this.source = 0; + + /** + * The constantly updated value based on the force. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#current + * @type {number} + * @since 3.23.0 + */ + this.current = 0; + + /** + * The destination angle in radians to rotate the camera to. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#destination + * @type {number} + * @since 3.23.0 + */ + this.destination = 0; + + /** + * The ease function to use during the Rotate. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#ease + * @type {function} + * @since 3.23.0 + */ + this.ease; + + /** + * If this effect is running this holds the current percentage of the progress, a value between 0 and 1. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#progress + * @type {number} + * @since 3.23.0 + */ + this.progress = 0; + + /** + * Effect elapsed timer. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_elapsed + * @type {number} + * @private + * @since 3.23.0 + */ + this._elapsed = 0; + + /** + * @callback CameraRotateCallback + * + * @param {Phaser.Cameras.Scene2D.Camera} camera - The camera on which the effect is running. + * @param {number} progress - The progress of the effect. A value between 0 and 1. + * @param {number} angle - The Camera's new angle in radians. + */ + + /** + * This callback is invoked every frame for the duration of the effect. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_onUpdate + * @type {?CameraRotateCallback} + * @private + * @default null + * @since 3.23.0 + */ + this._onUpdate; + + /** + * On Complete callback scope. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#_onUpdateScope + * @type {any} + * @private + * @since 3.23.0 + */ + this._onUpdateScope; + + /** + * The direction of the rotation. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#clockwise + * @type {boolean} + * @since 3.23.0 + */ + this.clockwise = true; + + /** + * The shortest direction to the target rotation. + * + * @name Phaser.Cameras.Scene2D.Effects.RotateTo#shortestPath + * @type {boolean} + * @since 3.23.0 + */ + this.shortestPath = false; + }, + + /** + * This effect will scroll the Camera so that the center of its viewport finishes at the given angle, + * over the duration and with the ease specified. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#start + * @fires Phaser.Cameras.Scene2D.Events#ROTATE_START + * @fires Phaser.Cameras.Scene2D.Events#ROTATE_COMPLETE + * @since 3.23.0 + * + * @param {number} radians - The destination angle in radians to rotate the Camera viewport to. If the angle is positive then the rotation is clockwise else anticlockwise + * @param {boolean} [shortestPath=false] - If shortest path is set to true the camera will rotate in the quickest direction clockwise or anti-clockwise. + * @param {integer} [duration=1000] - The duration of the effect in milliseconds. + * @param {(string|function)} [ease='Linear'] - The ease to use for the Rotate. Can be any of the Phaser Easing constants or a custom function. + * @param {boolean} [force=false] - Force the rotation effect to start immediately, even if already running. + * @param {CameraRotateCallback} [callback] - This callback will be invoked every frame for the duration of the effect. + * It is sent four arguments: A reference to the camera, a progress amount between 0 and 1 indicating how complete the effect is, + * the current camera scroll x coordinate and the current camera scroll y coordinate. + * @param {any} [context] - The context in which the callback is invoked. Defaults to the Scene to which the Camera belongs. + * + * @return {Phaser.Cameras.Scene2D.Camera} The Camera on which the effect was started. + */ + start: function (radians, shortestPath, duration, ease, force, callback, context) + { + if (duration === undefined) { duration = 1000; } + if (ease === undefined) { ease = EaseMap.Linear; } + if (force === undefined) { force = false; } + if (callback === undefined) { callback = null; } + if (context === undefined) { context = this.camera.scene; } + if (shortestPath === undefined) { shortestPath = false; } + + this.shortestPath = shortestPath; + + var tmpDestination = radians; + + if (radians < 0) + { + tmpDestination = -1 * radians; + this.clockwise = false; + } + else + { + this.clockwise = true; + } + + var maxRad = (360 * Math.PI) / 180; + + tmpDestination = tmpDestination - (Math.floor(tmpDestination / maxRad) * maxRad); + + var cam = this.camera; + + if (!force && this.isRunning) + { + return cam; + } + + this.isRunning = true; + this.duration = duration; + this.progress = 0; + + // Starting from + this.source = cam.rotation; + + // Destination + this.destination = tmpDestination; + + // Using this ease + if (typeof ease === 'string' && EaseMap.hasOwnProperty(ease)) + { + this.ease = EaseMap[ease]; + } + else if (typeof ease === 'function') + { + this.ease = ease; + } + + this._elapsed = 0; + + this._onUpdate = callback; + this._onUpdateScope = context; + + + if (this.shortestPath) + { + // The shortest path is true so calculate the quickest direction + var cwDist = 0; + var acwDist = 0; + + if (this.destination > this.source) + { + cwDist = Math.abs(this.destination - this.source); + } + else + { + cwDist = (Math.abs(this.destination + maxRad) - this.source); + } + + if (this.source > this.destination) + { + acwDist = Math.abs(this.source - this.destination); + } + else + { + acwDist = (Math.abs(this.source + maxRad) - this.destination); + } + + if (cwDist < acwDist) + { + this.clockwise = true; + } + else if (cwDist > acwDist) + { + this.clockwise = false; + } + } + + this.camera.emit(Events.ROTATE_START, this.camera, this, duration, tmpDestination); + + return cam; + }, + + /** + * The main update loop for this effect. Called automatically by the Camera. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#update + * @since 3.23.0 + * + * @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout. + * @param {number} delta - The delta time, in ms, elapsed since the last frame. + */ + update: function (time, delta) + { + if (!this.isRunning) + { + return; + } + + this._elapsed += delta; + + var progress = Clamp(this._elapsed / this.duration, 0, 1); + + this.progress = progress; + + var cam = this.camera; + + if (this._elapsed < this.duration) + { + var v = this.ease(progress); + + this.current = cam.rotation; + var distance = 0; + var maxRad = (360 * Math.PI) / 180; + var target = this.destination; + var current = this.current; + + if (this.clockwise === false) + { + target = this.current; + current = this.destination; + } + + if (target >= current) + { + distance = Math.abs(target - current); + } + else + { + distance = (Math.abs(target + maxRad) - current); + } + + var r = 0; + + if (this.clockwise) + { + r = (cam.rotation + (distance * v)); + } + else + { + r = (cam.rotation - (distance * v)); + } + + cam.rotation = r; + + if (this._onUpdate) + { + this._onUpdate.call(this._onUpdateScope, cam, progress, r); + } + } + else + { + cam.rotation = this.destination; + + if (this._onUpdate) + { + this._onUpdate.call(this._onUpdateScope, cam, progress, this.destination); + } + + this.effectComplete(); + } + }, + + /** + * Called internally when the effect completes. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#effectComplete + * @since 3.23.0 + */ + effectComplete: function () + { + this._onUpdate = null; + this._onUpdateScope = null; + + this.isRunning = false; + + this.camera.emit(Events.ROTATE_COMPLETE, this.camera, this); + }, + + /** + * Resets this camera effect. + * If it was previously running, it stops instantly without calling its onComplete callback or emitting an event. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#reset + * @since 3.23.0 + */ + reset: function () + { + this.isRunning = false; + + this._onUpdate = null; + this._onUpdateScope = null; + }, + + /** + * Destroys this effect, releasing it from the Camera. + * + * @method Phaser.Cameras.Scene2D.Effects.RotateTo#destroy + * @since 3.23.0 + */ + destroy: function () + { + this.reset(); + + this.camera = null; + this.source = null; + this.destination = null; + } + +}); + +module.exports = RotateTo; + + +/***/ }), +/* 700 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132059,10 +134916,10 @@ module.exports = Shake; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var EaseMap = __webpack_require__(166); -var Events = __webpack_require__(48); +var EaseMap = __webpack_require__(115); +var Events = __webpack_require__(36); /** * @classdesc @@ -132343,7 +135200,7 @@ module.exports = Zoom; /***/ }), -/* 693 */ +/* 701 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -132352,13 +135209,13 @@ module.exports = Zoom; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Camera = __webpack_require__(290); +var Camera = __webpack_require__(293); var Class = __webpack_require__(0); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var RectangleContains = __webpack_require__(47); +var RectangleContains = __webpack_require__(48); var ScaleEvents = __webpack_require__(92); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -132743,7 +135600,7 @@ var CameraManager = new Class({ * * @param {(Phaser.Types.Cameras.Scene2D.CameraConfig|Phaser.Types.Cameras.Scene2D.CameraConfig[])} config - A Camera configuration object, or an array of them, to be added to this Camera Manager. * - * @return {Phaser.Cameras.Scene2D.CameraManager} This Camera Manager instance. + * @return {this} This Camera Manager instance. */ fromJSON: function (config) { @@ -133091,7 +135948,7 @@ module.exports = CameraManager; /***/ }), -/* 694 */ +/* 702 */ /***/ (function(module, exports) { /** @@ -133110,7 +135967,7 @@ module.exports = 'enterfullscreen'; /***/ }), -/* 695 */ +/* 703 */ /***/ (function(module, exports) { /** @@ -133129,7 +135986,7 @@ module.exports = 'fullscreenfailed'; /***/ }), -/* 696 */ +/* 704 */ /***/ (function(module, exports) { /** @@ -133148,7 +136005,7 @@ module.exports = 'fullscreenunsupported'; /***/ }), -/* 697 */ +/* 705 */ /***/ (function(module, exports) { /** @@ -133168,7 +136025,7 @@ module.exports = 'leavefullscreen'; /***/ }), -/* 698 */ +/* 706 */ /***/ (function(module, exports) { /** @@ -133189,7 +136046,7 @@ module.exports = 'orientationchange'; /***/ }), -/* 699 */ +/* 707 */ /***/ (function(module, exports) { /** @@ -133220,7 +136077,7 @@ module.exports = 'resize'; /***/ }), -/* 700 */ +/* 708 */ /***/ (function(module, exports) { /** @@ -133245,7 +136102,7 @@ module.exports = 'boot'; /***/ }), -/* 701 */ +/* 709 */ /***/ (function(module, exports) { /** @@ -133274,7 +136131,7 @@ module.exports = 'create'; /***/ }), -/* 702 */ +/* 710 */ /***/ (function(module, exports) { /** @@ -133301,7 +136158,7 @@ module.exports = 'destroy'; /***/ }), -/* 703 */ +/* 711 */ /***/ (function(module, exports) { /** @@ -133328,7 +136185,7 @@ module.exports = 'pause'; /***/ }), -/* 704 */ +/* 712 */ /***/ (function(module, exports) { /** @@ -133365,7 +136222,7 @@ module.exports = 'postupdate'; /***/ }), -/* 705 */ +/* 713 */ /***/ (function(module, exports) { /** @@ -133402,7 +136259,7 @@ module.exports = 'preupdate'; /***/ }), -/* 706 */ +/* 714 */ /***/ (function(module, exports) { /** @@ -133430,7 +136287,7 @@ module.exports = 'ready'; /***/ }), -/* 707 */ +/* 715 */ /***/ (function(module, exports) { /** @@ -133466,7 +136323,7 @@ module.exports = 'render'; /***/ }), -/* 708 */ +/* 716 */ /***/ (function(module, exports) { /** @@ -133493,7 +136350,7 @@ module.exports = 'resume'; /***/ }), -/* 709 */ +/* 717 */ /***/ (function(module, exports) { /** @@ -133523,7 +136380,7 @@ module.exports = 'shutdown'; /***/ }), -/* 710 */ +/* 718 */ /***/ (function(module, exports) { /** @@ -133550,7 +136407,7 @@ module.exports = 'sleep'; /***/ }), -/* 711 */ +/* 719 */ /***/ (function(module, exports) { /** @@ -133575,7 +136432,7 @@ module.exports = 'start'; /***/ }), -/* 712 */ +/* 720 */ /***/ (function(module, exports) { /** @@ -133611,7 +136468,7 @@ module.exports = 'transitioncomplete'; /***/ }), -/* 713 */ +/* 721 */ /***/ (function(module, exports) { /** @@ -133648,7 +136505,7 @@ module.exports = 'transitioninit'; /***/ }), -/* 714 */ +/* 722 */ /***/ (function(module, exports) { /** @@ -133682,7 +136539,7 @@ module.exports = 'transitionout'; /***/ }), -/* 715 */ +/* 723 */ /***/ (function(module, exports) { /** @@ -133722,7 +136579,7 @@ module.exports = 'transitionstart'; /***/ }), -/* 716 */ +/* 724 */ /***/ (function(module, exports) { /** @@ -133757,7 +136614,7 @@ module.exports = 'transitionwake'; /***/ }), -/* 717 */ +/* 725 */ /***/ (function(module, exports) { /** @@ -133794,7 +136651,7 @@ module.exports = 'update'; /***/ }), -/* 718 */ +/* 726 */ /***/ (function(module, exports) { /** @@ -133821,7 +136678,7 @@ module.exports = 'wake'; /***/ }), -/* 719 */ +/* 727 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -133836,18 +136693,18 @@ module.exports = 'wake'; module.exports = { - Config: __webpack_require__(311), - CreateRenderer: __webpack_require__(334), - DebugHeader: __webpack_require__(336), - Events: __webpack_require__(18), - TimeStep: __webpack_require__(337), - VisibilityHandler: __webpack_require__(339) + Config: __webpack_require__(314), + CreateRenderer: __webpack_require__(337), + DebugHeader: __webpack_require__(341), + Events: __webpack_require__(20), + TimeStep: __webpack_require__(342), + VisibilityHandler: __webpack_require__(344) }; /***/ }), -/* 720 */ +/* 728 */ /***/ (function(module, exports) { // shim for using process in browser @@ -134037,7 +136894,7 @@ process.umask = function() { return 0; }; /***/ }), -/* 721 */ +/* 729 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134046,7 +136903,7 @@ process.umask = function() { return 0; }; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(117); +var Browser = __webpack_require__(118); /** * Determines the input support of the browser running this Phaser Game instance. @@ -134112,7 +136969,7 @@ module.exports = init(); /***/ }), -/* 722 */ +/* 730 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134121,7 +136978,7 @@ module.exports = init(); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Browser = __webpack_require__(117); +var Browser = __webpack_require__(118); /** * Determines the audio playback capabilities of the device running this Phaser Game instance. @@ -134237,7 +137094,7 @@ module.exports = init(); /***/ }), -/* 723 */ +/* 731 */ /***/ (function(module, exports) { /** @@ -134324,7 +137181,7 @@ module.exports = init(); /***/ }), -/* 724 */ +/* 732 */ /***/ (function(module, exports) { /** @@ -134428,7 +137285,7 @@ module.exports = init(); /***/ }), -/* 725 */ +/* 733 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134443,23 +137300,25 @@ module.exports = init(); module.exports = { - 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) + Between: __webpack_require__(317), + BetweenPoints: __webpack_require__(734), + BetweenPointsY: __webpack_require__(735), + BetweenY: __webpack_require__(736), + CounterClockwise: __webpack_require__(737), + Normalize: __webpack_require__(318), + Random: __webpack_require__(738), + RandomDegrees: __webpack_require__(739), + Reverse: __webpack_require__(740), + RotateTo: __webpack_require__(741), + ShortestBetween: __webpack_require__(742), + Wrap: __webpack_require__(235), + WrapDegrees: __webpack_require__(236) }; /***/ }), -/* 726 */ +/* 734 */ /***/ (function(module, exports) { /** @@ -134476,8 +137335,8 @@ module.exports = { * @function Phaser.Math.Angle.BetweenPoints * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -134490,7 +137349,7 @@ module.exports = BetweenPoints; /***/ }), -/* 727 */ +/* 735 */ /***/ (function(module, exports) { /** @@ -134508,8 +137367,8 @@ module.exports = BetweenPoints; * @function Phaser.Math.Angle.BetweenPointsY * @since 3.0.0 * - * @param {(Phaser.Geom.Point|object)} point1 - The first point. - * @param {(Phaser.Geom.Point|object)} point2 - The second point. + * @param {Phaser.Types.Math.Vector2Like} point1 - The first point. + * @param {Phaser.Types.Math.Vector2Like} point2 - The second point. * * @return {number} The angle in radians. */ @@ -134522,7 +137381,7 @@ module.exports = BetweenPointsY; /***/ }), -/* 728 */ +/* 736 */ /***/ (function(module, exports) { /** @@ -134556,7 +137415,7 @@ module.exports = BetweenY; /***/ }), -/* 729 */ +/* 737 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134565,7 +137424,7 @@ module.exports = BetweenY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(13); +var CONST = __webpack_require__(15); /** * Takes an angle in Phasers default clockwise format and converts it so that @@ -134601,7 +137460,65 @@ module.exports = CounterClockwise; /***/ }), -/* 730 */ +/* 738 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(119); + +/** + * Returns a random angle in the range [-pi, pi]. + * + * @function Phaser.Math.Angle.Random + * @since 3.23.0 + * + * @return {number} The angle, in radians. + */ +var Random = function () +{ + return FloatBetween(-Math.PI, Math.PI); +}; + +module.exports = Random; + + +/***/ }), +/* 739 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @author @samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var FloatBetween = __webpack_require__(119); + +/** + * Returns a random angle in the range [-180, 180]. + * + * @function Phaser.Math.Angle.RandomDegrees + * @since 3.23.0 + * + * @return {number} The angle, in degrees. + */ +var RandomDegrees = function () +{ + return FloatBetween(-180, 180); +}; + +module.exports = RandomDegrees; + + +/***/ }), +/* 740 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134610,7 +137527,7 @@ module.exports = CounterClockwise; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Normalize = __webpack_require__(315); +var Normalize = __webpack_require__(318); /** * Reverse the given angle. @@ -134631,7 +137548,7 @@ module.exports = Reverse; /***/ }), -/* 731 */ +/* 741 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134640,7 +137557,7 @@ module.exports = Reverse; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * Rotates `currentAngle` towards `targetAngle`, taking the shortest rotation distance. The `lerp` argument is the amount to rotate by in this call. @@ -134698,7 +137615,7 @@ module.exports = RotateTo; /***/ }), -/* 732 */ +/* 742 */ /***/ (function(module, exports) { /** @@ -134747,7 +137664,7 @@ module.exports = ShortestBetween; /***/ }), -/* 733 */ +/* 743 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134763,50 +137680,18 @@ module.exports = ShortestBetween; module.exports = { 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) + BetweenPoints: __webpack_require__(319), + BetweenPointsSquared: __webpack_require__(744), + Chebyshev: __webpack_require__(745), + Power: __webpack_require__(746), + Snake: __webpack_require__(747), + Squared: __webpack_require__(320) }; /***/ }), -/* 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 */ +/* 744 */ /***/ (function(module, exports) { /** @@ -134838,7 +137723,7 @@ module.exports = DistanceBetweenPointsSquared; /***/ }), -/* 736 */ +/* 745 */ /***/ (function(module, exports) { /** @@ -134872,7 +137757,7 @@ module.exports = ChebyshevDistance; /***/ }), -/* 737 */ +/* 746 */ /***/ (function(module, exports) { /** @@ -134906,7 +137791,7 @@ module.exports = DistancePower; /***/ }), -/* 738 */ +/* 747 */ /***/ (function(module, exports) { /** @@ -134940,7 +137825,7 @@ module.exports = SnakeDistance; /***/ }), -/* 739 */ +/* 748 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134955,24 +137840,24 @@ module.exports = SnakeDistance; module.exports = { - 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) + 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) }; /***/ }), -/* 740 */ +/* 749 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -134987,17 +137872,17 @@ module.exports = { module.exports = { - Ceil: __webpack_require__(741), - Equal: __webpack_require__(144), - Floor: __webpack_require__(742), - GreaterThan: __webpack_require__(317), - LessThan: __webpack_require__(318) + Ceil: __webpack_require__(750), + Equal: __webpack_require__(106), + Floor: __webpack_require__(751), + GreaterThan: __webpack_require__(321), + LessThan: __webpack_require__(322) }; /***/ }), -/* 741 */ +/* 750 */ /***/ (function(module, exports) { /** @@ -135028,7 +137913,7 @@ module.exports = Ceil; /***/ }), -/* 742 */ +/* 751 */ /***/ (function(module, exports) { /** @@ -135059,7 +137944,7 @@ module.exports = Floor; /***/ }), -/* 743 */ +/* 752 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135074,19 +137959,19 @@ module.exports = Floor; module.exports = { - 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) + Bezier: __webpack_require__(753), + CatmullRom: __webpack_require__(754), + CubicBezier: __webpack_require__(325), + Linear: __webpack_require__(755), + QuadraticBezier: __webpack_require__(326), + SmoothStep: __webpack_require__(327), + SmootherStep: __webpack_require__(756) }; /***/ }), -/* 744 */ +/* 753 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135095,7 +137980,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bernstein = __webpack_require__(319); +var Bernstein = __webpack_require__(323); /** * A bezier interpolation method. @@ -135125,7 +138010,7 @@ module.exports = BezierInterpolation; /***/ }), -/* 745 */ +/* 754 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135134,7 +138019,7 @@ module.exports = BezierInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CatmullRom = __webpack_require__(169); +var CatmullRom = __webpack_require__(171); /** * A Catmull-Rom interpolation method. @@ -135182,7 +138067,7 @@ module.exports = CatmullRomInterpolation; /***/ }), -/* 746 */ +/* 755 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135191,7 +138076,7 @@ module.exports = CatmullRomInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(115); +var Linear = __webpack_require__(116); /** * A linear interpolation method. @@ -135229,7 +138114,7 @@ module.exports = LinearInterpolation; /***/ }), -/* 747 */ +/* 756 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135238,7 +138123,7 @@ module.exports = LinearInterpolation; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SmootherStep = __webpack_require__(157); +var SmootherStep = __webpack_require__(160); /** * A Smoother Step interpolation method. @@ -135262,7 +138147,7 @@ module.exports = SmootherStepInterpolation; /***/ }), -/* 748 */ +/* 757 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135277,15 +138162,15 @@ module.exports = SmootherStepInterpolation; module.exports = { - GetNext: __webpack_require__(324), - IsSize: __webpack_require__(118), - IsValue: __webpack_require__(749) + GetNext: __webpack_require__(328), + IsSize: __webpack_require__(120), + IsValue: __webpack_require__(758) }; /***/ }), -/* 749 */ +/* 758 */ /***/ (function(module, exports) { /** @@ -135313,7 +138198,7 @@ module.exports = IsValuePowerOfTwo; /***/ }), -/* 750 */ +/* 759 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135328,15 +138213,15 @@ module.exports = IsValuePowerOfTwo; module.exports = { - Ceil: __webpack_require__(325), + Ceil: __webpack_require__(329), Floor: __webpack_require__(93), - To: __webpack_require__(751) + To: __webpack_require__(760) }; /***/ }), -/* 751 */ +/* 760 */ /***/ (function(module, exports) { /** @@ -135379,7 +138264,7 @@ module.exports = SnapTo; /***/ }), -/* 752 */ +/* 761 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -135889,7 +138774,7 @@ module.exports = RandomDataGenerator; /***/ }), -/* 753 */ +/* 762 */ /***/ (function(module, exports) { /** @@ -135924,7 +138809,7 @@ module.exports = Average; /***/ }), -/* 754 */ +/* 763 */ /***/ (function(module, exports) { /** @@ -135961,7 +138846,7 @@ module.exports = CeilTo; /***/ }), -/* 755 */ +/* 764 */ /***/ (function(module, exports) { /** @@ -135990,7 +138875,7 @@ module.exports = Difference; /***/ }), -/* 756 */ +/* 765 */ /***/ (function(module, exports) { /** @@ -136027,7 +138912,7 @@ module.exports = FloorTo; /***/ }), -/* 757 */ +/* 766 */ /***/ (function(module, exports) { /** @@ -136060,7 +138945,7 @@ module.exports = GetSpeed; /***/ }), -/* 758 */ +/* 767 */ /***/ (function(module, exports) { /** @@ -136091,7 +138976,7 @@ module.exports = IsEven; /***/ }), -/* 759 */ +/* 768 */ /***/ (function(module, exports) { /** @@ -136120,7 +139005,7 @@ module.exports = IsEvenStrict; /***/ }), -/* 760 */ +/* 769 */ /***/ (function(module, exports) { /** @@ -136150,7 +139035,7 @@ module.exports = MaxAdd; /***/ }), -/* 761 */ +/* 770 */ /***/ (function(module, exports) { /** @@ -136180,7 +139065,7 @@ module.exports = MinSub; /***/ }), -/* 762 */ +/* 771 */ /***/ (function(module, exports) { /** @@ -136239,7 +139124,7 @@ module.exports = Percent; /***/ }), -/* 763 */ +/* 772 */ /***/ (function(module, exports) { /** @@ -136279,7 +139164,7 @@ module.exports = RandomXY; /***/ }), -/* 764 */ +/* 773 */ /***/ (function(module, exports) { /** @@ -136318,7 +139203,7 @@ module.exports = RandomXYZ; /***/ }), -/* 765 */ +/* 774 */ /***/ (function(module, exports) { /** @@ -136355,7 +139240,7 @@ module.exports = RandomXYZW; /***/ }), -/* 766 */ +/* 775 */ /***/ (function(module, exports) { /** @@ -136407,7 +139292,7 @@ module.exports = RoundTo; /***/ }), -/* 767 */ +/* 776 */ /***/ (function(module, exports) { /** @@ -136460,7 +139345,7 @@ module.exports = SinCosTableGenerator; /***/ }), -/* 768 */ +/* 777 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136518,7 +139403,7 @@ module.exports = ToXY; /***/ }), -/* 769 */ +/* 778 */ /***/ (function(module, exports) { /** @@ -136548,7 +139433,7 @@ module.exports = Within; /***/ }), -/* 770 */ +/* 779 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136557,9 +139442,9 @@ module.exports = Within; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Vector3 = __webpack_require__(172); -var Matrix4 = __webpack_require__(332); -var Quaternion = __webpack_require__(333); +var Vector3 = __webpack_require__(174); +var Matrix4 = __webpack_require__(335); +var Quaternion = __webpack_require__(336); var tmpMat4 = new Matrix4(); var tmpQuat = new Quaternion(); @@ -136596,7 +139481,7 @@ module.exports = RotateVec3; /***/ }), -/* 771 */ +/* 780 */ /***/ (function(module, exports) { /** @@ -136622,7 +139507,7 @@ module.exports = 'addtexture'; /***/ }), -/* 772 */ +/* 781 */ /***/ (function(module, exports) { /** @@ -136648,7 +139533,7 @@ module.exports = 'onerror'; /***/ }), -/* 773 */ +/* 782 */ /***/ (function(module, exports) { /** @@ -136677,7 +139562,7 @@ module.exports = 'onload'; /***/ }), -/* 774 */ +/* 783 */ /***/ (function(module, exports) { /** @@ -136700,7 +139585,7 @@ module.exports = 'ready'; /***/ }), -/* 775 */ +/* 784 */ /***/ (function(module, exports) { /** @@ -136728,7 +139613,7 @@ module.exports = 'removetexture'; /***/ }), -/* 776 */ +/* 785 */ /***/ (function(module, exports) { module.exports = [ @@ -136764,7 +139649,7 @@ module.exports = [ /***/ }), -/* 777 */ +/* 786 */ /***/ (function(module, exports) { module.exports = [ @@ -136783,7 +139668,7 @@ module.exports = [ /***/ }), -/* 778 */ +/* 787 */ /***/ (function(module, exports) { module.exports = [ @@ -136842,86 +139727,7 @@ module.exports = [ /***/ }), -/* 779 */ -/***/ (function(module, exports) { - -module.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'); - - -/***/ }), -/* 780 */ -/***/ (function(module, exports) { - -module.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'); - - -/***/ }), -/* 781 */ +/* 788 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136936,14 +139742,14 @@ module.exports = [ module.exports = { - GenerateTexture: __webpack_require__(340), - Palettes: __webpack_require__(782) + GenerateTexture: __webpack_require__(345), + Palettes: __webpack_require__(789) }; /***/ }), -/* 782 */ +/* 789 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -136958,17 +139764,17 @@ module.exports = { module.exports = { - ARNE16: __webpack_require__(341), - C64: __webpack_require__(783), - CGA: __webpack_require__(784), - JMP: __webpack_require__(785), - MSX: __webpack_require__(786) + ARNE16: __webpack_require__(346), + C64: __webpack_require__(790), + CGA: __webpack_require__(791), + JMP: __webpack_require__(792), + MSX: __webpack_require__(793) }; /***/ }), -/* 783 */ +/* 790 */ /***/ (function(module, exports) { /** @@ -137006,7 +139812,7 @@ module.exports = { /***/ }), -/* 784 */ +/* 791 */ /***/ (function(module, exports) { /** @@ -137044,7 +139850,7 @@ module.exports = { /***/ }), -/* 785 */ +/* 792 */ /***/ (function(module, exports) { /** @@ -137082,7 +139888,7 @@ module.exports = { /***/ }), -/* 786 */ +/* 793 */ /***/ (function(module, exports) { /** @@ -137120,7 +139926,7 @@ module.exports = { /***/ }), -/* 787 */ +/* 794 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137134,19 +139940,19 @@ module.exports = { */ module.exports = { - Path: __webpack_require__(788), + Path: __webpack_require__(795), - CubicBezier: __webpack_require__(342), - Curve: __webpack_require__(80), - Ellipse: __webpack_require__(343), - Line: __webpack_require__(344), - QuadraticBezier: __webpack_require__(345), - Spline: __webpack_require__(346) + CubicBezier: __webpack_require__(347), + Curve: __webpack_require__(81), + Ellipse: __webpack_require__(348), + Line: __webpack_require__(349), + QuadraticBezier: __webpack_require__(350), + Spline: __webpack_require__(351) }; /***/ }), -/* 788 */ +/* 795 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -137158,16 +139964,16 @@ module.exports = { // 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__(342); -var EllipseCurve = __webpack_require__(343); +var CubicBezierCurve = __webpack_require__(347); +var EllipseCurve = __webpack_require__(348); var GameObjectFactory = __webpack_require__(5); -var LineCurve = __webpack_require__(344); -var MovePathTo = __webpack_require__(789); -var QuadraticBezierCurve = __webpack_require__(345); +var LineCurve = __webpack_require__(349); +var MovePathTo = __webpack_require__(796); +var QuadraticBezierCurve = __webpack_require__(350); var Rectangle = __webpack_require__(11); -var SplineCurve = __webpack_require__(346); +var SplineCurve = __webpack_require__(351); var Vector2 = __webpack_require__(3); -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); /** * @classdesc @@ -137288,7 +140094,7 @@ var Path = new Class({ * * @param {Phaser.Curves.Curve} curve - The Curve to append. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ add: function (curve) { @@ -137307,7 +140113,7 @@ var Path = new Class({ * @param {boolean} [clockwise=false] - `true` to create a clockwise circle as opposed to a counter-clockwise circle. * @param {number} [rotation=0] - The rotation of the circle in degrees. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ circleTo: function (radius, clockwise, rotation) { @@ -137326,7 +140132,7 @@ var Path = new Class({ * @method Phaser.Curves.Path#closePath * @since 3.0.0 * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ closePath: function () { @@ -137356,7 +140162,7 @@ var Path = new Class({ * @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. + * @return {this} This Path object. */ cubicBezierTo: function (x, y, control1X, control1Y, control2X, control2Y) { @@ -137395,7 +140201,7 @@ var Path = new Class({ * @param {number} [controlX] - If `x` is not a `Vector2`, the X coordinate of the first control point. * @param {number} [controlY] - If `x` is not a `Vector2`, the Y coordinate of the first control point. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ quadraticBezierTo: function (x, y, controlX, controlY) { @@ -137461,7 +140267,7 @@ var Path = new Class({ * @param {boolean} [clockwise=false] - Whether the ellipse angles are given as clockwise (`true`) or counter-clockwise (`false`). * @param {number} [rotation=0] - The rotation of the ellipse, in degrees. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ ellipseTo: function (xRadius, yRadius, startAngle, endAngle, clockwise, rotation) { @@ -137490,7 +140296,7 @@ var Path = new Class({ * * @param {Phaser.Types.Curves.JSONPath} data - The JSON object containing the Path data. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ fromJSON: function (data) { @@ -137844,6 +140650,46 @@ var Path = new Class({ return out.copy(this.startPoint); }, + /** + * Gets a unit vector tangent at a relative position on the path. + * + * @method Phaser.Curves.Path#getTangent + * @since 3.23.0 + * + * @generic {Phaser.Math.Vector2} O - [out,$return] + * + * @param {number} t - The relative position on the path, [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) + */ + getTangent: function (t, out) + { + if (out === undefined) { out = new Vector2(); } + + var d = t * this.getLength(); + var curveLengths = this.getCurveLengths(); + var i = 0; + + while (i < curveLengths.length) + { + if (curveLengths[i] >= d) + { + var diff = curveLengths[i] - d; + var curve = this.curves[i]; + + var segmentLength = curve.getLength(); + var u = (segmentLength === 0) ? 0 : 1 - diff / segmentLength; + + return curve.getTangentAt(u, out); + } + + i++; + } + + return null; + }, + /** * Creates a line curve from the previous end point to x/y. * @@ -137853,7 +140699,7 @@ var Path = new Class({ * @param {(number|Phaser.Math.Vector2)} x - The X coordinate of the line's end point, or a `Vector2` containing the entire end point. * @param {number} [y] - The Y coordinate of the line's end point, if a number was passed as the X parameter. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ lineTo: function (x, y) { @@ -137879,7 +140725,7 @@ var Path = new Class({ * * @param {Phaser.Math.Vector2[]} points - The points the newly created spline curve should consist of. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ splineTo: function (points) { @@ -137899,7 +140745,7 @@ var Path = new Class({ * @param {(number|Phaser.Math.Vector2)} x - The X coordinate of the position to move the path's end point to, or a `Vector2` containing the entire new end point. * @param {number} y - The Y coordinate of the position to move the path's end point to, if a number was passed as the X coordinate. * - * @return {Phaser.Curves.Path} This Path object. + * @return {this} This Path object. */ moveTo: function (x, y) { @@ -137995,7 +140841,7 @@ module.exports = Path; /***/ }), -/* 789 */ +/* 796 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138135,7 +140981,7 @@ module.exports = MoveTo; /***/ }), -/* 790 */ +/* 797 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138151,14 +140997,14 @@ module.exports = MoveTo; module.exports = { DataManager: __webpack_require__(113), - DataManagerPlugin: __webpack_require__(791), - Events: __webpack_require__(281) + DataManagerPlugin: __webpack_require__(798), + Events: __webpack_require__(284) }; /***/ }), -/* 791 */ +/* 798 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138170,7 +141016,7 @@ module.exports = { var Class = __webpack_require__(0); var DataManager = __webpack_require__(113); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -138285,7 +141131,7 @@ module.exports = DataManagerPlugin; /***/ }), -/* 792 */ +/* 799 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138300,18 +141146,18 @@ module.exports = DataManagerPlugin; module.exports = { - Align: __webpack_require__(793), - BaseShader: __webpack_require__(347), - Bounds: __webpack_require__(796), - Canvas: __webpack_require__(799), - Color: __webpack_require__(348), - Masks: __webpack_require__(808) + Align: __webpack_require__(800), + BaseShader: __webpack_require__(352), + Bounds: __webpack_require__(803), + Canvas: __webpack_require__(806), + Color: __webpack_require__(353), + Masks: __webpack_require__(815) }; /***/ }), -/* 793 */ +/* 800 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138320,8 +141166,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(106); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(105); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Display.Align @@ -138329,8 +141175,8 @@ var Extend = __webpack_require__(17); var Align = { - In: __webpack_require__(794), - To: __webpack_require__(795) + In: __webpack_require__(801), + To: __webpack_require__(802) }; @@ -138341,7 +141187,7 @@ module.exports = Align; /***/ }), -/* 794 */ +/* 801 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138356,22 +141202,22 @@ module.exports = Align; module.exports = { - 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) + BottomCenter: __webpack_require__(256), + BottomLeft: __webpack_require__(257), + BottomRight: __webpack_require__(258), + Center: __webpack_require__(259), + LeftCenter: __webpack_require__(261), + QuickSet: __webpack_require__(255), + RightCenter: __webpack_require__(262), + TopCenter: __webpack_require__(263), + TopLeft: __webpack_require__(264), + TopRight: __webpack_require__(265) }; /***/ }), -/* 795 */ +/* 802 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138386,25 +141232,25 @@ module.exports = { module.exports = { - 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) + BottomCenter: __webpack_require__(243), + BottomLeft: __webpack_require__(244), + BottomRight: __webpack_require__(245), + LeftBottom: __webpack_require__(246), + LeftCenter: __webpack_require__(247), + LeftTop: __webpack_require__(248), + QuickSet: __webpack_require__(242), + RightBottom: __webpack_require__(249), + RightCenter: __webpack_require__(250), + RightTop: __webpack_require__(251), + TopCenter: __webpack_require__(252), + TopLeft: __webpack_require__(253), + TopRight: __webpack_require__(254) }; /***/ }), -/* 796 */ +/* 803 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138419,27 +141265,27 @@ module.exports = { module.exports = { - CenterOn: __webpack_require__(257), - GetBottom: __webpack_require__(38), - GetCenterX: __webpack_require__(75), - GetCenterY: __webpack_require__(77), - GetLeft: __webpack_require__(40), - GetOffsetX: __webpack_require__(797), - GetOffsetY: __webpack_require__(798), - GetRight: __webpack_require__(42), - GetTop: __webpack_require__(45), - SetBottom: __webpack_require__(44), - SetCenterX: __webpack_require__(76), - SetCenterY: __webpack_require__(78), - SetLeft: __webpack_require__(41), - SetRight: __webpack_require__(43), - SetTop: __webpack_require__(39) + CenterOn: __webpack_require__(260), + GetBottom: __webpack_require__(39), + GetCenterX: __webpack_require__(76), + GetCenterY: __webpack_require__(78), + GetLeft: __webpack_require__(41), + GetOffsetX: __webpack_require__(804), + GetOffsetY: __webpack_require__(805), + GetRight: __webpack_require__(43), + GetTop: __webpack_require__(46), + SetBottom: __webpack_require__(45), + SetCenterX: __webpack_require__(77), + SetCenterY: __webpack_require__(79), + SetLeft: __webpack_require__(42), + SetRight: __webpack_require__(44), + SetTop: __webpack_require__(40) }; /***/ }), -/* 797 */ +/* 804 */ /***/ (function(module, exports) { /** @@ -138469,7 +141315,7 @@ module.exports = GetOffsetX; /***/ }), -/* 798 */ +/* 805 */ /***/ (function(module, exports) { /** @@ -138499,7 +141345,7 @@ module.exports = GetOffsetY; /***/ }), -/* 799 */ +/* 806 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138514,17 +141360,17 @@ module.exports = GetOffsetY; module.exports = { - CanvasInterpolation: __webpack_require__(335), + CanvasInterpolation: __webpack_require__(338), CanvasPool: __webpack_require__(26), - Smoothing: __webpack_require__(164), - TouchAction: __webpack_require__(800), - UserSelect: __webpack_require__(801) + Smoothing: __webpack_require__(167), + TouchAction: __webpack_require__(807), + UserSelect: __webpack_require__(808) }; /***/ }), -/* 800 */ +/* 807 */ /***/ (function(module, exports) { /** @@ -138559,7 +141405,7 @@ module.exports = TouchAction; /***/ }), -/* 801 */ +/* 808 */ /***/ (function(module, exports) { /** @@ -138606,7 +141452,7 @@ module.exports = UserSelect; /***/ }), -/* 802 */ +/* 809 */ /***/ (function(module, exports) { /** @@ -138646,7 +141492,7 @@ module.exports = ColorToRGBA; /***/ }), -/* 803 */ +/* 810 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138655,8 +141501,8 @@ module.exports = ColorToRGBA; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Color = __webpack_require__(33); -var HueToComponent = __webpack_require__(350); +var Color = __webpack_require__(31); +var HueToComponent = __webpack_require__(355); /** * Converts HSL (hue, saturation and lightness) values to a Phaser Color object. @@ -138696,7 +141542,7 @@ module.exports = HSLToColor; /***/ }), -/* 804 */ +/* 811 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138705,7 +141551,7 @@ module.exports = HSLToColor; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HSVToRGB = __webpack_require__(163); +var HSVToRGB = __webpack_require__(166); /** * Get HSV color wheel values in an array which will be 360 elements in size. @@ -138737,7 +141583,7 @@ module.exports = HSVColorWheel; /***/ }), -/* 805 */ +/* 812 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138746,7 +141592,7 @@ module.exports = HSVColorWheel; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Linear = __webpack_require__(115); +var Linear = __webpack_require__(116); /** * @namespace Phaser.Display.Color.Interpolate @@ -138845,7 +141691,7 @@ module.exports = { /***/ }), -/* 806 */ +/* 813 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138854,8 +141700,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(170); -var Color = __webpack_require__(33); +var Between = __webpack_require__(172); +var Color = __webpack_require__(31); /** * Creates a new Color object where the r, g, and b values have been set to random values @@ -138881,7 +141727,7 @@ module.exports = RandomRGB; /***/ }), -/* 807 */ +/* 814 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138890,7 +141736,7 @@ module.exports = RandomRGB; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ComponentToHex = __webpack_require__(349); +var ComponentToHex = __webpack_require__(354); /** * Converts the color values into an HTML compatible color string, prefixed with either `#` or `0x`. @@ -138925,7 +141771,7 @@ module.exports = RGBToString; /***/ }), -/* 808 */ +/* 815 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138940,14 +141786,14 @@ module.exports = RGBToString; module.exports = { - BitmapMask: __webpack_require__(275), - GeometryMask: __webpack_require__(276) + BitmapMask: __webpack_require__(278), + GeometryMask: __webpack_require__(279) }; /***/ }), -/* 809 */ +/* 816 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138962,13 +141808,13 @@ module.exports = { var Dom = { - 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) + AddToDOM: __webpack_require__(122), + DOMContentLoaded: __webpack_require__(356), + GetScreenOrientation: __webpack_require__(357), + GetTarget: __webpack_require__(362), + ParseXML: __webpack_require__(363), + RemoveFromDOM: __webpack_require__(178), + RequestAnimationFrame: __webpack_require__(343) }; @@ -138976,7 +141822,7 @@ module.exports = Dom; /***/ }), -/* 810 */ +/* 817 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -138989,11 +141835,11 @@ module.exports = Dom; * @namespace Phaser.Events */ -module.exports = { EventEmitter: __webpack_require__(811) }; +module.exports = { EventEmitter: __webpack_require__(818) }; /***/ }), -/* 811 */ +/* 818 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139003,7 +141849,7 @@ module.exports = { EventEmitter: __webpack_require__(811) }; */ var Class = __webpack_require__(0); -var EE = __webpack_require__(9); +var EE = __webpack_require__(10); var PluginCache = __webpack_require__(23); /** @@ -139177,7 +142023,7 @@ module.exports = EventEmitter; /***/ }), -/* 812 */ +/* 819 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139186,33 +142032,33 @@ module.exports = EventEmitter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(120); -var AnimationManager = __webpack_require__(286); -var CacheManager = __webpack_require__(289); +var AddToDOM = __webpack_require__(122); +var AnimationManager = __webpack_require__(289); +var CacheManager = __webpack_require__(292); var CanvasPool = __webpack_require__(26); var Class = __webpack_require__(0); -var Config = __webpack_require__(311); -var CreateDOMContainer = __webpack_require__(813); -var CreateRenderer = __webpack_require__(334); +var Config = __webpack_require__(314); +var CreateDOMContainer = __webpack_require__(820); +var CreateRenderer = __webpack_require__(337); 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__(359); +var DebugHeader = __webpack_require__(341); +var Device = __webpack_require__(315); +var DOMContentLoaded = __webpack_require__(356); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(20); +var InputManager = __webpack_require__(364); 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); +var PluginManager = __webpack_require__(369); +var ScaleManager = __webpack_require__(370); +var SceneManager = __webpack_require__(372); +var TextureEvents = __webpack_require__(121); +var TextureManager = __webpack_require__(375); +var TimeStep = __webpack_require__(342); +var VisibilityHandler = __webpack_require__(344); if (true) { - var SoundManagerCreator = __webpack_require__(374); + var SoundManagerCreator = __webpack_require__(379); } if (false) @@ -139557,7 +142403,7 @@ var Game = new Class({ * * @method Phaser.Game#texturesReady * @private - * @fires Phaser.Game#ready + * @fires Phaser.Game#READY * @since 3.12.0 */ texturesReady: function () @@ -139611,11 +142457,11 @@ var Game = new Class({ * It will then render each Scene in turn, via the Renderer. This process emits `prerender` and `postrender` events. * * @method Phaser.Game#step - * @fires Phaser.Core.Events#PRE_STEP_EVENT - * @fires Phaser.Core.Events#STEP_EVENT - * @fires Phaser.Core.Events#POST_STEP_EVENT - * @fires Phaser.Core.Events#PRE_RENDER_EVENT - * @fires Phaser.Core.Events#POST_RENDER_EVENT + * @fires Phaser.Core.Events#PRE_STEP + * @fires Phaser.Core.Events#STEP + * @fires Phaser.Core.Events#POST_STEP + * @fires Phaser.Core.Events#PRE_RENDER + * @fires Phaser.Core.Events#POST_RENDER * @since 3.0.0 * * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. @@ -139678,8 +142524,8 @@ var Game = new Class({ * This process emits `prerender` and `postrender` events, even though nothing actually displays. * * @method Phaser.Game#headlessStep - * @fires Phaser.Game#prerenderEvent - * @fires Phaser.Game#postrenderEvent + * @fires Phaser.Game#PRE_RENDER + * @fires Phaser.Game#POST_RENDER * @since 3.2.0 * * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. @@ -139840,7 +142686,7 @@ var Game = new Class({ runDestroy: function () { this.scene.destroy(); - + this.events.emit(Events.DESTROY); this.events.removeAllListeners(); @@ -139880,7 +142726,7 @@ module.exports = Game; /***/ }), -/* 813 */ +/* 820 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -139889,7 +142735,7 @@ module.exports = Game; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AddToDOM = __webpack_require__(120); +var AddToDOM = __webpack_require__(122); var CreateDOMContainer = function (game) { @@ -139924,7 +142770,7 @@ module.exports = CreateDOMContainer; /***/ }), -/* 814 */ +/* 821 */ /***/ (function(module, exports) { /** @@ -139945,7 +142791,7 @@ module.exports = 'boot'; /***/ }), -/* 815 */ +/* 822 */ /***/ (function(module, exports) { /** @@ -139966,7 +142812,7 @@ module.exports = 'destroy'; /***/ }), -/* 816 */ +/* 823 */ /***/ (function(module, exports) { /** @@ -139994,7 +142840,7 @@ module.exports = 'dragend'; /***/ }), -/* 817 */ +/* 824 */ /***/ (function(module, exports) { /** @@ -140025,7 +142871,7 @@ module.exports = 'dragenter'; /***/ }), -/* 818 */ +/* 825 */ /***/ (function(module, exports) { /** @@ -140057,7 +142903,7 @@ module.exports = 'drag'; /***/ }), -/* 819 */ +/* 826 */ /***/ (function(module, exports) { /** @@ -140088,7 +142934,7 @@ module.exports = 'dragleave'; /***/ }), -/* 820 */ +/* 827 */ /***/ (function(module, exports) { /** @@ -140122,7 +142968,7 @@ module.exports = 'dragover'; /***/ }), -/* 821 */ +/* 828 */ /***/ (function(module, exports) { /** @@ -140152,7 +142998,7 @@ module.exports = 'dragstart'; /***/ }), -/* 822 */ +/* 829 */ /***/ (function(module, exports) { /** @@ -140181,7 +143027,7 @@ module.exports = 'drop'; /***/ }), -/* 823 */ +/* 830 */ /***/ (function(module, exports) { /** @@ -140208,7 +143054,7 @@ module.exports = 'gameout'; /***/ }), -/* 824 */ +/* 831 */ /***/ (function(module, exports) { /** @@ -140235,7 +143081,7 @@ module.exports = 'gameover'; /***/ }), -/* 825 */ +/* 832 */ /***/ (function(module, exports) { /** @@ -140276,7 +143122,7 @@ module.exports = 'gameobjectdown'; /***/ }), -/* 826 */ +/* 833 */ /***/ (function(module, exports) { /** @@ -140307,7 +143153,7 @@ module.exports = 'dragend'; /***/ }), -/* 827 */ +/* 834 */ /***/ (function(module, exports) { /** @@ -140337,7 +143183,7 @@ module.exports = 'dragenter'; /***/ }), -/* 828 */ +/* 835 */ /***/ (function(module, exports) { /** @@ -140368,7 +143214,7 @@ module.exports = 'drag'; /***/ }), -/* 829 */ +/* 836 */ /***/ (function(module, exports) { /** @@ -140398,7 +143244,7 @@ module.exports = 'dragleave'; /***/ }), -/* 830 */ +/* 837 */ /***/ (function(module, exports) { /** @@ -140431,7 +143277,7 @@ module.exports = 'dragover'; /***/ }), -/* 831 */ +/* 838 */ /***/ (function(module, exports) { /** @@ -140465,7 +143311,7 @@ module.exports = 'dragstart'; /***/ }), -/* 832 */ +/* 839 */ /***/ (function(module, exports) { /** @@ -140495,7 +143341,7 @@ module.exports = 'drop'; /***/ }), -/* 833 */ +/* 840 */ /***/ (function(module, exports) { /** @@ -140536,7 +143382,7 @@ module.exports = 'gameobjectmove'; /***/ }), -/* 834 */ +/* 841 */ /***/ (function(module, exports) { /** @@ -140577,7 +143423,7 @@ module.exports = 'gameobjectout'; /***/ }), -/* 835 */ +/* 842 */ /***/ (function(module, exports) { /** @@ -140618,7 +143464,7 @@ module.exports = 'gameobjectover'; /***/ }), -/* 836 */ +/* 843 */ /***/ (function(module, exports) { /** @@ -140659,7 +143505,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 837 */ +/* 844 */ /***/ (function(module, exports) { /** @@ -140700,7 +143546,7 @@ module.exports = 'pointermove'; /***/ }), -/* 838 */ +/* 845 */ /***/ (function(module, exports) { /** @@ -140739,7 +143585,7 @@ module.exports = 'pointerout'; /***/ }), -/* 839 */ +/* 846 */ /***/ (function(module, exports) { /** @@ -140780,7 +143626,7 @@ module.exports = 'pointerover'; /***/ }), -/* 840 */ +/* 847 */ /***/ (function(module, exports) { /** @@ -140821,7 +143667,7 @@ module.exports = 'pointerup'; /***/ }), -/* 841 */ +/* 848 */ /***/ (function(module, exports) { /** @@ -140863,7 +143709,7 @@ module.exports = 'wheel'; /***/ }), -/* 842 */ +/* 849 */ /***/ (function(module, exports) { /** @@ -140904,7 +143750,7 @@ module.exports = 'gameobjectup'; /***/ }), -/* 843 */ +/* 850 */ /***/ (function(module, exports) { /** @@ -140948,7 +143794,7 @@ module.exports = 'gameobjectwheel'; /***/ }), -/* 844 */ +/* 851 */ /***/ (function(module, exports) { /** @@ -140969,7 +143815,7 @@ module.exports = 'boot'; /***/ }), -/* 845 */ +/* 852 */ /***/ (function(module, exports) { /** @@ -140994,7 +143840,7 @@ module.exports = 'process'; /***/ }), -/* 846 */ +/* 853 */ /***/ (function(module, exports) { /** @@ -141015,7 +143861,7 @@ module.exports = 'update'; /***/ }), -/* 847 */ +/* 854 */ /***/ (function(module, exports) { /** @@ -141050,7 +143896,7 @@ module.exports = 'pointerdown'; /***/ }), -/* 848 */ +/* 855 */ /***/ (function(module, exports) { /** @@ -141084,7 +143930,7 @@ module.exports = 'pointerdownoutside'; /***/ }), -/* 849 */ +/* 856 */ /***/ (function(module, exports) { /** @@ -141119,7 +143965,7 @@ module.exports = 'pointermove'; /***/ }), -/* 850 */ +/* 857 */ /***/ (function(module, exports) { /** @@ -141154,7 +144000,7 @@ module.exports = 'pointerout'; /***/ }), -/* 851 */ +/* 858 */ /***/ (function(module, exports) { /** @@ -141189,7 +144035,7 @@ module.exports = 'pointerover'; /***/ }), -/* 852 */ +/* 859 */ /***/ (function(module, exports) { /** @@ -141224,7 +144070,7 @@ module.exports = 'pointerup'; /***/ }), -/* 853 */ +/* 860 */ /***/ (function(module, exports) { /** @@ -141258,7 +144104,7 @@ module.exports = 'pointerupoutside'; /***/ }), -/* 854 */ +/* 861 */ /***/ (function(module, exports) { /** @@ -141296,7 +144142,7 @@ module.exports = 'wheel'; /***/ }), -/* 855 */ +/* 862 */ /***/ (function(module, exports) { /** @@ -141320,7 +144166,7 @@ module.exports = 'pointerlockchange'; /***/ }), -/* 856 */ +/* 863 */ /***/ (function(module, exports) { /** @@ -141342,7 +144188,7 @@ module.exports = 'preupdate'; /***/ }), -/* 857 */ +/* 864 */ /***/ (function(module, exports) { /** @@ -141363,7 +144209,7 @@ module.exports = 'shutdown'; /***/ }), -/* 858 */ +/* 865 */ /***/ (function(module, exports) { /** @@ -141385,7 +144231,7 @@ module.exports = 'start'; /***/ }), -/* 859 */ +/* 866 */ /***/ (function(module, exports) { /** @@ -141410,7 +144256,7 @@ module.exports = 'update'; /***/ }), -/* 860 */ +/* 867 */ /***/ (function(module, exports) { /** @@ -141469,7 +144315,7 @@ module.exports = GetInnerHeight; /***/ }), -/* 861 */ +/* 868 */ /***/ (function(module, exports) { /** @@ -141499,7 +144345,7 @@ module.exports = 'addfile'; /***/ }), -/* 862 */ +/* 869 */ /***/ (function(module, exports) { /** @@ -141527,7 +144373,7 @@ module.exports = 'complete'; /***/ }), -/* 863 */ +/* 870 */ /***/ (function(module, exports) { /** @@ -141556,7 +144402,7 @@ module.exports = 'filecomplete'; /***/ }), -/* 864 */ +/* 871 */ /***/ (function(module, exports) { /** @@ -141610,7 +144456,7 @@ module.exports = 'filecomplete-'; /***/ }), -/* 865 */ +/* 872 */ /***/ (function(module, exports) { /** @@ -141635,7 +144481,7 @@ module.exports = 'loaderror'; /***/ }), -/* 866 */ +/* 873 */ /***/ (function(module, exports) { /** @@ -141661,7 +144507,7 @@ module.exports = 'load'; /***/ }), -/* 867 */ +/* 874 */ /***/ (function(module, exports) { /** @@ -141688,7 +144534,7 @@ module.exports = 'fileprogress'; /***/ }), -/* 868 */ +/* 875 */ /***/ (function(module, exports) { /** @@ -141717,7 +144563,7 @@ module.exports = 'postprocess'; /***/ }), -/* 869 */ +/* 876 */ /***/ (function(module, exports) { /** @@ -141742,7 +144588,7 @@ module.exports = 'progress'; /***/ }), -/* 870 */ +/* 877 */ /***/ (function(module, exports) { /** @@ -141769,7 +144615,7 @@ module.exports = 'start'; /***/ }), -/* 871 */ +/* 878 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141779,7 +144625,7 @@ module.exports = 'start'; */ var GetFastValue = __webpack_require__(2); -var UppercaseFirst = __webpack_require__(179); +var UppercaseFirst = __webpack_require__(181); /** * Builds an array of which physics plugins should be activated for the given Scene. @@ -141831,7 +144677,7 @@ module.exports = GetPhysicsPlugins; /***/ }), -/* 872 */ +/* 879 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141878,7 +144724,7 @@ module.exports = GetScenePlugins; /***/ }), -/* 873 */ +/* 880 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -141939,7 +144785,7 @@ module.exports = InjectionMap; /***/ }), -/* 874 */ +/* 881 */ /***/ (function(module, exports) { /** @@ -142020,7 +144866,7 @@ module.exports = AtlasXML; /***/ }), -/* 875 */ +/* 882 */ /***/ (function(module, exports) { /** @@ -142055,7 +144901,7 @@ module.exports = Canvas; /***/ }), -/* 876 */ +/* 883 */ /***/ (function(module, exports) { /** @@ -142090,7 +144936,7 @@ module.exports = Image; /***/ }), -/* 877 */ +/* 884 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142161,11 +145007,13 @@ var JSONArray = function (texture, sourceIndex, json) newFrame.updateUVsInverted(); } - if (src.anchor) + var pivot = src.anchor || src.pivot; + + if (pivot) { newFrame.customPivot = true; - newFrame.pivotX = src.anchor.x; - newFrame.pivotY = src.anchor.y; + newFrame.pivotX = pivot.x; + newFrame.pivotY = pivot.y; } // Copy over any extra data @@ -142197,7 +145045,7 @@ module.exports = JSONArray; /***/ }), -/* 878 */ +/* 885 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142238,7 +145086,7 @@ var JSONHash = function (texture, sourceIndex, json) texture.add('__BASE', sourceIndex, 0, 0, source.width, source.height); // By this stage frames is a fully parsed Object - var frames = json['frames']; + var frames = json.frames; var newFrame; for (var key in frames) @@ -142267,6 +145115,15 @@ var JSONHash = function (texture, sourceIndex, json) newFrame.updateUVsInverted(); } + var pivot = src.anchor || src.pivot; + + if (pivot) + { + newFrame.customPivot = true; + newFrame.pivotX = pivot.x; + newFrame.pivotY = pivot.y; + } + // Copy over any extra data newFrame.customData = Clone(src); } @@ -142296,7 +145153,7 @@ module.exports = JSONHash; /***/ }), -/* 879 */ +/* 886 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142320,15 +145177,15 @@ var GetFastValue = __webpack_require__(2); * * @param {Phaser.Textures.Texture} texture - The Texture to add the Frames to. * @param {integer} sourceIndex - The index of the TextureSource. - * @param {integer} x - [description] - * @param {integer} y - [description] - * @param {integer} width - [description] - * @param {integer} height - [description] + * @param {integer} x - The top-left coordinate of the Sprite Sheet. Defaults to zero. Used when extracting sheets from atlases. + * @param {integer} y - The top-left coordinate of the Sprite Sheet. Defaults to zero. Used when extracting sheets from atlases. + * @param {integer} width - The width of the source image. + * @param {integer} height - The height of the source image. * @param {object} config - An object describing how to parse the Sprite Sheet. * @param {number} config.frameWidth - Width in pixels of a single frame in the sprite sheet. * @param {number} [config.frameHeight] - Height in pixels of a single frame in the sprite sheet. Defaults to frameWidth if not provided. - * @param {number} [config.startFrame=0] - [description] - * @param {number} [config.endFrame=-1] - [description] + * @param {number} [config.startFrame=0] - The frame to start extracting from. Defaults to zero. + * @param {number} [config.endFrame=-1] - The frame to finish extracting at. Defaults to -1, which means 'all frames'. * @param {number} [config.margin=0] - If the frames have been drawn with a margin, specify the amount here. * @param {number} [config.spacing=0] - If the frames have been drawn with spacing between them, specify the amount here. * @@ -142421,7 +145278,7 @@ module.exports = SpriteSheet; /***/ }), -/* 880 */ +/* 887 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -142612,7 +145469,7 @@ module.exports = SpriteSheetFromAtlas; /***/ }), -/* 881 */ +/* 888 */ /***/ (function(module, exports) { /** @@ -142782,7 +145639,7 @@ TextureImporter: /***/ }), -/* 882 */ +/* 889 */ /***/ (function(module, exports) { /** @@ -142813,7 +145670,7 @@ module.exports = 'complete'; /***/ }), -/* 883 */ +/* 890 */ /***/ (function(module, exports) { /** @@ -142843,7 +145700,7 @@ module.exports = 'decoded'; /***/ }), -/* 884 */ +/* 891 */ /***/ (function(module, exports) { /** @@ -142875,7 +145732,7 @@ module.exports = 'decodedall'; /***/ }), -/* 885 */ +/* 892 */ /***/ (function(module, exports) { /** @@ -142907,7 +145764,7 @@ module.exports = 'destroy'; /***/ }), -/* 886 */ +/* 893 */ /***/ (function(module, exports) { /** @@ -142940,7 +145797,7 @@ module.exports = 'detune'; /***/ }), -/* 887 */ +/* 894 */ /***/ (function(module, exports) { /** @@ -142968,7 +145825,7 @@ module.exports = 'detune'; /***/ }), -/* 888 */ +/* 895 */ /***/ (function(module, exports) { /** @@ -142995,7 +145852,7 @@ module.exports = 'mute'; /***/ }), -/* 889 */ +/* 896 */ /***/ (function(module, exports) { /** @@ -143023,7 +145880,7 @@ module.exports = 'rate'; /***/ }), -/* 890 */ +/* 897 */ /***/ (function(module, exports) { /** @@ -143050,7 +145907,7 @@ module.exports = 'volume'; /***/ }), -/* 891 */ +/* 898 */ /***/ (function(module, exports) { /** @@ -143084,7 +145941,7 @@ module.exports = 'loop'; /***/ }), -/* 892 */ +/* 899 */ /***/ (function(module, exports) { /** @@ -143118,7 +145975,7 @@ module.exports = 'looped'; /***/ }), -/* 893 */ +/* 900 */ /***/ (function(module, exports) { /** @@ -143151,7 +146008,7 @@ module.exports = 'mute'; /***/ }), -/* 894 */ +/* 901 */ /***/ (function(module, exports) { /** @@ -143178,7 +146035,7 @@ module.exports = 'pauseall'; /***/ }), -/* 895 */ +/* 902 */ /***/ (function(module, exports) { /** @@ -143210,7 +146067,7 @@ module.exports = 'pause'; /***/ }), -/* 896 */ +/* 903 */ /***/ (function(module, exports) { /** @@ -143241,7 +146098,7 @@ module.exports = 'play'; /***/ }), -/* 897 */ +/* 904 */ /***/ (function(module, exports) { /** @@ -143274,7 +146131,7 @@ module.exports = 'rate'; /***/ }), -/* 898 */ +/* 905 */ /***/ (function(module, exports) { /** @@ -143301,7 +146158,7 @@ module.exports = 'resumeall'; /***/ }), -/* 899 */ +/* 906 */ /***/ (function(module, exports) { /** @@ -143334,7 +146191,7 @@ module.exports = 'resume'; /***/ }), -/* 900 */ +/* 907 */ /***/ (function(module, exports) { /** @@ -143367,7 +146224,7 @@ module.exports = 'seek'; /***/ }), -/* 901 */ +/* 908 */ /***/ (function(module, exports) { /** @@ -143394,7 +146251,7 @@ module.exports = 'stopall'; /***/ }), -/* 902 */ +/* 909 */ /***/ (function(module, exports) { /** @@ -143426,7 +146283,7 @@ module.exports = 'stop'; /***/ }), -/* 903 */ +/* 910 */ /***/ (function(module, exports) { /** @@ -143453,7 +146310,7 @@ module.exports = 'unlocked'; /***/ }), -/* 904 */ +/* 911 */ /***/ (function(module, exports) { /** @@ -143486,7 +146343,7 @@ module.exports = 'volume'; /***/ }), -/* 905 */ +/* 912 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143503,100 +146360,103 @@ var GameObjects = { Events: __webpack_require__(90), - DisplayList: __webpack_require__(906), + DisplayList: __webpack_require__(913), GameObjectCreator: __webpack_require__(16), GameObjectFactory: __webpack_require__(5), - UpdateList: __webpack_require__(934), + UpdateList: __webpack_require__(939), Components: __webpack_require__(12), - BuildGameObject: __webpack_require__(28), - BuildGameObjectAnimation: __webpack_require__(385), - GameObject: __webpack_require__(14), - 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), + BuildGameObject: __webpack_require__(27), + BuildGameObjectAnimation: __webpack_require__(392), + GameObject: __webpack_require__(13), + BitmapText: __webpack_require__(132), + Blitter: __webpack_require__(188), + Container: __webpack_require__(189), + DOMElement: __webpack_require__(394), + DynamicBitmapText: __webpack_require__(190), + Extern: __webpack_require__(396), + Graphics: __webpack_require__(191), Group: __webpack_require__(97), - Image: __webpack_require__(98), - Particles: __webpack_require__(966), - PathFollower: __webpack_require__(401), - RenderTexture: __webpack_require__(193), - RetroFont: __webpack_require__(975), - Sprite: __webpack_require__(69), - Text: __webpack_require__(195), - TileSprite: __webpack_require__(196), + Image: __webpack_require__(107), + Particles: __webpack_require__(971), + PathFollower: __webpack_require__(408), + RenderTexture: __webpack_require__(195), + RetroFont: __webpack_require__(980), + Rope: __webpack_require__(197), + Sprite: __webpack_require__(75), + Text: __webpack_require__(198), + TileSprite: __webpack_require__(199), Zone: __webpack_require__(110), - Video: __webpack_require__(197), + Video: __webpack_require__(200), // Shapes Shape: __webpack_require__(30), - 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), + Arc: __webpack_require__(409), + Curve: __webpack_require__(410), + Ellipse: __webpack_require__(411), + Grid: __webpack_require__(412), + IsoBox: __webpack_require__(413), + IsoTriangle: __webpack_require__(414), + Line: __webpack_require__(415), + Polygon: __webpack_require__(416), + Rectangle: __webpack_require__(421), + Star: __webpack_require__(422), + Triangle: __webpack_require__(423), // Game Object Factories Factories: { - 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), + Blitter: __webpack_require__(1031), + Container: __webpack_require__(1032), + DOMElement: __webpack_require__(1033), + DynamicBitmapText: __webpack_require__(1034), + Extern: __webpack_require__(1035), + Graphics: __webpack_require__(1036), + Group: __webpack_require__(1037), + Image: __webpack_require__(1038), + Particles: __webpack_require__(1039), + PathFollower: __webpack_require__(1040), + RenderTexture: __webpack_require__(1041), + Rope: __webpack_require__(1042), + Sprite: __webpack_require__(1043), + StaticBitmapText: __webpack_require__(1044), + Text: __webpack_require__(1045), + TileSprite: __webpack_require__(1046), + Zone: __webpack_require__(1047), + Video: __webpack_require__(1048), // Shapes - 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) + Arc: __webpack_require__(1049), + Curve: __webpack_require__(1050), + Ellipse: __webpack_require__(1051), + Grid: __webpack_require__(1052), + IsoBox: __webpack_require__(1053), + IsoTriangle: __webpack_require__(1054), + Line: __webpack_require__(1055), + Polygon: __webpack_require__(1056), + Rectangle: __webpack_require__(1057), + Star: __webpack_require__(1058), + Triangle: __webpack_require__(1059) }, Creators: { - 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) + Blitter: __webpack_require__(1060), + Container: __webpack_require__(1061), + DynamicBitmapText: __webpack_require__(1062), + Graphics: __webpack_require__(1063), + Group: __webpack_require__(1064), + Image: __webpack_require__(1065), + Particles: __webpack_require__(1066), + RenderTexture: __webpack_require__(1067), + Rope: __webpack_require__(1068), + Sprite: __webpack_require__(1069), + StaticBitmapText: __webpack_require__(1070), + Text: __webpack_require__(1071), + TileSprite: __webpack_require__(1072), + Zone: __webpack_require__(1073), + Video: __webpack_require__(1074) } }; @@ -143604,29 +146464,29 @@ var GameObjects = { if (true) { // WebGL only Game Objects - GameObjects.Mesh = __webpack_require__(130); - GameObjects.Quad = __webpack_require__(200); - GameObjects.Shader = __webpack_require__(201); + GameObjects.Mesh = __webpack_require__(134); + GameObjects.Quad = __webpack_require__(203); + GameObjects.Shader = __webpack_require__(204); - GameObjects.Factories.Mesh = __webpack_require__(1071); - GameObjects.Factories.Quad = __webpack_require__(1072); - GameObjects.Factories.Shader = __webpack_require__(1073); + GameObjects.Factories.Mesh = __webpack_require__(1081); + GameObjects.Factories.Quad = __webpack_require__(1082); + GameObjects.Factories.Shader = __webpack_require__(1083); - GameObjects.Creators.Mesh = __webpack_require__(1074); - GameObjects.Creators.Quad = __webpack_require__(1075); - GameObjects.Creators.Shader = __webpack_require__(1076); + GameObjects.Creators.Mesh = __webpack_require__(1084); + GameObjects.Creators.Quad = __webpack_require__(1085); + GameObjects.Creators.Shader = __webpack_require__(1086); - GameObjects.Light = __webpack_require__(420); + GameObjects.Light = __webpack_require__(427); - __webpack_require__(421); - __webpack_require__(1077); + __webpack_require__(428); + __webpack_require__(1087); } module.exports = GameObjects; /***/ }), -/* 906 */ +/* 913 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143636,10 +146496,10 @@ module.exports = GameObjects; */ var Class = __webpack_require__(0); -var List = __webpack_require__(126); +var List = __webpack_require__(129); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var StableSort = __webpack_require__(128); +var SceneEvents = __webpack_require__(22); +var StableSort = __webpack_require__(131); /** * @classdesc @@ -143831,7 +146691,7 @@ module.exports = DisplayList; /***/ }), -/* 907 */ +/* 914 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143846,21 +146706,21 @@ module.exports = DisplayList; module.exports = { - 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) + CheckMatrix: __webpack_require__(184), + MatrixToString: __webpack_require__(915), + ReverseColumns: __webpack_require__(916), + ReverseRows: __webpack_require__(917), + Rotate180: __webpack_require__(918), + RotateLeft: __webpack_require__(919), + RotateMatrix: __webpack_require__(130), + RotateRight: __webpack_require__(920), + TransposeMatrix: __webpack_require__(389) }; /***/ }), -/* 908 */ +/* 915 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -143869,8 +146729,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Pad = __webpack_require__(160); -var CheckMatrix = __webpack_require__(182); +var Pad = __webpack_require__(163); +var CheckMatrix = __webpack_require__(184); /** * Generates a string (which you can pass to console.log) from the given Array Matrix. @@ -143941,7 +146801,7 @@ module.exports = MatrixToString; /***/ }), -/* 909 */ +/* 916 */ /***/ (function(module, exports) { /** @@ -143972,7 +146832,7 @@ module.exports = ReverseColumns; /***/ }), -/* 910 */ +/* 917 */ /***/ (function(module, exports) { /** @@ -144008,7 +146868,7 @@ module.exports = ReverseRows; /***/ }), -/* 911 */ +/* 918 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144017,7 +146877,7 @@ module.exports = ReverseRows; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(127); +var RotateMatrix = __webpack_require__(130); /** * Rotates the array matrix 180 degrees. @@ -144041,7 +146901,7 @@ module.exports = Rotate180; /***/ }), -/* 912 */ +/* 919 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144050,7 +146910,7 @@ module.exports = Rotate180; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(127); +var RotateMatrix = __webpack_require__(130); /** * Rotates the array matrix to the left (or 90 degrees) @@ -144074,7 +146934,7 @@ module.exports = RotateLeft; /***/ }), -/* 913 */ +/* 920 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144083,7 +146943,7 @@ module.exports = RotateLeft; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateMatrix = __webpack_require__(127); +var RotateMatrix = __webpack_require__(130); /** * Rotates the array matrix to the left (or -90 degrees) @@ -144107,7 +146967,7 @@ module.exports = RotateRight; /***/ }), -/* 914 */ +/* 921 */ /***/ (function(module, exports) { /** @@ -144224,7 +147084,7 @@ module.exports = Add; /***/ }), -/* 915 */ +/* 922 */ /***/ (function(module, exports) { /** @@ -144346,7 +147206,7 @@ module.exports = AddAt; /***/ }), -/* 916 */ +/* 923 */ /***/ (function(module, exports) { /** @@ -144384,7 +147244,7 @@ module.exports = BringToTop; /***/ }), -/* 917 */ +/* 924 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144436,7 +147296,7 @@ module.exports = CountAllMatching; /***/ }), -/* 918 */ +/* 925 */ /***/ (function(module, exports) { /** @@ -144482,7 +147342,7 @@ module.exports = Each; /***/ }), -/* 919 */ +/* 926 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144538,128 +147398,7 @@ module.exports = EachInRange; /***/ }), -/* 920 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(68); - -/** - * Returns all elements in the array. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return only elements that have their visible property set. - * - * Optionally you can specify a start and end index. For example if the array had 100 elements, - * and you set `startIndex` to 0 and `endIndex` to 50, it would return matches from only - * the first 50 elements. - * - * @function Phaser.Utils.Array.GetAll - * @since 3.4.0 - * - * @param {array} array - The array to search. - * @param {string} [property] - The property to test on each array element. - * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. - * @param {integer} [startIndex] - An optional start index to search from. - * @param {integer} [endIndex] - An optional end index to search to. - * - * @return {array} All matching elements from the array. - */ -var GetAll = function (array, property, value, startIndex, endIndex) -{ - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = array.length; } - - var output = []; - - if (SafeRange(array, startIndex, endIndex)) - { - for (var i = startIndex; i < endIndex; i++) - { - var child = array[i]; - - if (!property || - (property && value === undefined && child.hasOwnProperty(property)) || - (property && value !== undefined && child[property] === value)) - { - output.push(child); - } - } - } - - return output; -}; - -module.exports = GetAll; - - -/***/ }), -/* 921 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var SafeRange = __webpack_require__(68); - -/** - * Returns the first element in the array. - * - * You can optionally specify a matching criteria using the `property` and `value` arguments. - * - * For example: `getAll('visible', true)` would return the first element that had its `visible` property set. - * - * Optionally you can specify a start and end index. For example if the array had 100 elements, - * and you set `startIndex` to 0 and `endIndex` to 50, it would search only the first 50 elements. - * - * @function Phaser.Utils.Array.GetFirst - * @since 3.4.0 - * - * @param {array} array - The array to search. - * @param {string} [property] - The property to test on each array element. - * @param {*} [value] - The value to test the property against. Must pass a strict (`===`) comparison check. - * @param {integer} [startIndex=0] - An optional start index to search from. - * @param {integer} [endIndex=array.length] - An optional end index to search up to (but not included) - * - * @return {object} The first matching element from the array, or `null` if no element could be found in the range given. - */ -var GetFirst = function (array, property, value, startIndex, endIndex) -{ - if (startIndex === undefined) { startIndex = 0; } - if (endIndex === undefined) { endIndex = array.length; } - - if (SafeRange(array, startIndex, endIndex)) - { - for (var i = startIndex; i < endIndex; i++) - { - var child = array[i]; - - if (!property || - (property && value === undefined && child.hasOwnProperty(property)) || - (property && value !== undefined && child[property] === value)) - { - return child; - } - } - } - - return null; -}; - -module.exports = GetFirst; - - -/***/ }), -/* 922 */ +/* 927 */ /***/ (function(module, exports) { /** @@ -144701,7 +147440,7 @@ module.exports = MoveDown; /***/ }), -/* 923 */ +/* 928 */ /***/ (function(module, exports) { /** @@ -144748,7 +147487,7 @@ module.exports = MoveTo; /***/ }), -/* 924 */ +/* 929 */ /***/ (function(module, exports) { /** @@ -144790,7 +147529,7 @@ module.exports = MoveUp; /***/ }), -/* 925 */ +/* 930 */ /***/ (function(module, exports) { /** @@ -144854,7 +147593,7 @@ module.exports = NumberArray; /***/ }), -/* 926 */ +/* 931 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144863,7 +147602,7 @@ module.exports = NumberArray; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RoundAwayFromZero = __webpack_require__(328); +var RoundAwayFromZero = __webpack_require__(331); /** * Create an array of numbers (positive and/or negative) progressing from `start` @@ -144931,7 +147670,7 @@ module.exports = NumberArrayStep; /***/ }), -/* 927 */ +/* 932 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -144940,7 +147679,7 @@ module.exports = NumberArrayStep; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(79); +var SpliceOne = __webpack_require__(80); /** * Removes the item from the given position in the array. @@ -144982,7 +147721,7 @@ module.exports = RemoveAt; /***/ }), -/* 928 */ +/* 933 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145045,7 +147784,7 @@ module.exports = RemoveBetween; /***/ }), -/* 929 */ +/* 934 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145054,7 +147793,7 @@ module.exports = RemoveBetween; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SpliceOne = __webpack_require__(79); +var SpliceOne = __webpack_require__(80); /** * Removes a random object from the given array and returns it. @@ -145083,7 +147822,7 @@ module.exports = RemoveRandomElement; /***/ }), -/* 930 */ +/* 935 */ /***/ (function(module, exports) { /** @@ -145127,7 +147866,7 @@ module.exports = Replace; /***/ }), -/* 931 */ +/* 936 */ /***/ (function(module, exports) { /** @@ -145165,7 +147904,7 @@ module.exports = SendToBack; /***/ }), -/* 932 */ +/* 937 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145220,7 +147959,7 @@ module.exports = SetAll; /***/ }), -/* 933 */ +/* 938 */ /***/ (function(module, exports) { /** @@ -145268,7 +148007,7 @@ module.exports = Swap; /***/ }), -/* 934 */ +/* 939 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145278,9 +148017,9 @@ module.exports = Swap; */ var Class = __webpack_require__(0); -var ProcessQueue = __webpack_require__(184); +var ProcessQueue = __webpack_require__(186); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -145569,7 +148308,7 @@ module.exports = UpdateList; /***/ }), -/* 935 */ +/* 940 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -145584,14 +148323,14 @@ module.exports = UpdateList; module.exports = { - PROCESS_QUEUE_ADD: __webpack_require__(936), - PROCESS_QUEUE_REMOVE: __webpack_require__(937) + PROCESS_QUEUE_ADD: __webpack_require__(941), + PROCESS_QUEUE_REMOVE: __webpack_require__(942) }; /***/ }), -/* 936 */ +/* 941 */ /***/ (function(module, exports) { /** @@ -145618,7 +148357,7 @@ module.exports = 'add'; /***/ }), -/* 937 */ +/* 942 */ /***/ (function(module, exports) { /** @@ -145645,7 +148384,7 @@ module.exports = 'remove'; /***/ }), -/* 938 */ +/* 943 */ /***/ (function(module, exports) { /** @@ -146098,7 +148837,7 @@ module.exports = GetBitmapTextSize; /***/ }), -/* 939 */ +/* 944 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146107,7 +148846,7 @@ module.exports = GetBitmapTextSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ParseXMLBitmapFont = __webpack_require__(185); +var ParseXMLBitmapFont = __webpack_require__(187); /** * Parse an XML Bitmap Font from an Atlas. @@ -146151,7 +148890,7 @@ module.exports = ParseFromAtlas; /***/ }), -/* 940 */ +/* 945 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146165,12 +148904,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(941); + renderWebGL = __webpack_require__(946); } if (true) { - renderCanvas = __webpack_require__(942); + renderCanvas = __webpack_require__(947); } module.exports = { @@ -146182,7 +148921,7 @@ module.exports = { /***/ }), -/* 941 */ +/* 946 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146191,7 +148930,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -146418,7 +149157,7 @@ module.exports = BitmapTextWebGLRenderer; /***/ }), -/* 942 */ +/* 947 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146427,7 +149166,7 @@ module.exports = BitmapTextWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -146600,7 +149339,7 @@ module.exports = BitmapTextCanvasRenderer; /***/ }), -/* 943 */ +/* 948 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146614,12 +149353,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(944); + renderWebGL = __webpack_require__(949); } if (true) { - renderCanvas = __webpack_require__(945); + renderCanvas = __webpack_require__(950); } module.exports = { @@ -146631,7 +149370,7 @@ module.exports = { /***/ }), -/* 944 */ +/* 949 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -146640,7 +149379,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -146761,7 +149500,7 @@ module.exports = BlitterWebGLRenderer; /***/ }), -/* 945 */ +/* 950 */ /***/ (function(module, exports) { /** @@ -146891,7 +149630,7 @@ module.exports = BlitterCanvasRenderer; /***/ }), -/* 946 */ +/* 951 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147048,7 +149787,7 @@ var Bob = new Class({ * * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFrame: function (frame) { @@ -147074,7 +149813,7 @@ var Bob = new Class({ * @method Phaser.GameObjects.Bob#resetFlip * @since 3.0.0 * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ resetFlip: function () { @@ -147098,7 +149837,7 @@ var Bob = new Class({ * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. * @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ reset: function (x, y, frame) { @@ -147130,7 +149869,7 @@ var Bob = new Class({ * @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object. * @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setPosition: function (x, y) { @@ -147148,7 +149887,7 @@ var Bob = new Class({ * * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlipX: function (value) { @@ -147165,7 +149904,7 @@ var Bob = new Class({ * * @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlipY: function (value) { @@ -147183,7 +149922,7 @@ var Bob = new Class({ * @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped. * @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setFlip: function (x, y) { @@ -147203,7 +149942,7 @@ var Bob = new Class({ * * @param {boolean} value - The visible state of the Game Object. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setVisible: function (value) { @@ -147223,7 +149962,7 @@ var Bob = new Class({ * * @param {number} value - The alpha value used for this Bob. Between 0 and 1. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setAlpha: function (value) { @@ -147240,7 +149979,7 @@ var Bob = new Class({ * * @param {number} value - The tint value used for this Bob. Between 0 and 0xffffff. * - * @return {Phaser.GameObjects.Bob} This Bob Game Object. + * @return {this} This Bob Game Object. */ setTint: function (value) { @@ -147321,7 +150060,7 @@ module.exports = Bob; /***/ }), -/* 947 */ +/* 952 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147336,12 +150075,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(948); + renderWebGL = __webpack_require__(953); } if (true) { - renderCanvas = __webpack_require__(949); + renderCanvas = __webpack_require__(954); } module.exports = { @@ -147353,7 +150092,7 @@ module.exports = { /***/ }), -/* 948 */ +/* 953 */ /***/ (function(module, exports) { /** @@ -147502,7 +150241,7 @@ module.exports = ContainerWebGLRenderer; /***/ }), -/* 949 */ +/* 954 */ /***/ (function(module, exports) { /** @@ -147599,7 +150338,7 @@ module.exports = ContainerCanvasRenderer; /***/ }), -/* 950 */ +/* 955 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147613,12 +150352,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(388); + renderWebGL = __webpack_require__(395); } if (true) { - renderCanvas = __webpack_require__(388); + renderCanvas = __webpack_require__(395); } module.exports = { @@ -147630,7 +150369,7 @@ module.exports = { /***/ }), -/* 951 */ +/* 956 */ /***/ (function(module, exports) { /** @@ -147671,7 +150410,7 @@ module.exports = [ /***/ }), -/* 952 */ +/* 957 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147685,12 +150424,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(953); + renderWebGL = __webpack_require__(958); } if (true) { - renderCanvas = __webpack_require__(954); + renderCanvas = __webpack_require__(959); } module.exports = { @@ -147702,7 +150441,7 @@ module.exports = { /***/ }), -/* 953 */ +/* 958 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -147711,7 +150450,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -148008,7 +150747,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; /***/ }), -/* 954 */ +/* 959 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148017,7 +150756,7 @@ module.exports = DynamicBitmapTextWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -148219,7 +150958,7 @@ module.exports = DynamicBitmapTextCanvasRenderer; /***/ }), -/* 955 */ +/* 960 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148233,12 +150972,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(956); + renderWebGL = __webpack_require__(961); } if (true) { - renderCanvas = __webpack_require__(957); + renderCanvas = __webpack_require__(962); } module.exports = { @@ -148250,7 +150989,7 @@ module.exports = { /***/ }), -/* 956 */ +/* 961 */ /***/ (function(module, exports) { /** @@ -148319,13 +151058,13 @@ module.exports = ExternWebGLRenderer; /***/ }), -/* 957 */ +/* 962 */ /***/ (function(module, exports) { /***/ }), -/* 958 */ +/* 963 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148339,15 +151078,15 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(959); + renderWebGL = __webpack_require__(964); // Needed for Graphics.generateTexture - renderCanvas = __webpack_require__(393); + renderCanvas = __webpack_require__(400); } if (true) { - renderCanvas = __webpack_require__(393); + renderCanvas = __webpack_require__(400); } module.exports = { @@ -148359,7 +151098,7 @@ module.exports = { /***/ }), -/* 959 */ +/* 964 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148368,8 +151107,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Commands = __webpack_require__(190); -var Utils = __webpack_require__(10); +var Commands = __webpack_require__(192); +var Utils = __webpack_require__(9); // TODO: Remove the use of this var Point = function (x, y, width) @@ -148724,7 +151463,7 @@ module.exports = GraphicsWebGLRenderer; /***/ }), -/* 960 */ +/* 965 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148738,12 +151477,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(961); + renderWebGL = __webpack_require__(966); } if (true) { - renderCanvas = __webpack_require__(962); + renderCanvas = __webpack_require__(967); } module.exports = { @@ -148755,7 +151494,7 @@ module.exports = { /***/ }), -/* 961 */ +/* 966 */ /***/ (function(module, exports) { /** @@ -148788,7 +151527,7 @@ module.exports = SpriteWebGLRenderer; /***/ }), -/* 962 */ +/* 967 */ /***/ (function(module, exports) { /** @@ -148821,7 +151560,7 @@ module.exports = SpriteCanvasRenderer; /***/ }), -/* 963 */ +/* 968 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148835,12 +151574,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(964); + renderWebGL = __webpack_require__(969); } if (true) { - renderCanvas = __webpack_require__(965); + renderCanvas = __webpack_require__(970); } module.exports = { @@ -148852,7 +151591,7 @@ module.exports = { /***/ }), -/* 964 */ +/* 969 */ /***/ (function(module, exports) { /** @@ -148885,7 +151624,7 @@ module.exports = ImageWebGLRenderer; /***/ }), -/* 965 */ +/* 970 */ /***/ (function(module, exports) { /** @@ -148918,7 +151657,7 @@ module.exports = ImageCanvasRenderer; /***/ }), -/* 966 */ +/* 971 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148933,17 +151672,17 @@ module.exports = ImageCanvasRenderer; module.exports = { - GravityWell: __webpack_require__(394), - Particle: __webpack_require__(395), - ParticleEmitter: __webpack_require__(396), - ParticleEmitterManager: __webpack_require__(192), - Zones: __webpack_require__(971) + GravityWell: __webpack_require__(401), + Particle: __webpack_require__(402), + ParticleEmitter: __webpack_require__(403), + ParticleEmitterManager: __webpack_require__(194), + Zones: __webpack_require__(976) }; /***/ }), -/* 967 */ +/* 972 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -148953,8 +151692,8 @@ module.exports = { */ var Class = __webpack_require__(0); -var FloatBetween = __webpack_require__(326); -var GetEaseFunction = __webpack_require__(82); +var FloatBetween = __webpack_require__(119); +var GetEaseFunction = __webpack_require__(69); var GetFastValue = __webpack_require__(2); var Wrap = __webpack_require__(58); @@ -149157,7 +151896,7 @@ var EmitterOp = new Class({ * * @param {number} value - The value of the property. * - * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object. + * @return {this} This Emitter Op object. */ onChange: function (value) { @@ -149174,7 +151913,7 @@ var EmitterOp = new Class({ * @method Phaser.GameObjects.Particles.EmitterOp#setMethods * @since 3.0.0 * - * @return {Phaser.GameObjects.Particles.EmitterOp} This Emitter Op object. + * @return {this} This Emitter Op object. */ setMethods: function () { @@ -149534,7 +152273,7 @@ module.exports = EmitterOp; /***/ }), -/* 968 */ +/* 973 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149548,12 +152287,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(969); + renderWebGL = __webpack_require__(974); } if (true) { - renderCanvas = __webpack_require__(970); + renderCanvas = __webpack_require__(975); } module.exports = { @@ -149565,7 +152304,7 @@ module.exports = { /***/ }), -/* 969 */ +/* 974 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149574,7 +152313,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -149724,7 +152463,7 @@ module.exports = ParticleManagerWebGLRenderer; /***/ }), -/* 970 */ +/* 975 */ /***/ (function(module, exports) { /** @@ -149847,7 +152586,7 @@ module.exports = ParticleManagerCanvasRenderer; /***/ }), -/* 971 */ +/* 976 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149862,15 +152601,15 @@ module.exports = ParticleManagerCanvasRenderer; module.exports = { - DeathZone: __webpack_require__(397), - EdgeZone: __webpack_require__(398), - RandomZone: __webpack_require__(400) + DeathZone: __webpack_require__(404), + EdgeZone: __webpack_require__(405), + RandomZone: __webpack_require__(407) }; /***/ }), -/* 972 */ +/* 977 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149884,12 +152623,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(973); + renderWebGL = __webpack_require__(978); } if (true) { - renderCanvas = __webpack_require__(974); + renderCanvas = __webpack_require__(979); } module.exports = { @@ -149901,7 +152640,7 @@ module.exports = { /***/ }), -/* 973 */ +/* 978 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -149910,7 +152649,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -149964,7 +152703,7 @@ module.exports = RenderTextureWebGLRenderer; /***/ }), -/* 974 */ +/* 979 */ /***/ (function(module, exports) { /** @@ -149997,7 +152736,7 @@ module.exports = RenderTextureCanvasRenderer; /***/ }), -/* 975 */ +/* 980 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150006,15 +152745,15 @@ module.exports = RenderTextureCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RETRO_FONT_CONST = __webpack_require__(976); -var Extend = __webpack_require__(17); +var RETRO_FONT_CONST = __webpack_require__(981); +var Extend = __webpack_require__(18); /** * @namespace Phaser.GameObjects.RetroFont * @since 3.6.0 */ -var RetroFont = { Parse: __webpack_require__(977) }; +var RetroFont = { Parse: __webpack_require__(982) }; // Merge in the consts RetroFont = Extend(false, RetroFont, RETRO_FONT_CONST); @@ -150023,7 +152762,7 @@ module.exports = RetroFont; /***/ }), -/* 976 */ +/* 981 */ /***/ (function(module, exports) { /** @@ -150139,7 +152878,7 @@ module.exports = RETRO_FONT_CONST; /***/ }), -/* 977 */ +/* 982 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150255,7 +152994,206 @@ module.exports = ParseRetroFont; /***/ }), -/* 978 */ +/* 983 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var renderWebGL = __webpack_require__(1); +var renderCanvas = __webpack_require__(1); + +if (true) +{ + renderWebGL = __webpack_require__(984); +} + +if (true) +{ + renderCanvas = __webpack_require__(985); +} + +module.exports = { + + renderWebGL: renderWebGL, + renderCanvas: renderCanvas + +}; + + +/***/ }), +/* 984 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Utils = __webpack_require__(9); + +/** + * 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 = src.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 alpha = src.alpha; + var getTint = Utils.getTintAppendFloatAlphaAndSwap; + var roundPixels = camera.roundPixels; + + var meshVerticesLength = vertices.length; + var vertexCount = Math.floor(meshVerticesLength * 0.5); + + // Because it's a triangle strip and we don't want lots of degenerate triangles joining things up + 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(); + } + + var debugCallback = src.debugCallback; + var debugVerts = []; + + 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 (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] = getTint(colors[colorIndex], camera.alpha * (alphas[colorIndex] * alpha)); + + colorIndex++; + + if (debugCallback) + { + debugVerts[i + 0] = tx; + debugVerts[i + 1] = ty; + } + } + + if (debugCallback) + { + debugCallback.call(src, src, meshVerticesLength, debugVerts); + } + + pipeline.vertexCount += vertexCount; +}; + +module.exports = RopeWebGLRenderer; + + +/***/ }), +/* 985 */ +/***/ (function(module, exports) { + +/** + * @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.23.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; + + +/***/ }), +/* 986 */ /***/ (function(module, exports) { /** @@ -150337,7 +153275,7 @@ module.exports = GetTextSize; /***/ }), -/* 979 */ +/* 987 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150351,12 +153289,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(980); + renderWebGL = __webpack_require__(988); } if (true) { - renderCanvas = __webpack_require__(981); + renderCanvas = __webpack_require__(989); } module.exports = { @@ -150368,7 +153306,7 @@ module.exports = { /***/ }), -/* 980 */ +/* 988 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150377,7 +153315,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -150433,7 +153371,7 @@ module.exports = TextWebGLRenderer; /***/ }), -/* 981 */ +/* 989 */ /***/ (function(module, exports) { /** @@ -150471,7 +153409,7 @@ module.exports = TextCanvasRenderer; /***/ }), -/* 982 */ +/* 990 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -150481,9 +153419,9 @@ module.exports = TextCanvasRenderer; */ var Class = __webpack_require__(0); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var GetValue = __webpack_require__(6); -var MeasureText = __webpack_require__(983); +var MeasureText = __webpack_require__(991); // Key: [ Object Key, Default Value ] @@ -151524,7 +154462,7 @@ module.exports = TextStyle; /***/ }), -/* 983 */ +/* 991 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151659,7 +154597,7 @@ module.exports = MeasureText; /***/ }), -/* 984 */ +/* 992 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151673,12 +154611,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(985); + renderWebGL = __webpack_require__(993); } if (true) { - renderCanvas = __webpack_require__(986); + renderCanvas = __webpack_require__(994); } module.exports = { @@ -151690,7 +154628,7 @@ module.exports = { /***/ }), -/* 985 */ +/* 993 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151699,7 +154637,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -151750,7 +154688,7 @@ module.exports = TileSpriteWebGLRenderer; /***/ }), -/* 986 */ +/* 994 */ /***/ (function(module, exports) { /** @@ -151785,7 +154723,7 @@ module.exports = TileSpriteCanvasRenderer; /***/ }), -/* 987 */ +/* 995 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151799,12 +154737,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(988); + renderWebGL = __webpack_require__(996); } if (true) { - renderCanvas = __webpack_require__(989); + renderCanvas = __webpack_require__(997); } module.exports = { @@ -151816,7 +154754,7 @@ module.exports = { /***/ }), -/* 988 */ +/* 996 */ /***/ (function(module, exports) { /** @@ -151852,7 +154790,7 @@ module.exports = VideoWebGLRenderer; /***/ }), -/* 989 */ +/* 997 */ /***/ (function(module, exports) { /** @@ -151888,7 +154826,7 @@ module.exports = VideoCanvasRenderer; /***/ }), -/* 990 */ +/* 998 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151902,12 +154840,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(991); + renderWebGL = __webpack_require__(999); } if (true) { - renderCanvas = __webpack_require__(992); + renderCanvas = __webpack_require__(1000); } module.exports = { @@ -151919,7 +154857,7 @@ module.exports = { /***/ }), -/* 991 */ +/* 999 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -151928,7 +154866,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -151997,7 +154935,7 @@ module.exports = ArcWebGLRenderer; /***/ }), -/* 992 */ +/* 1000 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152007,9 +154945,9 @@ module.exports = ArcWebGLRenderer; */ var DegToRad = __webpack_require__(35); -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -152073,7 +155011,7 @@ module.exports = ArcCanvasRenderer; /***/ }), -/* 993 */ +/* 1001 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152087,12 +155025,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(994); + renderWebGL = __webpack_require__(1002); } if (true) { - renderCanvas = __webpack_require__(995); + renderCanvas = __webpack_require__(1003); } module.exports = { @@ -152104,7 +155042,7 @@ module.exports = { /***/ }), -/* 994 */ +/* 1002 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152113,7 +155051,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -152182,7 +155120,7 @@ module.exports = CurveWebGLRenderer; /***/ }), -/* 995 */ +/* 1003 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152191,9 +155129,9 @@ module.exports = CurveWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -152270,7 +155208,7 @@ module.exports = CurveCanvasRenderer; /***/ }), -/* 996 */ +/* 1004 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152284,12 +155222,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(997); + renderWebGL = __webpack_require__(1005); } if (true) { - renderCanvas = __webpack_require__(998); + renderCanvas = __webpack_require__(1006); } module.exports = { @@ -152301,7 +155239,7 @@ module.exports = { /***/ }), -/* 997 */ +/* 1005 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152310,7 +155248,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -152379,7 +155317,7 @@ module.exports = EllipseWebGLRenderer; /***/ }), -/* 998 */ +/* 1006 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152388,9 +155326,9 @@ module.exports = EllipseWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -152464,7 +155402,7 @@ module.exports = EllipseCanvasRenderer; /***/ }), -/* 999 */ +/* 1007 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152478,12 +155416,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1000); + renderWebGL = __webpack_require__(1008); } if (true) { - renderCanvas = __webpack_require__(1001); + renderCanvas = __webpack_require__(1009); } module.exports = { @@ -152495,7 +155433,7 @@ module.exports = { /***/ }), -/* 1000 */ +/* 1008 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152504,7 +155442,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -152721,7 +155659,7 @@ module.exports = GridWebGLRenderer; /***/ }), -/* 1001 */ +/* 1009 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152730,9 +155668,9 @@ module.exports = GridWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -152910,7 +155848,7 @@ module.exports = GridCanvasRenderer; /***/ }), -/* 1002 */ +/* 1010 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152924,12 +155862,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1003); + renderWebGL = __webpack_require__(1011); } if (true) { - renderCanvas = __webpack_require__(1004); + renderCanvas = __webpack_require__(1012); } module.exports = { @@ -152941,7 +155879,7 @@ module.exports = { /***/ }), -/* 1003 */ +/* 1011 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -152950,7 +155888,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -153099,7 +156037,7 @@ module.exports = IsoBoxWebGLRenderer; /***/ }), -/* 1004 */ +/* 1012 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153108,8 +156046,8 @@ module.exports = IsoBoxWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); -var SetTransform = __webpack_require__(27); +var FillStyleCanvas = __webpack_require__(37); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -153200,7 +156138,7 @@ module.exports = IsoBoxCanvasRenderer; /***/ }), -/* 1005 */ +/* 1013 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153214,12 +156152,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1006); + renderWebGL = __webpack_require__(1014); } if (true) { - renderCanvas = __webpack_require__(1007); + renderCanvas = __webpack_require__(1015); } module.exports = { @@ -153231,7 +156169,7 @@ module.exports = { /***/ }), -/* 1006 */ +/* 1014 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153240,7 +156178,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -153408,7 +156346,7 @@ module.exports = IsoTriangleWebGLRenderer; /***/ }), -/* 1007 */ +/* 1015 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153417,8 +156355,8 @@ module.exports = IsoTriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); -var SetTransform = __webpack_require__(27); +var FillStyleCanvas = __webpack_require__(37); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -153522,7 +156460,7 @@ module.exports = IsoTriangleCanvasRenderer; /***/ }), -/* 1008 */ +/* 1016 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153536,12 +156474,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1009); + renderWebGL = __webpack_require__(1017); } if (true) { - renderCanvas = __webpack_require__(1010); + renderCanvas = __webpack_require__(1018); } module.exports = { @@ -153553,7 +156491,7 @@ module.exports = { /***/ }), -/* 1009 */ +/* 1017 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153562,7 +156500,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -153646,7 +156584,7 @@ module.exports = LineWebGLRenderer; /***/ }), -/* 1010 */ +/* 1018 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153656,7 +156594,7 @@ module.exports = LineWebGLRenderer; */ var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -153703,7 +156641,7 @@ module.exports = LineCanvasRenderer; /***/ }), -/* 1011 */ +/* 1019 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153717,12 +156655,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1012); + renderWebGL = __webpack_require__(1020); } if (true) { - renderCanvas = __webpack_require__(1013); + renderCanvas = __webpack_require__(1021); } module.exports = { @@ -153734,7 +156672,7 @@ module.exports = { /***/ }), -/* 1012 */ +/* 1020 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153743,7 +156681,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -153812,7 +156750,7 @@ module.exports = PolygonWebGLRenderer; /***/ }), -/* 1013 */ +/* 1021 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153821,9 +156759,9 @@ module.exports = PolygonWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -153897,7 +156835,7 @@ module.exports = PolygonCanvasRenderer; /***/ }), -/* 1014 */ +/* 1022 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153911,12 +156849,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1015); + renderWebGL = __webpack_require__(1023); } if (true) { - renderCanvas = __webpack_require__(1016); + renderCanvas = __webpack_require__(1024); } module.exports = { @@ -153928,7 +156866,7 @@ module.exports = { /***/ }), -/* 1015 */ +/* 1023 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -153938,7 +156876,7 @@ module.exports = { */ var StrokePathWebGL = __webpack_require__(70); -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -154020,7 +156958,7 @@ module.exports = RectangleWebGLRenderer; /***/ }), -/* 1016 */ +/* 1024 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154029,9 +156967,9 @@ module.exports = RectangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -154094,7 +157032,7 @@ module.exports = RectangleCanvasRenderer; /***/ }), -/* 1017 */ +/* 1025 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154108,12 +157046,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1018); + renderWebGL = __webpack_require__(1026); } if (true) { - renderCanvas = __webpack_require__(1019); + renderCanvas = __webpack_require__(1027); } module.exports = { @@ -154125,7 +157063,7 @@ module.exports = { /***/ }), -/* 1018 */ +/* 1026 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154134,7 +157072,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillPathWebGL = __webpack_require__(100); +var FillPathWebGL = __webpack_require__(98); var StrokePathWebGL = __webpack_require__(70); /** @@ -154203,7 +157141,7 @@ module.exports = StarWebGLRenderer; /***/ }), -/* 1019 */ +/* 1027 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154212,9 +157150,9 @@ module.exports = StarWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -154288,7 +157226,7 @@ module.exports = StarCanvasRenderer; /***/ }), -/* 1020 */ +/* 1028 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154302,12 +157240,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1021); + renderWebGL = __webpack_require__(1029); } if (true) { - renderCanvas = __webpack_require__(1022); + renderCanvas = __webpack_require__(1030); } module.exports = { @@ -154319,7 +157257,7 @@ module.exports = { /***/ }), -/* 1021 */ +/* 1029 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154329,7 +157267,7 @@ module.exports = { */ var StrokePathWebGL = __webpack_require__(70); -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -154422,7 +157360,7 @@ module.exports = TriangleWebGLRenderer; /***/ }), -/* 1022 */ +/* 1030 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154431,9 +157369,9 @@ module.exports = TriangleWebGLRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var FillStyleCanvas = __webpack_require__(36); +var FillStyleCanvas = __webpack_require__(37); var LineStyleCanvas = __webpack_require__(49); -var SetTransform = __webpack_require__(27); +var SetTransform = __webpack_require__(28); /** * Renders this Game Object with the Canvas Renderer to the given Camera. @@ -154497,7 +157435,7 @@ module.exports = TriangleCanvasRenderer; /***/ }), -/* 1023 */ +/* 1031 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154506,7 +157444,7 @@ module.exports = TriangleCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(186); +var Blitter = __webpack_require__(188); var GameObjectFactory = __webpack_require__(5); /** @@ -154539,7 +157477,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) /***/ }), -/* 1024 */ +/* 1032 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154549,7 +157487,7 @@ GameObjectFactory.register('blitter', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Container = __webpack_require__(187); +var Container = __webpack_require__(189); var GameObjectFactory = __webpack_require__(5); /** @@ -154573,7 +157511,7 @@ GameObjectFactory.register('container', function (x, y, children) /***/ }), -/* 1025 */ +/* 1033 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154582,7 +157520,7 @@ GameObjectFactory.register('container', function (x, y, children) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DOMElement = __webpack_require__(387); +var DOMElement = __webpack_require__(394); var GameObjectFactory = __webpack_require__(5); /** @@ -154663,7 +157601,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) /***/ }), -/* 1026 */ +/* 1034 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154672,7 +157610,7 @@ GameObjectFactory.register('dom', function (x, y, element, style, innerText) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var DynamicBitmapText = __webpack_require__(188); +var DynamicBitmapText = __webpack_require__(190); var GameObjectFactory = __webpack_require__(5); /** @@ -154732,7 +157670,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size /***/ }), -/* 1027 */ +/* 1035 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154741,7 +157679,7 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extern = __webpack_require__(389); +var Extern = __webpack_require__(396); var GameObjectFactory = __webpack_require__(5); /** @@ -154774,7 +157712,7 @@ GameObjectFactory.register('extern', function () /***/ }), -/* 1028 */ +/* 1036 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154783,7 +157721,7 @@ GameObjectFactory.register('extern', function () * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Graphics = __webpack_require__(189); +var Graphics = __webpack_require__(191); var GameObjectFactory = __webpack_require__(5); /** @@ -154813,7 +157751,7 @@ GameObjectFactory.register('graphics', function (config) /***/ }), -/* 1029 */ +/* 1037 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154845,7 +157783,7 @@ GameObjectFactory.register('group', function (children, config) /***/ }), -/* 1030 */ +/* 1038 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154854,7 +157792,7 @@ GameObjectFactory.register('group', function (children, config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Image = __webpack_require__(98); +var Image = __webpack_require__(107); var GameObjectFactory = __webpack_require__(5); /** @@ -154887,7 +157825,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) /***/ }), -/* 1031 */ +/* 1039 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154897,7 +157835,7 @@ GameObjectFactory.register('image', function (x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var ParticleEmitterManager = __webpack_require__(192); +var ParticleEmitterManager = __webpack_require__(194); /** * Creates a new Particle Emitter Manager Game Object and adds it to the Scene. @@ -154933,7 +157871,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) /***/ }), -/* 1032 */ +/* 1040 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154943,7 +157881,7 @@ GameObjectFactory.register('particles', function (key, frame, emitters) */ var GameObjectFactory = __webpack_require__(5); -var PathFollower = __webpack_require__(401); +var PathFollower = __webpack_require__(408); /** * Creates a new PathFollower Game Object and adds it to the Scene. @@ -154981,7 +157919,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) /***/ }), -/* 1033 */ +/* 1041 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -154991,7 +157929,7 @@ GameObjectFactory.register('follower', function (path, x, y, key, frame) */ var GameObjectFactory = __webpack_require__(5); -var RenderTexture = __webpack_require__(193); +var RenderTexture = __webpack_require__(195); /** * Creates a new Render Texture Game Object and adds it to the Scene. @@ -155021,7 +157959,61 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, /***/ }), -/* 1034 */ +/* 1042 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rope = __webpack_require__(197); +var GameObjectFactory = __webpack_require__(5); + +/** + * 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#rope + * @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 {boolean} [horizontal=true] - Should the vertices of this Rope be aligned horizontally (`true`), or vertically (`false`)? + * @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 (true) +{ + GameObjectFactory.register('rope', function (x, y, texture, frame, points, horizontal, colors, alphas) + { + var rope = new Rope(this.scene, x, y, texture, frame, points, horizontal, colors, alphas); + + this.displayList.add(rope); + + return this.updateList.add(rope); + }); +} + +// 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 + + +/***/ }), +/* 1043 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155031,7 +158023,7 @@ GameObjectFactory.register('renderTexture', function (x, y, width, height, key, */ var GameObjectFactory = __webpack_require__(5); -var Sprite = __webpack_require__(69); +var Sprite = __webpack_require__(75); /** * Creates a new Sprite Game Object and adds it to the Scene. @@ -155068,7 +158060,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) /***/ }), -/* 1035 */ +/* 1044 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155077,7 +158069,7 @@ GameObjectFactory.register('sprite', function (x, y, key, frame) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(129); +var BitmapText = __webpack_require__(132); var GameObjectFactory = __webpack_require__(5); /** @@ -155132,7 +158124,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align /***/ }), -/* 1036 */ +/* 1045 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155141,7 +158133,7 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size, align * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Text = __webpack_require__(195); +var Text = __webpack_require__(198); var GameObjectFactory = __webpack_require__(5); /** @@ -155197,7 +158189,7 @@ GameObjectFactory.register('text', function (x, y, text, style) /***/ }), -/* 1037 */ +/* 1046 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155206,7 +158198,7 @@ GameObjectFactory.register('text', function (x, y, text, style) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileSprite = __webpack_require__(196); +var TileSprite = __webpack_require__(199); var GameObjectFactory = __webpack_require__(5); /** @@ -155241,7 +158233,7 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra /***/ }), -/* 1038 */ +/* 1047 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155283,7 +158275,7 @@ GameObjectFactory.register('zone', function (x, y, width, height) /***/ }), -/* 1039 */ +/* 1048 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155292,23 +158284,22 @@ GameObjectFactory.register('zone', function (x, y, width, height) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Video = __webpack_require__(197); +var Video = __webpack_require__(200); var GameObjectFactory = __webpack_require__(5); /** - * Creates a new Image Game Object and adds it to the Scene. + * Creates a new Video 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. + * Note: This method will only be available if the Video Game Object has been built into Phaser. * * @method Phaser.GameObjects.GameObjectFactory#video * @since 3.20.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 {string} [key] - Optional key of the Video this Game Object will play, as stored in the Video Cache. * - * @return {Phaser.GameObjects.Image} The Game Object that was created. + * @return {Phaser.GameObjects.Video} The Game Object that was created. */ GameObjectFactory.register('video', function (x, y, key) { @@ -155330,7 +158321,7 @@ GameObjectFactory.register('video', function (x, y, key) /***/ }), -/* 1040 */ +/* 1049 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155339,7 +158330,7 @@ GameObjectFactory.register('video', function (x, y, key) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Arc = __webpack_require__(402); +var Arc = __webpack_require__(409); var GameObjectFactory = __webpack_require__(5); /** @@ -155403,7 +158394,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph /***/ }), -/* 1041 */ +/* 1050 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155413,7 +158404,7 @@ GameObjectFactory.register('circle', function (x, y, radius, fillColor, fillAlph */ var GameObjectFactory = __webpack_require__(5); -var Curve = __webpack_require__(403); +var Curve = __webpack_require__(410); /** * Creates a new Curve Shape Game Object and adds it to the Scene. @@ -155453,7 +158444,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) /***/ }), -/* 1042 */ +/* 1051 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155462,7 +158453,7 @@ GameObjectFactory.register('curve', function (x, y, curve, fillColor, fillAlpha) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Ellipse = __webpack_require__(404); +var Ellipse = __webpack_require__(411); var GameObjectFactory = __webpack_require__(5); /** @@ -155505,7 +158496,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, /***/ }), -/* 1043 */ +/* 1052 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155515,7 +158506,7 @@ GameObjectFactory.register('ellipse', function (x, y, width, height, fillColor, */ var GameObjectFactory = __webpack_require__(5); -var Grid = __webpack_require__(405); +var Grid = __webpack_require__(412); /** * Creates a new Grid Shape Game Object and adds it to the Scene. @@ -155560,7 +158551,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel /***/ }), -/* 1044 */ +/* 1053 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155570,7 +158561,7 @@ GameObjectFactory.register('grid', function (x, y, width, height, cellWidth, cel */ var GameObjectFactory = __webpack_require__(5); -var IsoBox = __webpack_require__(406); +var IsoBox = __webpack_require__(413); /** * Creates a new IsoBox Shape Game Object and adds it to the Scene. @@ -155611,7 +158602,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill /***/ }), -/* 1045 */ +/* 1054 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155621,7 +158612,7 @@ GameObjectFactory.register('isobox', function (x, y, size, height, fillTop, fill */ var GameObjectFactory = __webpack_require__(5); -var IsoTriangle = __webpack_require__(407); +var IsoTriangle = __webpack_require__(414); /** * Creates a new IsoTriangle Shape Game Object and adds it to the Scene. @@ -155664,7 +158655,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed /***/ }), -/* 1046 */ +/* 1055 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155674,7 +158665,7 @@ GameObjectFactory.register('isotriangle', function (x, y, size, height, reversed */ var GameObjectFactory = __webpack_require__(5); -var Line = __webpack_require__(408); +var Line = __webpack_require__(415); /** * Creates a new Line Shape Game Object and adds it to the Scene. @@ -155715,7 +158706,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, /***/ }), -/* 1047 */ +/* 1056 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155725,7 +158716,7 @@ GameObjectFactory.register('line', function (x, y, x1, y1, x2, y2, strokeColor, */ var GameObjectFactory = __webpack_require__(5); -var Polygon = __webpack_require__(409); +var Polygon = __webpack_require__(416); /** * Creates a new Polygon Shape Game Object and adds it to the Scene. @@ -155768,7 +158759,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp /***/ }), -/* 1048 */ +/* 1057 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155778,7 +158769,7 @@ GameObjectFactory.register('polygon', function (x, y, points, fillColor, fillAlp */ var GameObjectFactory = __webpack_require__(5); -var Rectangle = __webpack_require__(414); +var Rectangle = __webpack_require__(421); /** * Creates a new Rectangle Shape Game Object and adds it to the Scene. @@ -155813,7 +158804,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor /***/ }), -/* 1049 */ +/* 1058 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155822,7 +158813,7 @@ GameObjectFactory.register('rectangle', function (x, y, width, height, fillColor * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Star = __webpack_require__(415); +var Star = __webpack_require__(422); var GameObjectFactory = __webpack_require__(5); /** @@ -155865,7 +158856,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad /***/ }), -/* 1050 */ +/* 1059 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155875,7 +158866,7 @@ GameObjectFactory.register('star', function (x, y, points, innerRadius, outerRad */ var GameObjectFactory = __webpack_require__(5); -var Triangle = __webpack_require__(416); +var Triangle = __webpack_require__(423); /** * Creates a new Triangle Shape Game Object and adds it to the Scene. @@ -155916,7 +158907,7 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f /***/ }), -/* 1051 */ +/* 1060 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155925,10 +158916,10 @@ GameObjectFactory.register('triangle', function (x, y, x1, y1, x2, y2, x3, y3, f * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Blitter = __webpack_require__(186); -var BuildGameObject = __webpack_require__(28); +var Blitter = __webpack_require__(188); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Creates a new Blitter Game Object and returns it. @@ -155966,7 +158957,7 @@ GameObjectCreator.register('blitter', function (config, addToScene) /***/ }), -/* 1052 */ +/* 1061 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -155976,10 +158967,10 @@ GameObjectCreator.register('blitter', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); -var Container = __webpack_require__(187); +var BuildGameObject = __webpack_require__(27); +var Container = __webpack_require__(189); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Creates a new Container Game Object and returns it. @@ -156015,7 +159006,7 @@ GameObjectCreator.register('container', function (config, addToScene) /***/ }), -/* 1053 */ +/* 1062 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156024,10 +159015,10 @@ GameObjectCreator.register('container', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(188); -var BuildGameObject = __webpack_require__(28); +var BitmapText = __webpack_require__(190); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); /** * Creates a new Dynamic Bitmap Text Game Object and returns it. @@ -156066,7 +159057,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) /***/ }), -/* 1054 */ +/* 1063 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156076,7 +159067,7 @@ GameObjectCreator.register('dynamicBitmapText', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var Graphics = __webpack_require__(189); +var Graphics = __webpack_require__(191); /** * Creates a new Graphics Game Object and returns it. @@ -156114,7 +159105,7 @@ GameObjectCreator.register('graphics', function (config, addToScene) /***/ }), -/* 1055 */ +/* 1064 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156147,7 +159138,7 @@ GameObjectCreator.register('group', function (config) /***/ }), -/* 1056 */ +/* 1065 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156156,10 +159147,10 @@ GameObjectCreator.register('group', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Image = __webpack_require__(98); +var GetAdvancedValue = __webpack_require__(14); +var Image = __webpack_require__(107); /** * Creates a new Image Game Object and returns it. @@ -156197,7 +159188,7 @@ GameObjectCreator.register('image', function (config, addToScene) /***/ }), -/* 1057 */ +/* 1066 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156207,9 +159198,9 @@ GameObjectCreator.register('image', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var GetFastValue = __webpack_require__(2); -var ParticleEmitterManager = __webpack_require__(192); +var ParticleEmitterManager = __webpack_require__(194); /** * Creates a new Particle Emitter Manager Game Object and returns it. @@ -156254,7 +159245,7 @@ GameObjectCreator.register('particles', function (config, addToScene) /***/ }), -/* 1058 */ +/* 1067 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156263,10 +159254,10 @@ GameObjectCreator.register('particles', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var RenderTexture = __webpack_require__(193); +var GetAdvancedValue = __webpack_require__(14); +var RenderTexture = __webpack_require__(195); /** * Creates a new Render Texture Game Object and returns it. @@ -156306,7 +159297,7 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) /***/ }), -/* 1059 */ +/* 1068 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156315,11 +159306,66 @@ GameObjectCreator.register('renderTexture', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); -var BuildGameObjectAnimation = __webpack_require__(385); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Sprite = __webpack_require__(69); +var GetAdvancedValue = __webpack_require__(14); +var GetValue = __webpack_require__(6); +var Rope = __webpack_require__(197); + +/** + * 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 horizontal = GetAdvancedValue(config, 'horizontal', true); + 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, horizontal, 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. + + +/***/ }), +/* 1069 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var BuildGameObject = __webpack_require__(27); +var BuildGameObjectAnimation = __webpack_require__(392); +var GameObjectCreator = __webpack_require__(16); +var GetAdvancedValue = __webpack_require__(14); +var Sprite = __webpack_require__(75); /** * Creates a new Sprite Game Object and returns it. @@ -156359,7 +159405,7 @@ GameObjectCreator.register('sprite', function (config, addToScene) /***/ }), -/* 1060 */ +/* 1070 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156368,10 +159414,10 @@ GameObjectCreator.register('sprite', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BitmapText = __webpack_require__(129); -var BuildGameObject = __webpack_require__(28); +var BitmapText = __webpack_require__(132); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var GetValue = __webpack_require__(6); /** @@ -156412,7 +159458,7 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) /***/ }), -/* 1061 */ +/* 1071 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156421,10 +159467,10 @@ GameObjectCreator.register('bitmapText', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Text = __webpack_require__(195); +var GetAdvancedValue = __webpack_require__(14); +var Text = __webpack_require__(198); /** * Creates a new Text Game Object and returns it. @@ -156499,7 +159545,7 @@ GameObjectCreator.register('text', function (config, addToScene) /***/ }), -/* 1062 */ +/* 1072 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156508,10 +159554,10 @@ GameObjectCreator.register('text', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var TileSprite = __webpack_require__(196); +var GetAdvancedValue = __webpack_require__(14); +var TileSprite = __webpack_require__(199); /** * Creates a new TileSprite Game Object and returns it. @@ -156551,7 +159597,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) /***/ }), -/* 1063 */ +/* 1073 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156561,7 +159607,7 @@ GameObjectCreator.register('tileSprite', function (config, addToScene) */ var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var Zone = __webpack_require__(110); /** @@ -156590,7 +159636,7 @@ GameObjectCreator.register('zone', function (config) /***/ }), -/* 1064 */ +/* 1074 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156599,10 +159645,10 @@ GameObjectCreator.register('zone', function (config) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Video = __webpack_require__(197); +var GetAdvancedValue = __webpack_require__(14); +var Video = __webpack_require__(200); /** * Creates a new Video Game Object and returns it. @@ -156639,7 +159685,7 @@ GameObjectCreator.register('video', function (config, addToScene) /***/ }), -/* 1065 */ +/* 1075 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156653,12 +159699,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1066); + renderWebGL = __webpack_require__(1076); } if (true) { - renderCanvas = __webpack_require__(1067); + renderCanvas = __webpack_require__(1077); } module.exports = { @@ -156670,7 +159716,7 @@ module.exports = { /***/ }), -/* 1066 */ +/* 1076 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156679,7 +159725,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -156788,7 +159834,7 @@ module.exports = MeshWebGLRenderer; /***/ }), -/* 1067 */ +/* 1077 */ /***/ (function(module, exports) { /** @@ -156817,7 +159863,7 @@ module.exports = MeshCanvasRenderer; /***/ }), -/* 1068 */ +/* 1078 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156831,12 +159877,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1069); + renderWebGL = __webpack_require__(1079); } if (true) { - renderCanvas = __webpack_require__(1070); + renderCanvas = __webpack_require__(1080); } module.exports = { @@ -156848,7 +159894,7 @@ module.exports = { /***/ }), -/* 1069 */ +/* 1079 */ /***/ (function(module, exports) { /** @@ -156932,7 +159978,7 @@ module.exports = ShaderWebGLRenderer; /***/ }), -/* 1070 */ +/* 1080 */ /***/ (function(module, exports) { /** @@ -156961,7 +160007,7 @@ module.exports = ShaderCanvasRenderer; /***/ }), -/* 1071 */ +/* 1081 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -156970,7 +160016,7 @@ module.exports = ShaderCanvasRenderer; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Mesh = __webpack_require__(130); +var Mesh = __webpack_require__(134); var GameObjectFactory = __webpack_require__(5); /** @@ -157011,7 +160057,7 @@ if (true) /***/ }), -/* 1072 */ +/* 1082 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157020,7 +160066,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Quad = __webpack_require__(200); +var Quad = __webpack_require__(203); var GameObjectFactory = __webpack_require__(5); /** @@ -157057,7 +160103,7 @@ if (true) /***/ }), -/* 1073 */ +/* 1083 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157066,7 +160112,7 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Shader = __webpack_require__(201); +var Shader = __webpack_require__(204); var GameObjectFactory = __webpack_require__(5); /** @@ -157098,7 +160144,7 @@ if (true) /***/ }), -/* 1074 */ +/* 1084 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157107,11 +160153,11 @@ if (true) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); +var GetAdvancedValue = __webpack_require__(14); var GetValue = __webpack_require__(6); -var Mesh = __webpack_require__(130); +var Mesh = __webpack_require__(134); /** * Creates a new Mesh Game Object and returns it. @@ -157153,7 +160199,7 @@ GameObjectCreator.register('mesh', function (config, addToScene) /***/ }), -/* 1075 */ +/* 1085 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157162,10 +160208,10 @@ GameObjectCreator.register('mesh', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Quad = __webpack_require__(200); +var GetAdvancedValue = __webpack_require__(14); +var Quad = __webpack_require__(203); /** * Creates a new Quad Game Object and returns it. @@ -157203,7 +160249,7 @@ GameObjectCreator.register('quad', function (config, addToScene) /***/ }), -/* 1076 */ +/* 1086 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157212,10 +160258,10 @@ GameObjectCreator.register('quad', function (config, addToScene) * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var BuildGameObject = __webpack_require__(28); +var BuildGameObject = __webpack_require__(27); var GameObjectCreator = __webpack_require__(16); -var GetAdvancedValue = __webpack_require__(15); -var Shader = __webpack_require__(201); +var GetAdvancedValue = __webpack_require__(14); +var Shader = __webpack_require__(204); /** * Creates a new Shader Game Object and returns it. @@ -157256,7 +160302,7 @@ GameObjectCreator.register('shader', function (config, addToScene) /***/ }), -/* 1077 */ +/* 1087 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157266,9 +160312,9 @@ GameObjectCreator.register('shader', function (config, addToScene) */ var Class = __webpack_require__(0); -var LightsManager = __webpack_require__(421); +var LightsManager = __webpack_require__(428); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -157372,7 +160418,7 @@ module.exports = LightsPlugin; /***/ }), -/* 1078 */ +/* 1088 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157383,27 +160429,27 @@ module.exports = LightsPlugin; var Circle = __webpack_require__(65); -Circle.Area = __webpack_require__(1079); -Circle.Circumference = __webpack_require__(265); -Circle.CircumferencePoint = __webpack_require__(146); -Circle.Clone = __webpack_require__(1080); +Circle.Area = __webpack_require__(1089); +Circle.Circumference = __webpack_require__(268); +Circle.CircumferencePoint = __webpack_require__(149); +Circle.Clone = __webpack_require__(1090); 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); +Circle.ContainsPoint = __webpack_require__(1091); +Circle.ContainsRect = __webpack_require__(1092); +Circle.CopyFrom = __webpack_require__(1093); +Circle.Equals = __webpack_require__(1094); +Circle.GetBounds = __webpack_require__(1095); +Circle.GetPoint = __webpack_require__(266); +Circle.GetPoints = __webpack_require__(267); +Circle.Offset = __webpack_require__(1096); +Circle.OffsetPoint = __webpack_require__(1097); +Circle.Random = __webpack_require__(150); module.exports = Circle; /***/ }), -/* 1079 */ +/* 1089 */ /***/ (function(module, exports) { /** @@ -157431,7 +160477,7 @@ module.exports = Area; /***/ }), -/* 1080 */ +/* 1090 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157461,7 +160507,7 @@ module.exports = Clone; /***/ }), -/* 1081 */ +/* 1091 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157492,7 +160538,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1082 */ +/* 1092 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157528,7 +160574,7 @@ module.exports = ContainsRect; /***/ }), -/* 1083 */ +/* 1093 */ /***/ (function(module, exports) { /** @@ -157560,7 +160606,7 @@ module.exports = CopyFrom; /***/ }), -/* 1084 */ +/* 1094 */ /***/ (function(module, exports) { /** @@ -157594,7 +160640,7 @@ module.exports = Equals; /***/ }), -/* 1085 */ +/* 1095 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157634,7 +160680,7 @@ module.exports = GetBounds; /***/ }), -/* 1086 */ +/* 1096 */ /***/ (function(module, exports) { /** @@ -157669,7 +160715,7 @@ module.exports = Offset; /***/ }), -/* 1087 */ +/* 1097 */ /***/ (function(module, exports) { /** @@ -157703,7 +160749,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1088 */ +/* 1098 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157714,27 +160760,27 @@ module.exports = OffsetPoint; var Ellipse = __webpack_require__(95); -Ellipse.Area = __webpack_require__(1089); -Ellipse.Circumference = __webpack_require__(392); -Ellipse.CircumferencePoint = __webpack_require__(191); -Ellipse.Clone = __webpack_require__(1090); +Ellipse.Area = __webpack_require__(1099); +Ellipse.Circumference = __webpack_require__(399); +Ellipse.CircumferencePoint = __webpack_require__(193); +Ellipse.Clone = __webpack_require__(1100); Ellipse.Contains = __webpack_require__(96); -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); +Ellipse.ContainsPoint = __webpack_require__(1101); +Ellipse.ContainsRect = __webpack_require__(1102); +Ellipse.CopyFrom = __webpack_require__(1103); +Ellipse.Equals = __webpack_require__(1104); +Ellipse.GetBounds = __webpack_require__(1105); +Ellipse.GetPoint = __webpack_require__(397); +Ellipse.GetPoints = __webpack_require__(398); +Ellipse.Offset = __webpack_require__(1106); +Ellipse.OffsetPoint = __webpack_require__(1107); +Ellipse.Random = __webpack_require__(157); module.exports = Ellipse; /***/ }), -/* 1089 */ +/* 1099 */ /***/ (function(module, exports) { /** @@ -157768,7 +160814,7 @@ module.exports = Area; /***/ }), -/* 1090 */ +/* 1100 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157798,7 +160844,7 @@ module.exports = Clone; /***/ }), -/* 1091 */ +/* 1101 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157829,7 +160875,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1092 */ +/* 1102 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157865,7 +160911,7 @@ module.exports = ContainsRect; /***/ }), -/* 1093 */ +/* 1103 */ /***/ (function(module, exports) { /** @@ -157897,7 +160943,7 @@ module.exports = CopyFrom; /***/ }), -/* 1094 */ +/* 1104 */ /***/ (function(module, exports) { /** @@ -157932,7 +160978,7 @@ module.exports = Equals; /***/ }), -/* 1095 */ +/* 1105 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -157972,7 +161018,7 @@ module.exports = GetBounds; /***/ }), -/* 1096 */ +/* 1106 */ /***/ (function(module, exports) { /** @@ -158007,7 +161053,7 @@ module.exports = Offset; /***/ }), -/* 1097 */ +/* 1107 */ /***/ (function(module, exports) { /** @@ -158041,7 +161087,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1098 */ +/* 1108 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158052,7 +161098,7 @@ module.exports = OffsetPoint; */ var Point = __webpack_require__(4); -var CircleToCircle = __webpack_require__(202); +var CircleToCircle = __webpack_require__(205); /** * Checks if two Circles intersect and returns the intersection points as a Point object array. @@ -158135,7 +161181,7 @@ module.exports = GetCircleToCircle; /***/ }), -/* 1099 */ +/* 1109 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158145,8 +161191,8 @@ module.exports = GetCircleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(204); -var CircleToRectangle = __webpack_require__(203); +var GetLineToCircle = __webpack_require__(207); +var CircleToRectangle = __webpack_require__(206); /** * Checks for intersection between a circle and a rectangle, @@ -158185,7 +161231,7 @@ module.exports = GetCircleToRectangle; /***/ }), -/* 1100 */ +/* 1110 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158195,7 +161241,7 @@ module.exports = GetCircleToRectangle; */ var Rectangle = __webpack_require__(11); -var RectangleToRectangle = __webpack_require__(131); +var RectangleToRectangle = __webpack_require__(135); /** * Checks if two Rectangle shapes intersect and returns the area of this intersection as Rectangle object. @@ -158234,7 +161280,7 @@ module.exports = GetRectangleIntersection; /***/ }), -/* 1101 */ +/* 1111 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158244,8 +161290,8 @@ module.exports = GetRectangleIntersection; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToRectangle = __webpack_require__(206); -var RectangleToRectangle = __webpack_require__(131); +var GetLineToRectangle = __webpack_require__(209); +var RectangleToRectangle = __webpack_require__(135); /** * Checks if two Rectangles intersect and returns the intersection points as a Point object array. @@ -158285,7 +161331,7 @@ module.exports = GetRectangleToRectangle; /***/ }), -/* 1102 */ +/* 1112 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158295,8 +161341,8 @@ module.exports = GetRectangleToRectangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RectangleToTriangle = __webpack_require__(425); -var GetLineToRectangle = __webpack_require__(206); +var RectangleToTriangle = __webpack_require__(432); +var GetLineToRectangle = __webpack_require__(209); /** * Checks for intersection between Rectangle shape and Triangle shape, @@ -158333,7 +161379,7 @@ module.exports = GetRectangleToTriangle; /***/ }), -/* 1103 */ +/* 1113 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158343,8 +161389,8 @@ module.exports = GetRectangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetLineToCircle = __webpack_require__(204); -var TriangleToCircle = __webpack_require__(427); +var GetLineToCircle = __webpack_require__(207); +var TriangleToCircle = __webpack_require__(434); /** * Checks if a Triangle and a Circle intersect, and returns the intersection points as a Point object array. @@ -158382,7 +161428,7 @@ module.exports = GetTriangleToCircle; /***/ }), -/* 1104 */ +/* 1114 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158392,8 +161438,8 @@ module.exports = GetTriangleToCircle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TriangleToTriangle = __webpack_require__(430); -var GetTriangleToLine = __webpack_require__(428); +var TriangleToTriangle = __webpack_require__(437); +var GetTriangleToLine = __webpack_require__(435); /** * Checks if two Triangles intersect, and returns the intersection points as a Point object array. @@ -158431,7 +161477,7 @@ module.exports = GetTriangleToTriangle; /***/ }), -/* 1105 */ +/* 1115 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158440,7 +161486,7 @@ module.exports = GetTriangleToTriangle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PointToLine = __webpack_require__(432); +var PointToLine = __webpack_require__(439); /** * Checks if a Point is located on the given line segment. @@ -158472,7 +161518,7 @@ module.exports = PointToLineSegment; /***/ }), -/* 1106 */ +/* 1116 */ /***/ (function(module, exports) { /** @@ -158512,7 +161558,7 @@ module.exports = RectangleToValues; /***/ }), -/* 1107 */ +/* 1117 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158524,39 +161570,40 @@ module.exports = RectangleToValues; var Line = __webpack_require__(56); Line.Angle = __webpack_require__(85); -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.BresenhamPoints = __webpack_require__(288); +Line.CenterOn = __webpack_require__(1118); +Line.Clone = __webpack_require__(1119); +Line.CopyFrom = __webpack_require__(1120); +Line.Equals = __webpack_require__(1121); +Line.Extend = __webpack_require__(1122); +Line.GetEasedPoints = __webpack_require__(1123); +Line.GetMidPoint = __webpack_require__(1124); +Line.GetNearestPoint = __webpack_require__(1125); +Line.GetNormal = __webpack_require__(1126); +Line.GetPoint = __webpack_require__(275); +Line.GetPoints = __webpack_require__(153); +Line.GetShortestDistance = __webpack_require__(1127); +Line.Height = __webpack_require__(1128); 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); +Line.NormalAngle = __webpack_require__(440); +Line.NormalX = __webpack_require__(1129); +Line.NormalY = __webpack_require__(1130); +Line.Offset = __webpack_require__(1131); +Line.PerpSlope = __webpack_require__(1132); +Line.Random = __webpack_require__(154); +Line.ReflectAngle = __webpack_require__(1133); +Line.Rotate = __webpack_require__(1134); +Line.RotateAroundPoint = __webpack_require__(1135); +Line.RotateAroundXY = __webpack_require__(211); +Line.SetToAngle = __webpack_require__(1136); +Line.Slope = __webpack_require__(1137); +Line.Width = __webpack_require__(1138); module.exports = Line; /***/ }), -/* 1108 */ +/* 1118 */ /***/ (function(module, exports) { /** @@ -158596,7 +161643,7 @@ module.exports = CenterOn; /***/ }), -/* 1109 */ +/* 1119 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158626,7 +161673,7 @@ module.exports = Clone; /***/ }), -/* 1110 */ +/* 1120 */ /***/ (function(module, exports) { /** @@ -158657,7 +161704,7 @@ module.exports = CopyFrom; /***/ }), -/* 1111 */ +/* 1121 */ /***/ (function(module, exports) { /** @@ -158691,7 +161738,7 @@ module.exports = Equals; /***/ }), -/* 1112 */ +/* 1122 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158749,7 +161796,127 @@ module.exports = Extend; /***/ }), -/* 1113 */ +/* 1123 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author Richard Davey + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var DistanceBetweenPoints = __webpack_require__(319); +var GetEaseFunction = __webpack_require__(69); +var Point = __webpack_require__(4); + +/** + * Returns an array of `quantity` Points where each point is taken from the given Line, + * spaced out according to the ease function specified. + * + * ```javascript + * const line = new Phaser.Geom.Line(100, 300, 700, 300); + * const points = Phaser.Geom.Line.GetEasedPoints(line, 'sine.out', 32) + * ``` + * + * In the above example, the `points` array will contain 32 points spread-out across + * the length of `line`, where the position of each point is determined by the `Sine.out` + * ease function. + * + * You can optionally provide a collinear threshold. In this case, the resulting points + * are checked against each other, and if they are `< collinearThreshold` distance apart, + * they are dropped from the results. This can help avoid lots of clustered points at + * far ends of the line with tightly-packed eases such as Quartic. Leave the value set + * to zero to skip this check. + * + * Note that if you provide a collinear threshold, the resulting array may not always + * contain `quantity` points. + * + * @function Phaser.Geom.Line.GetEasedPoints + * @since 3.23.0 + * + * @generic {Phaser.Geom.Point[]} O - [out,$return] + * + * @param {Phaser.Geom.Line} line - The Line object. + * @param {(string|function)} ease - The ease to use. This can be either a string from the EaseMap, or a custom function. + * @param {integer} quantity - The number of points to return. Note that if you provide a `collinearThreshold`, the resulting array may not always contain this number of points. + * @param {number} [collinearThreshold=0] - An optional threshold. The final array is reduced so that each point is spaced out at least this distance apart. This helps reduce clustering in noisey eases. + * @param {number[]} [easeParams] - An optional array of ease parameters to go with the ease. + * + * @return {Phaser.Geom.Point[]} An array of Geom.Points containing the coordinates of the points on the line. + */ +var GetEasedPoints = function (line, ease, quantity, collinearThreshold, easeParams) +{ + if (collinearThreshold === undefined) { collinearThreshold = 0; } + if (easeParams === undefined) { easeParams = []; } + + var results = []; + + var x1 = line.x1; + var y1 = line.y1; + + var spaceX = line.x2 - x1; + var spaceY = line.y2 - y1; + + var easeFunc = GetEaseFunction(ease, easeParams); + + var i; + var v; + var q = quantity - 1; + + for (i = 0; i < q; i++) + { + v = easeFunc(i / q); + + results.push(new Point(x1 + (spaceX * v), y1 + (spaceY * v))); + } + + // Always include the end of the line + v = easeFunc(1); + + results.push(new Point(x1 + (spaceX * v), y1 + (spaceY * v))); + + // Remove collinear parts + if (collinearThreshold > 0) + { + var prevPoint = results[0]; + + // Store the new results here + var sortedResults = [ prevPoint ]; + + for (i = 1; i < results.length - 1; i++) + { + var point = results[i]; + + if (DistanceBetweenPoints(prevPoint, point) >= collinearThreshold) + { + sortedResults.push(point); + prevPoint = point; + } + } + + // Top and tail + var endPoint = results[results.length - 1]; + + if (DistanceBetweenPoints(prevPoint, endPoint) < collinearThreshold) + { + sortedResults.pop(); + } + + sortedResults.push(endPoint); + + return sortedResults; + } + else + { + return results; + } +}; + +module.exports = GetEasedPoints; + + +/***/ }), +/* 1124 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158787,7 +161954,7 @@ module.exports = GetMidPoint; /***/ }), -/* 1114 */ +/* 1125 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158842,7 +162009,7 @@ module.exports = GetNearestPoint; /***/ }), -/* 1115 */ +/* 1126 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158851,7 +162018,7 @@ module.exports = GetNearestPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Angle = __webpack_require__(85); var Point = __webpack_require__(4); @@ -158886,7 +162053,7 @@ module.exports = GetNormal; /***/ }), -/* 1116 */ +/* 1127 */ /***/ (function(module, exports) { /** @@ -158933,7 +162100,7 @@ module.exports = GetShortestDistance; /***/ }), -/* 1117 */ +/* 1128 */ /***/ (function(module, exports) { /** @@ -158961,7 +162128,7 @@ module.exports = Height; /***/ }), -/* 1118 */ +/* 1129 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -158970,18 +162137,18 @@ module.exports = Height; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Angle = __webpack_require__(85); /** - * [description] + * Returns the x component of the normal vector of the given line. * * @function Phaser.Geom.Line.NormalX * @since 3.0.0 * * @param {Phaser.Geom.Line} line - The Line object to get the normal value from. * - * @return {number} [description] + * @return {number} The x component of the normal vector of the line. */ var NormalX = function (line) { @@ -158992,7 +162159,7 @@ module.exports = NormalX; /***/ }), -/* 1119 */ +/* 1130 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159001,7 +162168,7 @@ module.exports = NormalX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var MATH_CONST = __webpack_require__(13); +var MATH_CONST = __webpack_require__(15); var Angle = __webpack_require__(85); /** @@ -159024,7 +162191,7 @@ module.exports = NormalY; /***/ }), -/* 1120 */ +/* 1131 */ /***/ (function(module, exports) { /** @@ -159062,7 +162229,7 @@ module.exports = Offset; /***/ }), -/* 1121 */ +/* 1132 */ /***/ (function(module, exports) { /** @@ -159090,7 +162257,7 @@ module.exports = PerpSlope; /***/ }), -/* 1122 */ +/* 1133 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159100,7 +162267,7 @@ module.exports = PerpSlope; */ var Angle = __webpack_require__(85); -var NormalAngle = __webpack_require__(433); +var NormalAngle = __webpack_require__(440); /** * Calculate the reflected angle between two lines. @@ -159124,7 +162291,7 @@ module.exports = ReflectAngle; /***/ }), -/* 1123 */ +/* 1134 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159133,7 +162300,7 @@ module.exports = ReflectAngle; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(208); +var RotateAroundXY = __webpack_require__(211); /** * Rotate a line around its midpoint by the given angle in radians. @@ -159160,7 +162327,7 @@ module.exports = Rotate; /***/ }), -/* 1124 */ +/* 1135 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159169,7 +162336,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(208); +var RotateAroundXY = __webpack_require__(211); /** * Rotate a line around a point by the given angle in radians. @@ -159194,7 +162361,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1125 */ +/* 1136 */ /***/ (function(module, exports) { /** @@ -159234,7 +162401,7 @@ module.exports = SetToAngle; /***/ }), -/* 1126 */ +/* 1137 */ /***/ (function(module, exports) { /** @@ -159262,7 +162429,7 @@ module.exports = Slope; /***/ }), -/* 1127 */ +/* 1138 */ /***/ (function(module, exports) { /** @@ -159290,7 +162457,7 @@ module.exports = Width; /***/ }), -/* 1128 */ +/* 1139 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159301,27 +162468,27 @@ module.exports = Width; var Point = __webpack_require__(4); -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); +Point.Ceil = __webpack_require__(1140); +Point.Clone = __webpack_require__(1141); +Point.CopyFrom = __webpack_require__(1142); +Point.Equals = __webpack_require__(1143); +Point.Floor = __webpack_require__(1144); +Point.GetCentroid = __webpack_require__(1145); +Point.GetMagnitude = __webpack_require__(441); +Point.GetMagnitudeSq = __webpack_require__(442); +Point.GetRectangleFromPoints = __webpack_require__(1146); +Point.Interpolate = __webpack_require__(1147); +Point.Invert = __webpack_require__(1148); +Point.Negative = __webpack_require__(1149); +Point.Project = __webpack_require__(1150); +Point.ProjectUnit = __webpack_require__(1151); +Point.SetMagnitude = __webpack_require__(1152); module.exports = Point; /***/ }), -/* 1129 */ +/* 1140 */ /***/ (function(module, exports) { /** @@ -159351,7 +162518,7 @@ module.exports = Ceil; /***/ }), -/* 1130 */ +/* 1141 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159381,7 +162548,7 @@ module.exports = Clone; /***/ }), -/* 1131 */ +/* 1142 */ /***/ (function(module, exports) { /** @@ -159412,7 +162579,7 @@ module.exports = CopyFrom; /***/ }), -/* 1132 */ +/* 1143 */ /***/ (function(module, exports) { /** @@ -159441,7 +162608,7 @@ module.exports = Equals; /***/ }), -/* 1133 */ +/* 1144 */ /***/ (function(module, exports) { /** @@ -159471,7 +162638,7 @@ module.exports = Floor; /***/ }), -/* 1134 */ +/* 1145 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159491,10 +162658,10 @@ var Point = __webpack_require__(4); * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point[]} points - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Types.Math.Vector2Like[]} points - An array of Vector2Like objects to get the geometric center of. + * @param {Phaser.Geom.Point} [out] - A Point object to store the output coordinates in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object representing the geometric center of the given points. */ var GetCentroid = function (points, out) { @@ -159535,7 +162702,7 @@ module.exports = GetCentroid; /***/ }), -/* 1135 */ +/* 1146 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159554,10 +162721,10 @@ var Rectangle = __webpack_require__(11); * * @generic {Phaser.Geom.Rectangle} O - [out,$return] * - * @param {Phaser.Geom.Point[]} points - [description] - * @param {Phaser.Geom.Rectangle} [out] - [description] + * @param {Phaser.Types.Math.Vector2Like[]} points - An array of Vector2Like objects to get the AABB from. + * @param {Phaser.Geom.Rectangle} [out] - A Rectangle object to store the results in. If not given, a new Rectangle instance is created. * - * @return {Phaser.Geom.Rectangle} [description] + * @return {Phaser.Geom.Rectangle} A Rectangle object holding the AABB values for the given points. */ var GetRectangleFromPoints = function (points, out) { @@ -159605,7 +162772,7 @@ module.exports = GetRectangleFromPoints; /***/ }), -/* 1136 */ +/* 1147 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159617,7 +162784,7 @@ module.exports = GetRectangleFromPoints; var Point = __webpack_require__(4); /** - * [description] + * Returns the linear interpolation point between the two given points, based on `t`. * * @function Phaser.Geom.Point.Interpolate * @since 3.0.0 @@ -159646,7 +162813,7 @@ module.exports = Interpolate; /***/ }), -/* 1137 */ +/* 1148 */ /***/ (function(module, exports) { /** @@ -159676,7 +162843,7 @@ module.exports = Invert; /***/ }), -/* 1138 */ +/* 1149 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159711,7 +162878,7 @@ module.exports = Negative; /***/ }), -/* 1139 */ +/* 1150 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159721,21 +162888,22 @@ module.exports = Negative; */ var Point = __webpack_require__(4); -var GetMagnitudeSq = __webpack_require__(435); +var GetMagnitudeSq = __webpack_require__(442); /** - * [description] + * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the + * orthogonal projection of `pointA` onto a straight line paralle to `pointB`. * * @function Phaser.Geom.Point.Project * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point} pointA - [description] - * @param {Phaser.Geom.Point} pointB - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Point} pointA - Point A, to be projected onto Point B. + * @param {Phaser.Geom.Point} pointB - Point B, to have Point A projected upon it. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of the vector projection of `pointA` onto `pointB`. */ var Project = function (pointA, pointB, out) { @@ -159757,7 +162925,7 @@ module.exports = Project; /***/ }), -/* 1140 */ +/* 1151 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159769,18 +162937,19 @@ module.exports = Project; var Point = __webpack_require__(4); /** - * [description] + * Calculates the vector projection of `pointA` onto the nonzero `pointB`. This is the + * orthogonal projection of `pointA` onto a straight line paralle to `pointB`. * * @function Phaser.Geom.Point.ProjectUnit * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Point} pointA - [description] - * @param {Phaser.Geom.Point} pointB - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Point} pointA - Point A, to be projected onto Point B. Must be a normalized point with a magnitude of 1. + * @param {Phaser.Geom.Point} pointB - Point B, to have Point A projected upon it. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A unit Point object holding the coordinates of the vector projection of `pointA` onto `pointB`. */ var ProjectUnit = function (pointA, pointB, out) { @@ -159801,7 +162970,7 @@ module.exports = ProjectUnit; /***/ }), -/* 1141 */ +/* 1152 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159810,7 +162979,7 @@ module.exports = ProjectUnit; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetMagnitude = __webpack_require__(434); +var GetMagnitude = __webpack_require__(441); /** * Changes the magnitude (length) of a two-dimensional vector without changing its direction. @@ -159845,7 +163014,7 @@ module.exports = SetMagnitude; /***/ }), -/* 1142 */ +/* 1153 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159854,23 +163023,23 @@ module.exports = SetMagnitude; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(198); +var Polygon = __webpack_require__(201); -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); +Polygon.Clone = __webpack_require__(1154); +Polygon.Contains = __webpack_require__(202); +Polygon.ContainsPoint = __webpack_require__(1155); +Polygon.GetAABB = __webpack_require__(417); +Polygon.GetNumberArray = __webpack_require__(1156); +Polygon.GetPoints = __webpack_require__(418); +Polygon.Perimeter = __webpack_require__(419); +Polygon.Reverse = __webpack_require__(1157); +Polygon.Smooth = __webpack_require__(420); module.exports = Polygon; /***/ }), -/* 1143 */ +/* 1154 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159879,7 +163048,7 @@ module.exports = Polygon; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Polygon = __webpack_require__(198); +var Polygon = __webpack_require__(201); /** * Create a new polygon which is a copy of the specified polygon @@ -159900,7 +163069,7 @@ module.exports = Clone; /***/ }), -/* 1144 */ +/* 1155 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -159909,18 +163078,18 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(199); +var Contains = __webpack_require__(202); /** - * [description] + * Checks the given Point again the Polygon to see if the Point lays within its vertices. * * @function Phaser.Geom.Polygon.ContainsPoint * @since 3.0.0 * - * @param {Phaser.Geom.Polygon} polygon - [description] - * @param {Phaser.Geom.Point} point - [description] + * @param {Phaser.Geom.Polygon} polygon - The Polygon to check. + * @param {Phaser.Geom.Point} point - The Point to check if it's within the Polygon. * - * @return {boolean} [description] + * @return {boolean} `true` if the Point is within the Polygon, otherwise `false`. */ var ContainsPoint = function (polygon, point) { @@ -159931,7 +163100,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1145 */ +/* 1156 */ /***/ (function(module, exports) { /** @@ -159974,7 +163143,7 @@ module.exports = GetNumberArray; /***/ }), -/* 1146 */ +/* 1157 */ /***/ (function(module, exports) { /** @@ -160006,7 +163175,7 @@ module.exports = Reverse; /***/ }), -/* 1147 */ +/* 1158 */ /***/ (function(module, exports) { /** @@ -160034,7 +163203,7 @@ module.exports = Area; /***/ }), -/* 1148 */ +/* 1159 */ /***/ (function(module, exports) { /** @@ -160067,7 +163236,7 @@ module.exports = Ceil; /***/ }), -/* 1149 */ +/* 1160 */ /***/ (function(module, exports) { /** @@ -160102,7 +163271,7 @@ module.exports = CeilAll; /***/ }), -/* 1150 */ +/* 1161 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160132,7 +163301,7 @@ module.exports = Clone; /***/ }), -/* 1151 */ +/* 1162 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160141,7 +163310,7 @@ module.exports = Clone; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Contains = __webpack_require__(47); +var Contains = __webpack_require__(48); /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. @@ -160163,7 +163332,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1152 */ +/* 1163 */ /***/ (function(module, exports) { /** @@ -160194,7 +163363,7 @@ module.exports = CopyFrom; /***/ }), -/* 1153 */ +/* 1164 */ /***/ (function(module, exports) { /** @@ -160228,7 +163397,7 @@ module.exports = Equals; /***/ }), -/* 1154 */ +/* 1165 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160237,7 +163406,7 @@ module.exports = Equals; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(209); +var GetAspectRatio = __webpack_require__(212); /** * Adjusts the target rectangle, changing its width, height and position, @@ -160281,7 +163450,7 @@ module.exports = FitInside; /***/ }), -/* 1155 */ +/* 1166 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160290,7 +163459,7 @@ module.exports = FitInside; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetAspectRatio = __webpack_require__(209); +var GetAspectRatio = __webpack_require__(212); /** * Adjusts the target rectangle, changing its width, height and position, @@ -160334,7 +163503,7 @@ module.exports = FitOutside; /***/ }), -/* 1156 */ +/* 1167 */ /***/ (function(module, exports) { /** @@ -160367,7 +163536,7 @@ module.exports = Floor; /***/ }), -/* 1157 */ +/* 1168 */ /***/ (function(module, exports) { /** @@ -160402,7 +163571,50 @@ module.exports = FloorAll; /***/ }), -/* 1158 */ +/* 1169 */ +/***/ (function(module, exports, __webpack_require__) { + +/** + * @author samme + * @copyright 2020 Photon Storm Ltd. + * @license {@link https://opensource.org/licenses/MIT|MIT License} + */ + +var Rectangle = __webpack_require__(11); + +/** + * Create the smallest Rectangle containing two coordinate pairs. + * + * @function Phaser.Geom.Rectangle.FromXY + * @since 3.23.0 + * + * @generic {Phaser.Geom.Rectangle} O - [out,$return] + * + * @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. + * @param {Phaser.Geom.Rectangle} [out] - Optional Rectangle to adjust. + * + * @return {Phaser.Geom.Rectangle} The adjusted `out` Rectangle, or a new Rectangle if none was provided. + */ +var FromXY = function (x1, y1, x2, y2, out) +{ + if (out === undefined) { out = new Rectangle(); } + + return out.setTo( + Math.min(x1, x2), + Math.min(y1, y2), + Math.abs(x1 - x2), + Math.abs(y1 - y2) + ); +}; + +module.exports = FromXY; + + +/***/ }), +/* 1170 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160440,7 +163652,7 @@ module.exports = GetCenter; /***/ }), -/* 1159 */ +/* 1171 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160453,18 +163665,18 @@ var Point = __webpack_require__(4); /** - * The size of the Rectangle object, expressed as a Point object - * with the values of the width and height properties. + * Returns the size of the Rectangle, expressed as a Point object. + * With the value of the `width` as the `x` property and the `height` as the `y` property. * * @function Phaser.Geom.Rectangle.GetSize * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rect - [description] - * @param {(Phaser.Geom.Point|object)} [out] - [description] + * @param {Phaser.Geom.Rectangle} rect - The Rectangle to get the size from. + * @param {(Phaser.Geom.Point|object)} [out] - The Point object to store the size in. If not given, a new Point instance is created. * - * @return {(Phaser.Geom.Point|object)} [description] + * @return {(Phaser.Geom.Point|object)} A Point object where `x` holds the width and `y` holds the height of the Rectangle. */ var GetSize = function (rect, out) { @@ -160480,7 +163692,7 @@ module.exports = GetSize; /***/ }), -/* 1160 */ +/* 1172 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160489,7 +163701,7 @@ module.exports = GetSize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CenterOn = __webpack_require__(165); +var CenterOn = __webpack_require__(168); /** @@ -160522,7 +163734,7 @@ module.exports = Inflate; /***/ }), -/* 1161 */ +/* 1173 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160532,7 +163744,7 @@ module.exports = Inflate; */ var Rectangle = __webpack_require__(11); -var Intersects = __webpack_require__(131); +var Intersects = __webpack_require__(135); /** * Takes two Rectangles and first checks to see if they intersect. @@ -160573,7 +163785,7 @@ module.exports = Intersection; /***/ }), -/* 1162 */ +/* 1174 */ /***/ (function(module, exports) { /** @@ -160622,7 +163834,7 @@ module.exports = MergePoints; /***/ }), -/* 1163 */ +/* 1175 */ /***/ (function(module, exports) { /** @@ -160669,7 +163881,7 @@ module.exports = MergeRect; /***/ }), -/* 1164 */ +/* 1176 */ /***/ (function(module, exports) { /** @@ -160713,7 +163925,7 @@ module.exports = MergeXY; /***/ }), -/* 1165 */ +/* 1177 */ /***/ (function(module, exports) { /** @@ -160748,7 +163960,7 @@ module.exports = Offset; /***/ }), -/* 1166 */ +/* 1178 */ /***/ (function(module, exports) { /** @@ -160782,7 +163994,7 @@ module.exports = OffsetPoint; /***/ }), -/* 1167 */ +/* 1179 */ /***/ (function(module, exports) { /** @@ -160816,7 +164028,7 @@ module.exports = Overlaps; /***/ }), -/* 1168 */ +/* 1180 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160829,18 +164041,18 @@ var Point = __webpack_require__(4); var DegToRad = __webpack_require__(35); /** - * [description] + * Returns a Point from the perimeter of a Rectangle based on the given angle. * * @function Phaser.Geom.Rectangle.PerimeterPoint * @since 3.0.0 * * @generic {Phaser.Geom.Point} O - [out,$return] * - * @param {Phaser.Geom.Rectangle} rectangle - [description] - * @param {integer} angle - [description] - * @param {Phaser.Geom.Point} [out] - [description] + * @param {Phaser.Geom.Rectangle} rectangle - The Rectangle to get the perimeter point from. + * @param {integer} angle - The angle of the point, in degrees. + * @param {Phaser.Geom.Point} [out] - The Point object to store the position in. If not given, a new Point instance is created. * - * @return {Phaser.Geom.Point} [description] + * @return {Phaser.Geom.Point} A Point object holding the coordinates of the Rectangle perimeter. */ var PerimeterPoint = function (rectangle, angle, out) { @@ -160873,7 +164085,7 @@ module.exports = PerimeterPoint; /***/ }), -/* 1169 */ +/* 1181 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -160882,8 +164094,8 @@ module.exports = PerimeterPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Between = __webpack_require__(170); -var ContainsRect = __webpack_require__(437); +var Between = __webpack_require__(172); +var ContainsRect = __webpack_require__(444); var Point = __webpack_require__(4); /** @@ -160944,7 +164156,7 @@ module.exports = RandomOutside; /***/ }), -/* 1170 */ +/* 1182 */ /***/ (function(module, exports) { /** @@ -160973,7 +164185,7 @@ module.exports = SameDimensions; /***/ }), -/* 1171 */ +/* 1183 */ /***/ (function(module, exports) { /** @@ -161012,7 +164224,7 @@ module.exports = Scale; /***/ }), -/* 1172 */ +/* 1184 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161023,36 +164235,36 @@ module.exports = Scale; var Triangle = __webpack_require__(71); -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.Area = __webpack_require__(1185); +Triangle.BuildEquilateral = __webpack_require__(1186); +Triangle.BuildFromPolygon = __webpack_require__(1187); +Triangle.BuildRight = __webpack_require__(1188); +Triangle.CenterOn = __webpack_require__(1189); +Triangle.Centroid = __webpack_require__(445); +Triangle.CircumCenter = __webpack_require__(1190); +Triangle.CircumCircle = __webpack_require__(1191); +Triangle.Clone = __webpack_require__(1192); Triangle.Contains = __webpack_require__(83); -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); +Triangle.ContainsArray = __webpack_require__(210); +Triangle.ContainsPoint = __webpack_require__(1193); +Triangle.CopyFrom = __webpack_require__(1194); +Triangle.Decompose = __webpack_require__(438); +Triangle.Equals = __webpack_require__(1195); +Triangle.GetPoint = __webpack_require__(424); +Triangle.GetPoints = __webpack_require__(425); +Triangle.InCenter = __webpack_require__(447); +Triangle.Perimeter = __webpack_require__(1196); +Triangle.Offset = __webpack_require__(446); +Triangle.Random = __webpack_require__(158); +Triangle.Rotate = __webpack_require__(1197); +Triangle.RotateAroundPoint = __webpack_require__(1198); +Triangle.RotateAroundXY = __webpack_require__(213); module.exports = Triangle; /***/ }), -/* 1173 */ +/* 1185 */ /***/ (function(module, exports) { /** @@ -161091,7 +164303,7 @@ module.exports = Area; /***/ }), -/* 1174 */ +/* 1186 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161135,7 +164347,7 @@ module.exports = BuildEquilateral; /***/ }), -/* 1175 */ +/* 1187 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161148,7 +164360,8 @@ var EarCut = __webpack_require__(66); var Triangle = __webpack_require__(71); /** - * [description] + * Takes an array of vertex coordinates, and optionally an array of hole indices, then returns an array + * of Triangle instances, where the given vertices have been decomposed into a series of triangles. * * @function Phaser.Geom.Triangle.BuildFromPolygon * @since 3.0.0 @@ -161157,11 +164370,11 @@ var Triangle = __webpack_require__(71); * * @param {array} data - A flat array of vertex coordinates like [x0,y0, x1,y1, x2,y2, ...] * @param {array} [holes=null] - An array of hole indices if any (e.g. [5, 8] for a 12-vertex input would mean one hole with vertices 5–7 and another with 8–11). - * @param {number} [scaleX=1] - [description] - * @param {number} [scaleY=1] - [description] - * @param {(array|Phaser.Geom.Triangle[])} [out] - [description] + * @param {number} [scaleX=1] - Horizontal scale factor to multiply the resulting points by. + * @param {number} [scaleY=1] - Vertical scale factor to multiply the resulting points by. + * @param {(array|Phaser.Geom.Triangle[])} [out] - An array to store the resulting Triangle instances in. If not provided, a new array is created. * - * @return {(array|Phaser.Geom.Triangle[])} [description] + * @return {(array|Phaser.Geom.Triangle[])} An array of Triangle instances, where each triangle is based on the decomposed vertices data. */ var BuildFromPolygon = function (data, holes, scaleX, scaleY, out) { @@ -161210,7 +164423,7 @@ module.exports = BuildFromPolygon; /***/ }), -/* 1176 */ +/* 1188 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161259,7 +164472,7 @@ module.exports = BuildRight; /***/ }), -/* 1177 */ +/* 1189 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161268,8 +164481,8 @@ module.exports = BuildRight; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Centroid = __webpack_require__(438); -var Offset = __webpack_require__(439); +var Centroid = __webpack_require__(445); +var Offset = __webpack_require__(446); /** * @callback CenterFunction @@ -161312,7 +164525,7 @@ module.exports = CenterOn; /***/ }), -/* 1178 */ +/* 1190 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161356,10 +164569,10 @@ function det (m00, m01, m10, m11) * * @generic {Phaser.Math.Vector2} O - [out,$return] * - * @param {Phaser.Geom.Triangle} triangle - [description] - * @param {Phaser.Math.Vector2} [out] - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the circumcenter of. + * @param {Phaser.Math.Vector2} [out] - The Vector2 object to store the position in. If not given, a new Vector2 instance is created. * - * @return {Phaser.Math.Vector2} [description] + * @return {Phaser.Math.Vector2} A Vector2 object holding the coordinates of the circumcenter of the Triangle. */ var CircumCenter = function (triangle, out) { @@ -161388,7 +164601,7 @@ module.exports = CircumCenter; /***/ }), -/* 1179 */ +/* 1191 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161471,7 +164684,7 @@ module.exports = CircumCircle; /***/ }), -/* 1180 */ +/* 1192 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161501,7 +164714,7 @@ module.exports = Clone; /***/ }), -/* 1181 */ +/* 1193 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161532,7 +164745,7 @@ module.exports = ContainsPoint; /***/ }), -/* 1182 */ +/* 1194 */ /***/ (function(module, exports) { /** @@ -161563,7 +164776,7 @@ module.exports = CopyFrom; /***/ }), -/* 1183 */ +/* 1195 */ /***/ (function(module, exports) { /** @@ -161599,7 +164812,7 @@ module.exports = Equals; /***/ }), -/* 1184 */ +/* 1196 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161610,17 +164823,16 @@ module.exports = Equals; var Length = __webpack_require__(57); -// The 2D area of a triangle. The area value is always non-negative. - /** * Gets the length of the perimeter of the given triangle. + * Calculated by adding together the length of each of the three sides. * * @function Phaser.Geom.Triangle.Perimeter * @since 3.0.0 * - * @param {Phaser.Geom.Triangle} triangle - [description] + * @param {Phaser.Geom.Triangle} triangle - The Triangle to get the length from. * - * @return {number} [description] + * @return {number} The length of the Triangle. */ var Perimeter = function (triangle) { @@ -161635,7 +164847,7 @@ module.exports = Perimeter; /***/ }), -/* 1185 */ +/* 1197 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161644,8 +164856,8 @@ module.exports = Perimeter; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(210); -var InCenter = __webpack_require__(440); +var RotateAroundXY = __webpack_require__(213); +var InCenter = __webpack_require__(447); /** * Rotates a Triangle about its incenter, which is the point at which its three angle bisectors meet. @@ -161671,7 +164883,7 @@ module.exports = Rotate; /***/ }), -/* 1186 */ +/* 1198 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161680,7 +164892,7 @@ module.exports = Rotate; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RotateAroundXY = __webpack_require__(210); +var RotateAroundXY = __webpack_require__(213); /** * Rotates a Triangle at a certain angle about a given Point or object with public `x` and `y` properties. @@ -161705,7 +164917,7 @@ module.exports = RotateAroundPoint; /***/ }), -/* 1187 */ +/* 1199 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161714,8 +164926,8 @@ module.exports = RotateAroundPoint; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(177); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(179); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Input @@ -161723,16 +164935,16 @@ var Extend = __webpack_require__(17); var Input = { - CreateInteractiveObject: __webpack_require__(441), + CreateInteractiveObject: __webpack_require__(448), 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) + Gamepad: __webpack_require__(1200), + InputManager: __webpack_require__(364), + InputPlugin: __webpack_require__(1212), + InputPluginCache: __webpack_require__(136), + Keyboard: __webpack_require__(1214), + Mouse: __webpack_require__(1231), + Pointer: __webpack_require__(367), + Touch: __webpack_require__(1232) }; @@ -161743,7 +164955,7 @@ module.exports = Input; /***/ }), -/* 1188 */ +/* 1200 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161758,18 +164970,18 @@ module.exports = Input; module.exports = { - Axis: __webpack_require__(442), - Button: __webpack_require__(443), - Events: __webpack_require__(211), - Gamepad: __webpack_require__(444), - GamepadPlugin: __webpack_require__(1195), + Axis: __webpack_require__(449), + Button: __webpack_require__(450), + Events: __webpack_require__(214), + Gamepad: __webpack_require__(451), + GamepadPlugin: __webpack_require__(1207), - Configs: __webpack_require__(1196) + Configs: __webpack_require__(1208) }; /***/ }), -/* 1189 */ +/* 1201 */ /***/ (function(module, exports) { /** @@ -161798,7 +165010,7 @@ module.exports = 'down'; /***/ }), -/* 1190 */ +/* 1202 */ /***/ (function(module, exports) { /** @@ -161827,7 +165039,7 @@ module.exports = 'up'; /***/ }), -/* 1191 */ +/* 1203 */ /***/ (function(module, exports) { /** @@ -161858,7 +165070,7 @@ module.exports = 'connected'; /***/ }), -/* 1192 */ +/* 1204 */ /***/ (function(module, exports) { /** @@ -161884,7 +165096,7 @@ module.exports = 'disconnected'; /***/ }), -/* 1193 */ +/* 1205 */ /***/ (function(module, exports) { /** @@ -161916,7 +165128,7 @@ module.exports = 'down'; /***/ }), -/* 1194 */ +/* 1206 */ /***/ (function(module, exports) { /** @@ -161948,7 +165160,7 @@ module.exports = 'up'; /***/ }), -/* 1195 */ +/* 1207 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -161958,11 +165170,11 @@ module.exports = 'up'; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(211); -var Gamepad = __webpack_require__(444); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(214); +var Gamepad = __webpack_require__(451); var GetValue = __webpack_require__(6); -var InputPluginCache = __webpack_require__(132); +var InputPluginCache = __webpack_require__(136); var InputEvents = __webpack_require__(54); /** @@ -162586,7 +165798,7 @@ module.exports = GamepadPlugin; /***/ }), -/* 1196 */ +/* 1208 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162601,15 +165813,15 @@ module.exports = GamepadPlugin; module.exports = { - DUALSHOCK_4: __webpack_require__(1197), - SNES_USB: __webpack_require__(1198), - XBOX_360: __webpack_require__(1199) + DUALSHOCK_4: __webpack_require__(1209), + SNES_USB: __webpack_require__(1210), + XBOX_360: __webpack_require__(1211) }; /***/ }), -/* 1197 */ +/* 1209 */ /***/ (function(module, exports) { /** @@ -162659,7 +165871,7 @@ module.exports = { /***/ }), -/* 1198 */ +/* 1210 */ /***/ (function(module, exports) { /** @@ -162698,7 +165910,7 @@ module.exports = { /***/ }), -/* 1199 */ +/* 1211 */ /***/ (function(module, exports) { /** @@ -162749,7 +165961,7 @@ module.exports = { /***/ }), -/* 1200 */ +/* 1212 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -162761,22 +165973,22 @@ module.exports = { var Circle = __webpack_require__(65); var CircleContains = __webpack_require__(55); var Class = __webpack_require__(0); -var CONST = __webpack_require__(177); -var CreateInteractiveObject = __webpack_require__(441); -var CreatePixelPerfectHandler = __webpack_require__(1201); +var CONST = __webpack_require__(179); +var CreateInteractiveObject = __webpack_require__(448); +var CreatePixelPerfectHandler = __webpack_require__(1213); var DistanceBetween = __webpack_require__(53); var Ellipse = __webpack_require__(95); var EllipseContains = __webpack_require__(96); var Events = __webpack_require__(54); -var EventEmitter = __webpack_require__(9); +var EventEmitter = __webpack_require__(10); var GetFastValue = __webpack_require__(2); -var GEOM_CONST = __webpack_require__(46); -var InputPluginCache = __webpack_require__(132); +var GEOM_CONST = __webpack_require__(47); +var InputPluginCache = __webpack_require__(136); var IsPlainObject = __webpack_require__(7); var PluginCache = __webpack_require__(23); var Rectangle = __webpack_require__(11); -var RectangleContains = __webpack_require__(47); -var SceneEvents = __webpack_require__(19); +var RectangleContains = __webpack_require__(48); +var SceneEvents = __webpack_require__(22); var Triangle = __webpack_require__(71); var TriangleContains = __webpack_require__(83); @@ -163613,7 +166825,7 @@ var InputPlugin = new Class({ * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area. * @param {boolean} [dropZone=false] - Is this Game Object a drop zone or not? * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ enable: function (gameObject, shape, callback, dropZone) { @@ -164733,7 +167945,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to add. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ queueForInsertion: function (child) { @@ -164754,7 +167966,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} child - The Game Object to remove. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ queueForRemoval: function (child) { @@ -164776,7 +167988,7 @@ var InputPlugin = new Class({ * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to change the draggable state on. * @param {boolean} [value=true] - Set to `true` if the Game Objects should be made draggable, `false` if they should be unset. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setDraggable: function (gameObjects, value) { @@ -164870,7 +168082,7 @@ var InputPlugin = new Class({ * @param {(Phaser.Types.Input.InputConfiguration|any)} [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 {Phaser.Types.Input.HitAreaCallback} [callback] - The 'contains' function to invoke to check if the pointer is within the hit area. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitArea: function (gameObjects, shape, callback) { @@ -164967,7 +168179,7 @@ var InputPlugin = new Class({ * @param {number} radius - The radius of the circle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Circle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaCircle: function (gameObjects, x, y, radius, callback) { @@ -164992,7 +168204,7 @@ var InputPlugin = new Class({ * @param {number} height - The height of the ellipse. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Ellipse.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaEllipse: function (gameObjects, x, y, width, height, callback) { @@ -165013,7 +168225,7 @@ var InputPlugin = new Class({ * @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjects - An array of Game Objects to set as having an ellipse hit area. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaFromTexture: function (gameObjects, callback) { @@ -165075,7 +168287,7 @@ var InputPlugin = new Class({ * @param {number} height - The height of the rectangle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Rectangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaRectangle: function (gameObjects, x, y, width, height, callback) { @@ -165102,7 +168314,7 @@ var InputPlugin = new Class({ * @param {number} y3 - The y coordinate of the third point of the triangle. * @param {Phaser.Types.Input.HitAreaCallback} [callback] - The hit area callback. If undefined it uses Triangle.Contains. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setHitAreaTriangle: function (gameObjects, x1, y1, x2, y2, x3, y3, callback) { @@ -165144,7 +168356,7 @@ var InputPlugin = new Class({ * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to create the input debug shape for. * @param {number} [color=0x00ff00] - The outline color of the debug shape. * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ enableDebug: function (gameObject, color) { @@ -165216,10 +168428,29 @@ var InputPlugin = new Class({ debug.setStrokeStyle(1 / gameObject.scale, color); debug.setDisplayOrigin(gameObject.displayOriginX, gameObject.displayOriginY); - debug.setRotation(gameObject.rotation); - debug.setScale(gameObject.scaleX, gameObject.scaleY); - debug.setPosition(gameObject.x + offsetx, gameObject.y + offsety); + + var x = gameObject.x; + var y = gameObject.y; + var rotation = gameObject.rotation; + var scaleX = gameObject.scaleX; + var scaleY = gameObject.scaleY; + + if (gameObject.parentContainer) + { + var matrix = gameObject.getWorldTransformMatrix(); + + x = matrix.tx; + y = matrix.ty; + rotation = matrix.rotation; + scaleX = matrix.scaleX; + scaleY = matrix.scaleY; + } + + debug.setRotation(rotation); + debug.setScale(scaleX, scaleY); + debug.setPosition(x + offsetx, y + offsety); debug.setScrollFactor(gameObject.scrollFactorX, gameObject.scrollFactorY); + debug.setDepth(gameObject.depth); }; updateList.add(debug); @@ -165240,7 +168471,7 @@ var InputPlugin = new Class({ * * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to remove the input debug shape from. * - * @return {Phaser.Input.InputPlugin} This Input Plugin. + * @return {this} This Input Plugin. */ removeDebug: function (gameObject) { @@ -165273,7 +168504,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#setPollAlways * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollAlways: function () { @@ -165289,7 +168520,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#setPollOnMove * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollOnMove: function () { @@ -165305,7 +168536,7 @@ var InputPlugin = new Class({ * * @param {number} value - The amount of time, in ms, that should elapsed before re-polling the pointers. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setPollRate: function (value) { @@ -165325,7 +168556,7 @@ var InputPlugin = new Class({ * * @param {boolean} 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. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setGlobalTopOnly: function (value) { @@ -165345,7 +168576,7 @@ var InputPlugin = new Class({ * * @param {boolean} value - `true` to only include the top-most Game Object, or `false` to include all Game Objects in a hit test. * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ setTopOnly: function (value) { @@ -165435,9 +168666,12 @@ var InputPlugin = new Class({ return indexB - indexA; } } + + return listB.length - listA.length; } // Technically this shouldn't happen, but ... + // eslint-disable-next-line no-unreachable return 0; }, @@ -165450,7 +168684,7 @@ var InputPlugin = new Class({ * @method Phaser.Input.InputPlugin#stopPropagation * @since 3.0.0 * - * @return {Phaser.Input.InputPlugin} This InputPlugin object. + * @return {this} This InputPlugin object. */ stopPropagation: function () { @@ -165507,7 +168741,7 @@ var InputPlugin = new Class({ * * @param {string} cursor - The CSS to be used when setting the default cursor. * - * @return {Phaser.Input.InputPlugin} This Input instance. + * @return {this} This Input instance. */ setDefaultCursor: function (cursor) { @@ -165901,7 +169135,7 @@ module.exports = InputPlugin; /***/ }), -/* 1201 */ +/* 1213 */ /***/ (function(module, exports) { /** @@ -165937,7 +169171,7 @@ module.exports = CreatePixelPerfectHandler; /***/ }), -/* 1202 */ +/* 1214 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -165952,26 +169186,26 @@ module.exports = CreatePixelPerfectHandler; module.exports = { - Events: __webpack_require__(133), + Events: __webpack_require__(137), - KeyboardManager: __webpack_require__(360), - KeyboardPlugin: __webpack_require__(1210), + KeyboardManager: __webpack_require__(365), + KeyboardPlugin: __webpack_require__(1222), - Key: __webpack_require__(445), - KeyCodes: __webpack_require__(122), + Key: __webpack_require__(452), + KeyCodes: __webpack_require__(124), - KeyCombo: __webpack_require__(446), + KeyCombo: __webpack_require__(453), - JustDown: __webpack_require__(1215), - JustUp: __webpack_require__(1216), - DownDuration: __webpack_require__(1217), - UpDuration: __webpack_require__(1218) + JustDown: __webpack_require__(1227), + JustUp: __webpack_require__(1228), + DownDuration: __webpack_require__(1229), + UpDuration: __webpack_require__(1230) }; /***/ }), -/* 1203 */ +/* 1215 */ /***/ (function(module, exports) { /** @@ -166007,7 +169241,7 @@ module.exports = 'keydown'; /***/ }), -/* 1204 */ +/* 1216 */ /***/ (function(module, exports) { /** @@ -166036,7 +169270,7 @@ module.exports = 'keyup'; /***/ }), -/* 1205 */ +/* 1217 */ /***/ (function(module, exports) { /** @@ -166070,7 +169304,7 @@ module.exports = 'keycombomatch'; /***/ }), -/* 1206 */ +/* 1218 */ /***/ (function(module, exports) { /** @@ -166104,7 +169338,7 @@ module.exports = 'down'; /***/ }), -/* 1207 */ +/* 1219 */ /***/ (function(module, exports) { /** @@ -166143,7 +169377,7 @@ module.exports = 'keydown-'; /***/ }), -/* 1208 */ +/* 1220 */ /***/ (function(module, exports) { /** @@ -166175,7 +169409,7 @@ module.exports = 'keyup-'; /***/ }), -/* 1209 */ +/* 1221 */ /***/ (function(module, exports) { /** @@ -166209,7 +169443,7 @@ module.exports = 'up'; /***/ }), -/* 1210 */ +/* 1222 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -166219,16 +169453,16 @@ module.exports = 'up'; */ var Class = __webpack_require__(0); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(133); -var GameEvents = __webpack_require__(18); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(137); +var GameEvents = __webpack_require__(20); var GetValue = __webpack_require__(6); 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 InputPluginCache = __webpack_require__(136); +var Key = __webpack_require__(452); +var KeyCodes = __webpack_require__(124); +var KeyCombo = __webpack_require__(453); +var KeyMap = __webpack_require__(1226); var SnapFloor = __webpack_require__(93); /** @@ -166463,7 +169697,7 @@ var KeyboardPlugin = new Class({ * * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to enable event capture for. * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ addCapture: function (keycode) { @@ -166505,7 +169739,7 @@ var KeyboardPlugin = new Class({ * * @param {(string|integer|integer[]|any[])} keycode - The Key Codes to disable event capture for. * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ removeCapture: function (keycode) { @@ -166534,7 +169768,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#enableGlobalCapture * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ enableGlobalCapture: function () { @@ -166550,7 +169784,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#disableGlobalCapture * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ disableGlobalCapture: function () { @@ -166567,7 +169801,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#clearCaptures * @since 3.16.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ clearCaptures: function () { @@ -166735,7 +169969,7 @@ var KeyboardPlugin = new Class({ * @param {(Phaser.Input.Keyboard.Key|string|integer)} key - Either a Key object, a string, such as `A` or `SPACE`, or a key code value. * @param {boolean} [destroy=false] - Call `Key.destroy` on the removed Key object? * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ removeKey: function (key, destroy) { @@ -166981,7 +170215,7 @@ var KeyboardPlugin = new Class({ * @method Phaser.Input.Keyboard.KeyboardPlugin#resetKeys * @since 3.15.0 * - * @return {Phaser.Input.Keyboard.KeyboardPlugin} This KeyboardPlugin object. + * @return {this} This KeyboardPlugin object. */ resetKeys: function () { @@ -167095,7 +170329,7 @@ module.exports = KeyboardPlugin; /***/ }), -/* 1211 */ +/* 1223 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167104,7 +170338,7 @@ module.exports = KeyboardPlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AdvanceKeyCombo = __webpack_require__(1212); +var AdvanceKeyCombo = __webpack_require__(1224); /** * Used internally by the KeyCombo class. @@ -167176,7 +170410,7 @@ module.exports = ProcessKeyCombo; /***/ }), -/* 1212 */ +/* 1224 */ /***/ (function(module, exports) { /** @@ -167218,7 +170452,7 @@ module.exports = AdvanceKeyCombo; /***/ }), -/* 1213 */ +/* 1225 */ /***/ (function(module, exports) { /** @@ -167253,7 +170487,7 @@ module.exports = ResetKeyCombo; /***/ }), -/* 1214 */ +/* 1226 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167262,7 +170496,7 @@ module.exports = ResetKeyCombo; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var KeyCodes = __webpack_require__(122); +var KeyCodes = __webpack_require__(124); var KeyMap = {}; @@ -167275,7 +170509,7 @@ module.exports = KeyMap; /***/ }), -/* 1215 */ +/* 1227 */ /***/ (function(module, exports) { /** @@ -167317,7 +170551,7 @@ module.exports = JustDown; /***/ }), -/* 1216 */ +/* 1228 */ /***/ (function(module, exports) { /** @@ -167359,7 +170593,7 @@ module.exports = JustUp; /***/ }), -/* 1217 */ +/* 1229 */ /***/ (function(module, exports) { /** @@ -167393,7 +170627,7 @@ module.exports = DownDuration; /***/ }), -/* 1218 */ +/* 1230 */ /***/ (function(module, exports) { /** @@ -167427,7 +170661,7 @@ module.exports = UpDuration; /***/ }), -/* 1219 */ +/* 1231 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167443,14 +170677,14 @@ module.exports = UpDuration; /* eslint-disable */ module.exports = { - MouseManager: __webpack_require__(361) + MouseManager: __webpack_require__(366) }; /* eslint-enable */ /***/ }), -/* 1220 */ +/* 1232 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167466,14 +170700,14 @@ module.exports = { /* eslint-disable */ module.exports = { - TouchManager: __webpack_require__(363) + TouchManager: __webpack_require__(368) }; /* eslint-enable */ /***/ }), -/* 1221 */ +/* 1233 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167482,8 +170716,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(20); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Loader @@ -167491,18 +170725,18 @@ var Extend = __webpack_require__(17); var Loader = { - Events: __webpack_require__(81), + Events: __webpack_require__(82), - FileTypes: __webpack_require__(1222), + FileTypes: __webpack_require__(1234), File: __webpack_require__(21), FileTypesManager: __webpack_require__(8), - GetURL: __webpack_require__(134), - LoaderPlugin: __webpack_require__(1246), - MergeXHRSettings: __webpack_require__(212), + GetURL: __webpack_require__(138), + LoaderPlugin: __webpack_require__(1258), + MergeXHRSettings: __webpack_require__(215), MultiFile: __webpack_require__(61), - XHRLoader: __webpack_require__(447), - XHRSettings: __webpack_require__(135) + XHRLoader: __webpack_require__(454), + XHRSettings: __webpack_require__(139) }; @@ -167513,7 +170747,7 @@ module.exports = Loader; /***/ }), -/* 1222 */ +/* 1234 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167528,42 +170762,42 @@ module.exports = Loader; module.exports = { - 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), + AnimationJSONFile: __webpack_require__(1235), + AtlasJSONFile: __webpack_require__(1236), + AtlasXMLFile: __webpack_require__(1237), + AudioFile: __webpack_require__(455), + AudioSpriteFile: __webpack_require__(1238), + BinaryFile: __webpack_require__(1239), + BitmapFontFile: __webpack_require__(1240), + CSSFile: __webpack_require__(1241), + GLSLFile: __webpack_require__(1242), + HTML5AudioFile: __webpack_require__(456), + HTMLFile: __webpack_require__(1243), + HTMLTextureFile: __webpack_require__(1244), ImageFile: __webpack_require__(72), JSONFile: __webpack_require__(60), - 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) + MultiAtlasFile: __webpack_require__(1245), + MultiScriptFile: __webpack_require__(1246), + PackFile: __webpack_require__(1247), + PluginFile: __webpack_require__(1248), + SceneFile: __webpack_require__(1249), + ScenePluginFile: __webpack_require__(1250), + ScriptFile: __webpack_require__(457), + SpriteSheetFile: __webpack_require__(1251), + SVGFile: __webpack_require__(1252), + TextFile: __webpack_require__(458), + TilemapCSVFile: __webpack_require__(1253), + TilemapImpactFile: __webpack_require__(1254), + TilemapJSONFile: __webpack_require__(1255), + UnityAtlasFile: __webpack_require__(1256), + VideoFile: __webpack_require__(1257), + XMLFile: __webpack_require__(216) }; /***/ }), -/* 1223 */ +/* 1235 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167575,14 +170809,14 @@ module.exports = { var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); -var LoaderEvents = __webpack_require__(81); +var LoaderEvents = __webpack_require__(82); /** * @classdesc * 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 @@ -167638,8 +170872,6 @@ var AnimationJSONFile = new Class({ onLoadComplete: function () { this.loader.systems.anims.fromJSON(this.data); - - this.pendingDestroy(); } }); @@ -167648,7 +170880,7 @@ var AnimationJSONFile = new Class({ * Adds an Animation JSON Data file, or array of Animation JSON files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -167663,17 +170895,17 @@ var AnimationJSONFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.animation({ * key: 'baddieAnims', @@ -167690,9 +170922,9 @@ var AnimationJSONFile = new Class({ * * Once the animation data has been parsed you will be able to play animations using that data. * Please see the Animation Manager `fromJSON` method for more details about the format and playback. - * + * * You can also access the raw animation data from its Cache using its key: - * + * * ```javascript * this.load.animation('baddieAnims', 'files/BaddieAnims.json'); * // and later in your game ... @@ -167711,7 +170943,7 @@ var AnimationJSONFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -167731,7 +170963,7 @@ var AnimationJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#animation - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.JSONFileConfig|Phaser.Types.Loader.FileTypes.JSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -167739,7 +170971,7 @@ var AnimationJSONFile = new Class({ * @param {string} [dataKey] - When the Animation JSON file loads only this property will be stored in the Cache and used to create animation data. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('animation', function (key, url, dataKey, xhrSettings) { @@ -167766,7 +170998,7 @@ module.exports = AnimationJSONFile; /***/ }), -/* 1224 */ +/* 1236 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -167788,9 +171020,9 @@ var MultiFile = __webpack_require__(61); * 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 @@ -167883,7 +171115,7 @@ var AtlasJSONFile = new Class({ * Adds a JSON based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -167898,7 +171130,7 @@ var AtlasJSONFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -167906,7 +171138,7 @@ var AtlasJSONFile = new Class({ * These files are created by software such as Texture Packer, Shoebox and Adobe Flash / Animate. * If you are using Texture Packer and have enabled multi-atlas support, then please use the Phaser Multi Atlas loader * instead of this one. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -167915,7 +171147,7 @@ var AtlasJSONFile = new Class({ * 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.atlas({ * key: 'mainmenu', @@ -167929,7 +171161,7 @@ var AtlasJSONFile = new Class({ * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.atlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); * // and later in your game ... @@ -167950,13 +171182,13 @@ var AtlasJSONFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.atlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.json'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.atlas({ * key: 'mainmenu', @@ -167973,7 +171205,7 @@ var AtlasJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#atlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig|Phaser.Types.Loader.FileTypes.AtlasJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -167982,7 +171214,7 @@ var AtlasJSONFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('atlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -168015,7 +171247,7 @@ module.exports = AtlasJSONFile; /***/ }), -/* 1225 */ +/* 1237 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168030,14 +171262,14 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var XMLFile = __webpack_require__(213); +var XMLFile = __webpack_require__(216); /** * @classdesc * 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 @@ -168130,7 +171362,7 @@ var AtlasXMLFile = new Class({ * Adds an XML based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -168145,13 +171377,13 @@ var AtlasXMLFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the atlas data to be provided in an XML file format. * These files are created by software such as Shoebox and Adobe Flash / Animate. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -168160,7 +171392,7 @@ var AtlasXMLFile = new Class({ * 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.atlasXML({ * key: 'mainmenu', @@ -168172,7 +171404,7 @@ var AtlasXMLFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig` for more details. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.atlasXML('mainmenu', 'images/MainMenu.png', 'images/MainMenu.xml'); * // and later in your game ... @@ -168193,13 +171425,13 @@ var AtlasXMLFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.atlasXML('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.xml'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.atlasXML({ * key: 'mainmenu', @@ -168216,7 +171448,7 @@ var AtlasXMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#atlasXML - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig|Phaser.Types.Loader.FileTypes.AtlasXMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -168225,7 +171457,7 @@ var AtlasXMLFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas xml file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('atlasXML', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -168258,7 +171490,7 @@ module.exports = AtlasXMLFile; /***/ }), -/* 1226 */ +/* 1238 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168267,7 +171499,7 @@ module.exports = AtlasXMLFile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AudioFile = __webpack_require__(448); +var AudioFile = __webpack_require__(455); var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -168280,7 +171512,7 @@ var MultiFile = __webpack_require__(61); * 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 @@ -168323,7 +171555,7 @@ var AudioSpriteFile = new Class({ if (!audioURL) { data = new JSONFile(loader, key, jsonURL, jsonXhrSettings); - + MultiFile.call(this, loader, 'audiosprite', key, [ data ]); this.config.resourceLoad = true; @@ -168407,7 +171639,7 @@ var AudioSpriteFile = new Class({ * Adds a JSON based Audio Sprite, or array of audio sprites, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -168418,13 +171650,13 @@ var AudioSpriteFile = new Class({ * ]); * } * ``` - * + * * Audio Sprites are a combination of audio files and a JSON configuration. * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite * * If the JSON file includes a 'resource' object then you can let Phaser parse it and load the audio * files automatically based on its content. To do this exclude the audio URLs from the load: - * + * * ```javascript * function preload () * { @@ -168439,7 +171671,7 @@ var AudioSpriteFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -168449,7 +171681,7 @@ var AudioSpriteFile = new Class({ * then remove it from the Audio Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.audioSprite({ * key: 'kyobi', @@ -168467,7 +171699,7 @@ var AudioSpriteFile = new Class({ * Instead of passing a URL for the audio JSON data you can also pass in a well formed JSON object instead. * * Once the audio has finished loading you can use it create an Audio Sprite by referencing its key: - * + * * ```javascript * this.load.audioSprite('kyobi', 'kyobi.json'); * // and later in your game ... @@ -168486,12 +171718,12 @@ var AudioSpriteFile = new Class({ * browser support. * * If audio has been disabled in your game, either via the game config, or lack of support from the device, then no audio will be loaded. - * + * * Note: The ability to load this type of file will only be available if the Audio Sprite File type has been built into Phaser. * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#audioSprite - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig|Phaser.Types.Loader.FileTypes.AudioSpriteFileConfig[])} key - The key to use for this file, or a file configuration object, or an array of objects. @@ -168501,7 +171733,7 @@ var AudioSpriteFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [audioXhrSettings] - An XHR Settings configuration object for the audio file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [jsonXhrSettings] - An XHR Settings configuration object for the json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader. + * @return {this} The Loader. */ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audioConfig, audioXhrSettings, jsonXhrSettings) { @@ -168548,7 +171780,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio /***/ }), -/* 1227 */ +/* 1239 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168558,7 +171790,7 @@ FileTypesManager.register('audioSprite', function (key, jsonURL, audioURL, audio */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -168569,7 +171801,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -168643,7 +171875,7 @@ var BinaryFile = new Class({ * Adds a Binary file, or array of Binary files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -168658,14 +171890,14 @@ var BinaryFile = new Class({ * 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 Binary Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Binary Cache. * 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 Binary Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.binary({ * key: 'doom', @@ -168677,7 +171909,7 @@ var BinaryFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.BinaryFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.binary('doom', 'files/Doom.wad'); * // and later in your game ... @@ -168698,7 +171930,7 @@ var BinaryFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#binary - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.BinaryFileConfig|Phaser.Types.Loader.FileTypes.BinaryFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -168706,7 +171938,7 @@ var BinaryFile = new Class({ * @param {any} [dataType] - Optional type to cast the binary file to once loaded. For example, `Uint8Array`. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('binary', function (key, url, dataType, xhrSettings) { @@ -168730,7 +171962,7 @@ module.exports = BinaryFile; /***/ }), -/* 1228 */ +/* 1240 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168745,15 +171977,15 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ParseXMLBitmapFont = __webpack_require__(185); -var XMLFile = __webpack_require__(213); +var ParseXMLBitmapFont = __webpack_require__(187); +var XMLFile = __webpack_require__(216); /** * @classdesc * 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 @@ -168861,14 +172093,14 @@ var BitmapFontFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the font data to be provided in an XML file format. * These files are created by software such as the [Angelcode Bitmap Font Generator](http://www.angelcode.com/products/bmfont/), * [Littera](http://kvazars.com/littera/) or [Glyph Designer](https://71squared.com/glyphdesigner) - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -168877,7 +172109,7 @@ var BitmapFontFile = new Class({ * 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.bitmapFont({ * key: 'goldenFont', @@ -168889,7 +172121,7 @@ var BitmapFontFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.BitmapFontFileConfig` for more details. * * Once the atlas has finished loading you can use key of it when creating a Bitmap Text Game Object: - * + * * ```javascript * this.load.bitmapFont('goldenFont', 'images/GoldFont.png', 'images/GoldFont.xml'); * // and later in your game ... @@ -168908,13 +172140,13 @@ var BitmapFontFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.bitmapFont('goldenFont', [ 'images/GoldFont.png', 'images/GoldFont-n.png' ], 'images/GoldFont.xml'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.bitmapFont({ * key: 'goldenFont', @@ -168931,7 +172163,7 @@ var BitmapFontFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#bitmapFont - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig|Phaser.Types.Loader.FileTypes.BitmapFontFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -168940,7 +172172,7 @@ var BitmapFontFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the font image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [fontDataXhrSettings] - An XHR Settings configuration object for the font data xml file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('bitmapFont', function (key, textureURL, fontDataURL, textureXhrSettings, fontDataXhrSettings) { @@ -168973,7 +172205,7 @@ module.exports = BitmapFontFile; /***/ }), -/* 1229 */ +/* 1241 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -168983,7 +172215,7 @@ module.exports = BitmapFontFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -168994,7 +172226,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -169067,7 +172299,7 @@ var CSSFile = new Class({ * Adds a CSS file, or array of CSS files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -169082,11 +172314,11 @@ var CSSFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.css({ * key: 'headers', @@ -169110,14 +172342,14 @@ var CSSFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#css - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.17.0 * * @param {(string|Phaser.Types.Loader.FileTypes.CSSFileConfig|Phaser.Types.Loader.FileTypes.CSSFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.css`, i.e. if `key` was "alien" then the URL will be "alien.css". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('css', function (key, url, xhrSettings) { @@ -169141,7 +172373,7 @@ module.exports = CSSFile; /***/ }), -/* 1230 */ +/* 1242 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169151,19 +172383,19 @@ module.exports = CSSFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var Shader = __webpack_require__(347); +var Shader = __webpack_require__(352); /** * @classdesc * 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 @@ -169305,9 +172537,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderName * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {string} The shader name. */ getShaderName: function (headerSource) @@ -169330,9 +172562,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderType * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {string} The shader type. Either 'fragment' or 'vertex'. */ getShaderType: function (headerSource) @@ -169355,9 +172587,9 @@ var GLSLFile = new Class({ * * @method Phaser.Loader.FileTypes.GLSLFile#getShaderUniforms * @since 3.17.0 - * + * * @param {string[]} headerSource - The header data. - * + * * @return {any} The shader uniforms object. */ getShaderUniforms: function (headerSource) @@ -169397,10 +172629,10 @@ var GLSLFile = new Class({ * @method Phaser.Loader.FileTypes.GLSLFile#extractBlock * @private * @since 3.17.0 - * + * * @param {string[]} data - The array of shader data to process. * @param {integer} offset - The offset to start processing from. - * + * * @return {any} The processed shader block, or null. */ extractBlock: function (data, offset) @@ -169465,7 +172697,7 @@ var GLSLFile = new Class({ * In Phaser 3 GLSL files are just plain Text files at the current moment in time. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -169480,14 +172712,14 @@ var GLSLFile = new Class({ * 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 Shader Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Shader Cache. * 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 Shader Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.glsl({ * key: 'plasma', @@ -169499,7 +172731,7 @@ var GLSLFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.GLSLFileConfig` for more details. * * Once the file has finished loading you can access it from its Cache using its key: - * + * * ```javascript * this.load.glsl('plasma', 'shaders/Plasma.glsl'); * // and later in your game ... @@ -169520,7 +172752,7 @@ var GLSLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#glsl - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.GLSLFileConfig|Phaser.Types.Loader.FileTypes.GLSLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -169528,7 +172760,7 @@ var GLSLFile = new Class({ * @param {string} [shaderType='fragment'] - 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. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('glsl', function (key, url, shaderType, xhrSettings) { @@ -169552,7 +172784,7 @@ module.exports = GLSLFile; /***/ }), -/* 1231 */ +/* 1243 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169562,7 +172794,7 @@ module.exports = GLSLFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -169696,14 +172928,14 @@ var HTMLFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#html - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.12.0 * * @param {(string|Phaser.Types.Loader.FileTypes.HTMLFileConfig|Phaser.Types.Loader.FileTypes.HTMLFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [url] - The absolute or relative URL to load this file from. If undefined or `null` it will be set to `.html`, i.e. if `key` was "alien" then the URL will be "alien.html". * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('html', function (key, url, xhrSettings) { @@ -169727,7 +172959,7 @@ module.exports = HTMLFile; /***/ }), -/* 1232 */ +/* 1244 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -169737,7 +172969,7 @@ module.exports = HTMLFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -169748,7 +172980,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -169887,7 +173119,7 @@ var HTMLTextureFile = new Class({ * will be rendered to 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 () * { @@ -169909,7 +173141,7 @@ var HTMLTextureFile = new Class({ * 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.htmlTexture({ * key: 'instructions', @@ -169922,7 +173154,7 @@ var HTMLTextureFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig` 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.htmlTexture('instructions', 'content/intro.html', 256, 512); * // and later in your game ... @@ -169952,7 +173184,7 @@ var HTMLTextureFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#htmlTexture - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.12.0 * * @param {(string|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig|Phaser.Types.Loader.FileTypes.HTMLTextureFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -169961,7 +173193,7 @@ var HTMLTextureFile = new Class({ * @param {integer} [height=512] - The height of the texture the HTML will be rendered to. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('htmlTexture', function (key, url, width, height, xhrSettings) { @@ -169985,7 +173217,7 @@ module.exports = HTMLTextureFile; /***/ }), -/* 1233 */ +/* 1245 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170007,7 +173239,7 @@ var MultiFile = __webpack_require__(61); * 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 @@ -170173,7 +173405,7 @@ var MultiAtlasFile = new Class({ if (item.image === key) { images.push(image); - + data.push(item); if (file.linkFile) @@ -170208,7 +173440,7 @@ var MultiAtlasFile = new Class({ * Adds a Multi Texture Atlas, or array of multi atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -170223,7 +173455,7 @@ var MultiAtlasFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * @@ -170233,14 +173465,14 @@ var MultiAtlasFile = new Class({ * The way it works internally is that you provide a URL to the JSON file. Phaser then loads this JSON, parses it and * extracts which texture files it also needs to load to complete the process. If the JSON also defines normal maps, * Phaser will load those as well. - * + * * 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.multiatlas({ * key: 'level1', @@ -170253,7 +173485,7 @@ var MultiAtlasFile = new Class({ * Instead of passing a URL for the atlas JSON data you can also pass in a well formed JSON object instead. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.multiatlas('level1', 'images/Level1.json'); * // and later in your game ... @@ -170276,7 +173508,7 @@ var MultiAtlasFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#multiatlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig|Phaser.Types.Loader.FileTypes.MultiAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -170285,7 +173517,7 @@ var MultiAtlasFile = new Class({ * @param {string} [baseURL] - Optional Base URL to use when loading the textures defined in the atlas data. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas json file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('multiatlas', function (key, atlasURL, path, baseURL, atlasXhrSettings) { @@ -170318,7 +173550,7 @@ module.exports = MultiAtlasFile; /***/ }), -/* 1234 */ +/* 1246 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170332,14 +173564,14 @@ var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var ScriptFile = __webpack_require__(450); +var ScriptFile = __webpack_require__(457); /** * @classdesc * 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 @@ -170419,7 +173651,7 @@ var MultiScriptFile = new Class({ file.data.type = 'text/javascript'; file.data.defer = false; file.data.text = file.xhrLoader.responseText; - + document.head.appendChild(file.data); } @@ -170431,13 +173663,13 @@ var MultiScriptFile = new Class({ /** * Adds an array of Script files to the current load queue. - * + * * The difference between this and the `ScriptFile` file type is that you give an array of scripts to this method, * and the scripts are then processed _exactly_ in that order. This allows you to load a bunch of scripts that * may have dependencies on each other without worrying about the async nature of traditional script loading. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -170451,7 +173683,7 @@ var MultiScriptFile = new Class({ * ]); * } * ``` - * + * * In the code above the script files will all be loaded in parallel but only processed (i.e. invoked) in the exact * order given in the array. * @@ -170462,11 +173694,11 @@ var MultiScriptFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.scripts({ * key: 'PostProcess', @@ -170494,7 +173726,7 @@ var MultiScriptFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#scripts - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.17.0 * * @param {(string|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig|Phaser.Types.Loader.FileTypes.MultiScriptFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -170502,7 +173734,7 @@ var MultiScriptFile = new Class({ * @param {string} [extension='js'] - The default file extension to use if no url is provided. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - Extra XHR Settings specifically for these files. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('scripts', function (key, url, xhrSettings) { @@ -170535,7 +173767,7 @@ module.exports = MultiScriptFile; /***/ }), -/* 1235 */ +/* 1247 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170545,7 +173777,7 @@ module.exports = MultiScriptFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); @@ -170554,7 +173786,7 @@ var JSONFile = __webpack_require__(60); * 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 @@ -170613,7 +173845,7 @@ var PackFile = new Class({ * Adds a JSON File Pack, or array of packs, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -170625,7 +173857,7 @@ var PackFile = new Class({ * Here is a small example: * * ```json - * { + * { * "test1": { * "files": [ * { @@ -170666,17 +173898,17 @@ var PackFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. - * + * * The key must be a unique String. It is used to add the file to the global JSON Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the JSON Cache. * 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 JSON Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.pack({ * key: 'level1', @@ -170698,7 +173930,7 @@ var PackFile = new Class({ * * You can also optionally provide a `dataKey` to use. This allows you to extract only a part of the JSON and store it in the Cache, * rather than the whole file. For example, if your JSON data had a structure like this: - * + * * ```json * { * "level1": { @@ -170718,7 +173950,7 @@ var PackFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#pack - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.PackFileConfig|Phaser.Types.Loader.FileTypes.PackFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -170726,7 +173958,7 @@ var PackFile = new Class({ * @param {string} [dataKey] - When the JSON file loads only this property will be stored in the Cache. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('pack', function (key, url, packKey, xhrSettings) { @@ -170753,7 +173985,7 @@ module.exports = PackFile; /***/ }), -/* 1236 */ +/* 1248 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170763,7 +173995,7 @@ module.exports = PackFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -170774,7 +174006,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -170888,7 +174120,7 @@ var PluginFile = new Class({ * Adds a Plugin Script file, or array of plugin files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -170903,11 +174135,11 @@ var PluginFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.plugin({ * key: 'modplayer', @@ -170932,7 +174164,7 @@ var PluginFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#plugin - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.PluginFileConfig|Phaser.Types.Loader.FileTypes.PluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -170941,7 +174173,7 @@ var PluginFile = new Class({ * @param {string} [mapping] - If this plugin is to be injected into the Scene, this is the property key used. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('plugin', function (key, url, start, mapping, xhrSettings) { @@ -170965,7 +174197,7 @@ module.exports = PluginFile; /***/ }), -/* 1237 */ +/* 1249 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -170975,7 +174207,7 @@ module.exports = PluginFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -171090,34 +174322,34 @@ var SceneFile = new Class({ * loaded. * * The key must be a unique String. It is used to add the file to the global Scene Manager upon a successful load. - * + * * For a Scene File it's vitally important that the key matches the class name in the JavaScript file. - * + * * For example here is the source file: - * + * * ```javascript * class ExternalScene extends Phaser.Scene { - * + * * constructor () * { * super('myScene'); * } - * + * * } * ``` - * + * * Because the class is called `ExternalScene` that is the exact same key you must use when loading it: - * + * * ```javascript * function preload () * { * this.load.sceneFile('ExternalScene', 'src/yourScene.js'); * } * ``` - * + * * The key that is used within the Scene Manager can either be set to the same, or you can override it in the Scene * constructor, as we've done in the example above, where the Scene key was changed to `myScene`. - * + * * The key should be unique both in terms of files being loaded and Scenes already present in the Scene 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 Scene Manager first, before loading a new one. @@ -171155,14 +174387,14 @@ var SceneFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#sceneFile - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.16.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SceneFileConfig|Phaser.Types.Loader.FileTypes.SceneFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('sceneFile', function (key, url, xhrSettings) { @@ -171186,7 +174418,7 @@ module.exports = SceneFile; /***/ }), -/* 1238 */ +/* 1250 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171196,7 +174428,7 @@ module.exports = SceneFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -171207,7 +174439,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -171315,7 +174547,7 @@ var ScenePluginFile = new Class({ * Adds a Scene Plugin Script file, or array of plugin files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -171330,11 +174562,11 @@ var ScenePluginFile = new Class({ * 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 and not already in-use by another file in the Loader. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.scenePlugin({ * key: 'modplayer', @@ -171359,7 +174591,7 @@ var ScenePluginFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#scenePlugin - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.8.0 * * @param {(string|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig|Phaser.Types.Loader.FileTypes.ScenePluginFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -171368,7 +174600,7 @@ var ScenePluginFile = new Class({ * @param {string} [sceneKey] - If this plugin is to be added to the Scene, this is the property key for it. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('scenePlugin', function (key, url, systemKey, sceneKey, xhrSettings) { @@ -171392,7 +174624,7 @@ module.exports = ScenePluginFile; /***/ }), -/* 1239 */ +/* 1251 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171551,7 +174783,7 @@ var SpriteSheetFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#spritesheet - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig|Phaser.Types.Loader.FileTypes.SpriteSheetFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -171559,7 +174791,7 @@ var SpriteSheetFile = new Class({ * @param {Phaser.Types.Loader.FileTypes.ImageFrameConfig} [frameConfig] - The frame configuration object. At a minimum it should have a `frameWidth` property. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('spritesheet', function (key, url, frameConfig, xhrSettings) { @@ -171583,7 +174815,7 @@ module.exports = SpriteSheetFile; /***/ }), -/* 1240 */ +/* 1252 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171593,7 +174825,7 @@ module.exports = SpriteSheetFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); @@ -171836,21 +175068,21 @@ var SVGFile = new Class({ * 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', @@ -171861,18 +175093,18 @@ var SVGFile = new Class({ * } * }); * ``` - * + * * 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', @@ -171882,14 +175114,14 @@ var SVGFile = new Class({ * } * }); * ``` - * + * * 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. * * @method Phaser.Loader.LoaderPlugin#svg - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.SVGFileConfig|Phaser.Types.Loader.FileTypes.SVGFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -171897,7 +175129,7 @@ var SVGFile = new Class({ * @param {Phaser.Types.Loader.FileTypes.SVGSizeConfig} [svgConfig] - The svg size configuration object. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('svg', function (key, url, svgConfig, xhrSettings) { @@ -171922,7 +175154,7 @@ module.exports = SVGFile; /***/ }), -/* 1241 */ +/* 1253 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -171932,12 +175164,12 @@ module.exports = SVGFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); -var TILEMAP_FORMATS = __webpack_require__(31); +var TILEMAP_FORMATS = __webpack_require__(32); /** * @classdesc @@ -172086,14 +175318,14 @@ var TilemapCSVFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapCSV - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig|Phaser.Types.Loader.FileTypes.TilemapCSVFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapCSV', function (key, url, xhrSettings) { @@ -172117,7 +175349,7 @@ module.exports = TilemapCSVFile; /***/ }), -/* 1242 */ +/* 1254 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172129,7 +175361,7 @@ module.exports = TilemapCSVFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); -var TILEMAP_FORMATS = __webpack_require__(31); +var TILEMAP_FORMATS = __webpack_require__(32); /** * @classdesc @@ -172242,14 +175474,14 @@ var TilemapImpactFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapImpact - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.7.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig|Phaser.Types.Loader.FileTypes.TilemapImpactFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapImpact', function (key, url, xhrSettings) { @@ -172273,7 +175505,7 @@ module.exports = TilemapImpactFile; /***/ }), -/* 1243 */ +/* 1255 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172285,7 +175517,7 @@ module.exports = TilemapImpactFile; var Class = __webpack_require__(0); var FileTypesManager = __webpack_require__(8); var JSONFile = __webpack_require__(60); -var TILEMAP_FORMATS = __webpack_require__(31); +var TILEMAP_FORMATS = __webpack_require__(32); /** * @classdesc @@ -172398,14 +175630,14 @@ var TilemapJSONFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#tilemapTiledJSON - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig|Phaser.Types.Loader.FileTypes.TilemapJSONFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. * @param {string} [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 {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('tilemapTiledJSON', function (key, url, xhrSettings) { @@ -172429,7 +175661,7 @@ module.exports = TilemapJSONFile; /***/ }), -/* 1244 */ +/* 1256 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172444,14 +175676,14 @@ var GetFastValue = __webpack_require__(2); var ImageFile = __webpack_require__(72); var IsPlainObject = __webpack_require__(7); var MultiFile = __webpack_require__(61); -var TextFile = __webpack_require__(451); +var TextFile = __webpack_require__(458); /** * @classdesc * 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 @@ -172544,7 +175776,7 @@ var UnityAtlasFile = new Class({ * Adds a Unity YAML based Texture Atlas, or array of atlases, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -172559,12 +175791,12 @@ var UnityAtlasFile = new Class({ * 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. - * + * * If you call this from outside of `preload` then you are responsible for starting the Loader afterwards and monitoring * its events to know when it's safe to use the asset. Please see the Phaser.Loader.LoaderPlugin class for more details. * * Phaser expects the atlas data to be provided in a YAML formatted text file as exported from Unity. - * + * * Phaser can load all common image types: png, jpg, gif and any other format the browser can natively handle. * * The key must be a unique String. It is used to add the file to the global Texture Manager upon a successful load. @@ -172573,7 +175805,7 @@ var UnityAtlasFile = new Class({ * 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.unityAtlas({ * key: 'mainmenu', @@ -172585,7 +175817,7 @@ var UnityAtlasFile = new Class({ * See the documentation for `Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig` for more details. * * Once the atlas has finished loading you can use frames from it as textures for a Game Object by referencing its key: - * + * * ```javascript * this.load.unityAtlas('mainmenu', 'images/MainMenu.png', 'images/MainMenu.json'); * // and later in your game ... @@ -172606,13 +175838,13 @@ var UnityAtlasFile = new Class({ * * Phaser also supports the automatic loading of associated normal maps. If you have a normal map to go with this image, * then you can specify it by providing an array as the `url` where the second element is the normal map: - * + * * ```javascript * this.load.unityAtlas('mainmenu', [ 'images/MainMenu.png', 'images/MainMenu-n.png' ], 'images/MainMenu.txt'); * ``` * * Or, if you are using a config object use the `normalMap` property: - * + * * ```javascript * this.load.unityAtlas({ * key: 'mainmenu', @@ -172629,7 +175861,7 @@ var UnityAtlasFile = new Class({ * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#unityAtlas - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.0.0 * * @param {(string|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig|Phaser.Types.Loader.FileTypes.UnityAtlasFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -172638,7 +175870,7 @@ var UnityAtlasFile = new Class({ * @param {Phaser.Types.Loader.XHRSettingsObject} [textureXhrSettings] - An XHR Settings configuration object for the atlas image file. Used in replacement of the Loaders default XHR Settings. * @param {Phaser.Types.Loader.XHRSettingsObject} [atlasXhrSettings] - An XHR Settings configuration object for the atlas data file. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('unityAtlas', function (key, textureURL, atlasURL, textureXhrSettings, atlasXhrSettings) { @@ -172671,7 +175903,7 @@ module.exports = UnityAtlasFile; /***/ }), -/* 1245 */ +/* 1257 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -172681,10 +175913,10 @@ module.exports = UnityAtlasFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(29); +var CONST = __webpack_require__(17); var File = __webpack_require__(21); var FileTypesManager = __webpack_require__(8); -var GetURL = __webpack_require__(134); +var GetURL = __webpack_require__(138); var GetFastValue = __webpack_require__(2); var IsPlainObject = __webpack_require__(7); @@ -172693,7 +175925,7 @@ var IsPlainObject = __webpack_require__(7); * 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 @@ -172798,13 +176030,13 @@ var VideoFile = new Class({ * @method Phaser.Loader.FileTypes.VideoFile#createVideoElement * @private * @since 3.20.0 - * + * * @return {HTMLVideoElement} The newly created Video element. */ createVideoElement: function () { var video = document.createElement('video'); - + video.controls = false; video.crossOrigin = this.loader.crossOrigin; @@ -172937,7 +176169,10 @@ VideoFile.getVideoURL = function (game, urls) if (url.indexOf('blob:') === 0) { - return url; + return { + url: url, + type: '' + }; } var videoType; @@ -172969,7 +176204,7 @@ VideoFile.getVideoURL = function (game, urls) * Adds a Video file, or array of video files, to the current load queue. * * You can call this method from within your Scene's `preload`, along with any other files you wish to load: - * + * * ```javascript * function preload () * { @@ -172984,14 +176219,14 @@ VideoFile.getVideoURL = function (game, urls) * 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 Video Cache upon a successful load. * The key should be unique both in terms of files being loaded and files already present in the Video Cache. * 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 Video Cache first, before loading a new one. * * Instead of passing arguments you can pass a configuration object, such as: - * + * * ```javascript * this.load.video({ * key: 'intro', @@ -173008,7 +176243,7 @@ VideoFile.getVideoURL = function (game, urls) * Due to different browsers supporting different video file types you should usually provide your video files in a variety of formats. * mp4, mov and webm are the most common. If you provide an array of URLs then the Loader will determine which _one_ file to load based on * browser support, starting with the first in the array and progressing to the end. - * + * * Unlike most asset-types, videos do not _need_ to be preloaded. You can create a Video Game Object and then call its `loadURL` method, * to load a video at run-time, rather than in advance. * @@ -173016,7 +176251,7 @@ VideoFile.getVideoURL = function (game, urls) * It is available in the default build but can be excluded from custom builds. * * @method Phaser.Loader.LoaderPlugin#video - * @fires Phaser.Loader.LoaderPlugin#addFileEvent + * @fires Phaser.Loader.LoaderPlugin#ADD * @since 3.20.0 * * @param {(string|Phaser.Types.Loader.FileTypes.VideoFileConfig|Phaser.Types.Loader.FileTypes.VideoFileConfig[])} key - The key to use for this file, or a file configuration object, or array of them. @@ -173026,7 +176261,7 @@ VideoFile.getVideoURL = function (game, urls) * @param {boolean} [noAudio=false] - Does the video have an audio track? If not you can enable auto-playing on it. * @param {Phaser.Types.Loader.XHRSettingsObject} [xhrSettings] - An XHR Settings configuration object. Used in replacement of the Loaders default XHR Settings. * - * @return {Phaser.Loader.LoaderPlugin} The Loader instance. + * @return {this} The Loader instance. */ FileTypesManager.register('video', function (key, urls, loadEvent, asBlob, noAudio, xhrSettings) { @@ -173062,7 +176297,7 @@ module.exports = VideoFile; /***/ }), -/* 1246 */ +/* 1258 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -173072,15 +176307,15 @@ module.exports = VideoFile; */ var Class = __webpack_require__(0); -var CONST = __webpack_require__(20); -var CustomSet = __webpack_require__(108); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(81); +var CONST = __webpack_require__(17); +var CustomSet = __webpack_require__(133); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(82); var FileTypesManager = __webpack_require__(8); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var XHRSettings = __webpack_require__(135); +var SceneEvents = __webpack_require__(22); +var XHRSettings = __webpack_require__(139); /** * @classdesc @@ -173218,9 +176453,9 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#baseURL @@ -173261,7 +176496,8 @@ var LoaderPlugin = new Class({ GetFastValue(sceneConfig, 'async', gameConfig.loaderAsync), GetFastValue(sceneConfig, 'user', gameConfig.loaderUser), GetFastValue(sceneConfig, 'password', gameConfig.loaderPassword), - GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout) + GetFastValue(sceneConfig, 'timeout', gameConfig.loaderTimeout), + GetFastValue(sceneConfig, 'withCredentials', gameConfig.loaderWithCredentials) ); /** @@ -173298,7 +176534,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -173312,9 +176548,9 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#inflight @@ -173325,10 +176561,10 @@ var LoaderPlugin = new Class({ /** * 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. * * @name Phaser.Loader.LoaderPlugin#queue @@ -173423,9 +176659,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -173434,7 +176670,7 @@ var LoaderPlugin = new Class({ * * @param {string} [url] - The URL to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setBaseURL: function (url) { @@ -173465,7 +176701,7 @@ var LoaderPlugin = new Class({ * 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. * @@ -173474,7 +176710,7 @@ var LoaderPlugin = new Class({ * * @param {string} [path] - The path to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setPath: function (path) { @@ -173492,9 +176728,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -173503,7 +176739,7 @@ var LoaderPlugin = new Class({ * * @param {string} [prefix] - The prefix to use. Leave empty to reset. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setPrefix: function (prefix) { @@ -173516,9 +176752,9 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -173529,7 +176765,7 @@ var LoaderPlugin = new Class({ * * @param {string} [crossOrigin] - The value to use for the `crossOrigin` property in the load request. * - * @return {Phaser.Loader.LoaderPlugin} This Loader object. + * @return {this} This Loader object. */ setCORS: function (crossOrigin) { @@ -173652,7 +176888,7 @@ var LoaderPlugin = new Class({ * @method Phaser.Loader.LoaderPlugin#addPack * @since 3.7.0 * - * @param {any} data - The Pack File data to be parsed and each entry of it to added to the load queue. + * @param {any} pack - The Pack File data to be parsed and each entry of it to added to the load queue. * @param {string} [packKey] - An optional key to use from the pack file data. * * @return {boolean} `true` if any files were added to the queue, otherwise `false`. @@ -173675,6 +176911,11 @@ var LoaderPlugin = new Class({ // Here we go ... for (var key in pack) { + if (!Object.prototype.hasOwnProperty.call(pack, key)) + { + continue; + } + var config = pack[key]; // Any meta data to process? @@ -173819,10 +177060,10 @@ var LoaderPlugin = new Class({ /** * An internal method called by the Loader. - * + * * It will check to see if there are any more files in the pending list that need loading, and if so it will move * them from the list Set into the inflight Set, set their CORs flag and start them loading. - * + * * It will carrying on doing this for each file in the pending list until it runs out, or hits the max allowed parallel downloads. * * @method Phaser.Loader.LoaderPlugin#checkLoadQueue @@ -173859,7 +177100,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -173999,7 +177240,7 @@ var LoaderPlugin = new Class({ * * @method Phaser.Loader.LoaderPlugin#flagForRemoval * @since 3.7.0 - * + * * @param {Phaser.Loader.File} file - The File to be queued for deletion when the Loader completes. */ flagForRemoval: function (file) @@ -174018,7 +177259,7 @@ var LoaderPlugin = new Class({ * @param {*} data - The JSON data, ready parsed. * @param {string} [filename=file.json] - The name to save the JSON file as. * - * @return {Phaser.Loader.LoaderPlugin} This Loader plugin. + * @return {this} This Loader plugin. */ saveJSON: function (data, filename) { @@ -174027,7 +177268,7 @@ var LoaderPlugin = new Class({ /** * 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. * @@ -174038,7 +177279,7 @@ var LoaderPlugin = new Class({ * @param {string} [filename=file.json] - The filename to save the file as. * @param {string} [filetype=application/json] - The file type to use when saving the file. Defaults to JSON. * - * @return {Phaser.Loader.LoaderPlugin} This Loader plugin. + * @return {this} This Loader plugin. */ save: function (data, filename, filetype) { @@ -174139,7 +177380,7 @@ module.exports = LoaderPlugin; /***/ }), -/* 1247 */ +/* 1259 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174149,13 +177390,19 @@ module.exports = LoaderPlugin; */ var CONST = __webpack_require__(50); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @callback ArcadePhysicsCallback * - * @param {Phaser.GameObjects.GameObject} object1 - The first Body to separate. - * @param {Phaser.GameObjects.GameObject} object2 - The second Body to separate. + * A callback receiving two Game Objects. + * + * When colliding a single sprite with a Group or TilemapLayer, `object1` is always the sprite. + * + * For all other cases, `object1` and `object2` match the same arguments in `collide()` or `overlap()`. + * + * @param {Phaser.GameObjects.GameObject} object1 - The first Game Object. + * @param {Phaser.GameObjects.GameObject} object2 - The second Game Object. */ /** @@ -174164,18 +177411,18 @@ var Extend = __webpack_require__(17); var Arcade = { - 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) + ArcadePhysics: __webpack_require__(1260), + Body: __webpack_require__(465), + Collider: __webpack_require__(466), + Components: __webpack_require__(217), + Events: __webpack_require__(218), + Factory: __webpack_require__(459), + Group: __webpack_require__(461), + Image: __webpack_require__(460), + Sprite: __webpack_require__(140), + StaticBody: __webpack_require__(471), + StaticGroup: __webpack_require__(462), + World: __webpack_require__(464) }; @@ -174186,7 +177433,7 @@ module.exports = Arcade; /***/ }), -/* 1248 */ +/* 1260 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -174198,16 +177445,16 @@ module.exports = Arcade; var Class = __webpack_require__(0); var DegToRad = __webpack_require__(35); var DistanceBetween = __webpack_require__(53); -var DistanceSquared = __webpack_require__(316); -var Factory = __webpack_require__(452); +var DistanceSquared = __webpack_require__(320); +var Factory = __webpack_require__(459); var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(107); -var OverlapCirc = __webpack_require__(1261); -var OverlapRect = __webpack_require__(456); +var Merge = __webpack_require__(126); +var OverlapCirc = __webpack_require__(1273); +var OverlapRect = __webpack_require__(463); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); var Vector2 = __webpack_require__(3); -var World = __webpack_require__(457); +var World = __webpack_require__(464); /** * @classdesc @@ -174875,7 +178122,7 @@ module.exports = ArcadePhysics; /***/ }), -/* 1249 */ +/* 1261 */ /***/ (function(module, exports) { /** @@ -174950,7 +178197,7 @@ module.exports = Acceleration; /***/ }), -/* 1250 */ +/* 1262 */ /***/ (function(module, exports) { /** @@ -175032,7 +178279,7 @@ module.exports = Angular; /***/ }), -/* 1251 */ +/* 1263 */ /***/ (function(module, exports) { /** @@ -175131,7 +178378,7 @@ module.exports = Bounce; /***/ }), -/* 1252 */ +/* 1264 */ /***/ (function(module, exports) { /** @@ -175258,7 +178505,7 @@ module.exports = Debug; /***/ }), -/* 1253 */ +/* 1265 */ /***/ (function(module, exports) { /** @@ -175391,7 +178638,7 @@ module.exports = Drag; /***/ }), -/* 1254 */ +/* 1266 */ /***/ (function(module, exports) { /** @@ -175515,7 +178762,7 @@ module.exports = Enable; /***/ }), -/* 1255 */ +/* 1267 */ /***/ (function(module, exports) { /** @@ -175525,24 +178772,30 @@ module.exports = Enable; */ /** - * 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. + * Methods for setting the friction of an Arcade Physics Body. + * + * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body. * * @namespace Phaser.Physics.Arcade.Components.Friction * @since 3.0.0 + * + * @see Phaser.Physics.Arcade.Body#friction */ var 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. + * Sets the friction of this game object's physics body. + * In Arcade Physics, friction is a special case of motion transfer from an "immovable" body to a riding body. * * @method Phaser.Physics.Arcade.Components.Friction#setFriction * @since 3.0.0 * - * @param {number} x - The amount of horizontal friction to apply. - * @param {number} [y=x] - The amount of vertical friction to apply. + * @param {number} x - The amount of horizontal friction to apply, [0, 1]. + * @param {number} [y=x] - The amount of vertical friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFriction: function (x, y) { @@ -175552,15 +178805,17 @@ var Friction = { }, /** - * 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. + * Sets the horizontal friction of this game object's physics body. + * This can move a riding body horizontally when it collides with this one on the vertical axis. * * @method Phaser.Physics.Arcade.Components.Friction#setFrictionX * @since 3.0.0 * - * @param {number} x - The amount of friction to apply. + * @param {number} x - The amount of friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFrictionX: function (x) { @@ -175570,15 +178825,17 @@ var Friction = { }, /** - * 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. + * Sets the vertical friction of this game object's physics body. + * This can move a riding body vertically when it collides with this one on the horizontal axis. * * @method Phaser.Physics.Arcade.Components.Friction#setFrictionY * @since 3.0.0 * - * @param {number} x - The amount of friction to apply. + * @param {number} y - The amount of friction to apply, [0, 1]. * * @return {this} This Game Object. + * + * @see Phaser.Physics.Arcade.Body#friction */ setFrictionY: function (y) { @@ -175593,7 +178850,7 @@ module.exports = Friction; /***/ }), -/* 1256 */ +/* 1268 */ /***/ (function(module, exports) { /** @@ -175671,7 +178928,7 @@ module.exports = Gravity; /***/ }), -/* 1257 */ +/* 1269 */ /***/ (function(module, exports) { /** @@ -175713,7 +178970,7 @@ module.exports = Immovable; /***/ }), -/* 1258 */ +/* 1270 */ /***/ (function(module, exports) { /** @@ -175753,7 +179010,7 @@ module.exports = Mass; /***/ }), -/* 1259 */ +/* 1271 */ /***/ (function(module, exports) { /** @@ -175835,7 +179092,7 @@ module.exports = Size; /***/ }), -/* 1260 */ +/* 1272 */ /***/ (function(module, exports) { /** @@ -175934,13 +179191,13 @@ module.exports = Velocity; /***/ }), -/* 1261 */ +/* 1273 */ /***/ (function(module, exports, __webpack_require__) { -var OverlapRect = __webpack_require__(456); +var OverlapRect = __webpack_require__(463); var Circle = __webpack_require__(65); -var CircleToCircle = __webpack_require__(202); -var CircleToRectangle = __webpack_require__(203); +var CircleToCircle = __webpack_require__(205); +var CircleToRectangle = __webpack_require__(206); /** * This method will search the given circular area and return an array of all physics bodies that @@ -176002,7 +179259,7 @@ module.exports = OverlapCirc; /***/ }), -/* 1262 */ +/* 1274 */ /***/ (function(module, exports) { /** @@ -176035,7 +179292,7 @@ module.exports = 'collide'; /***/ }), -/* 1263 */ +/* 1275 */ /***/ (function(module, exports) { /** @@ -176068,7 +179325,7 @@ module.exports = 'overlap'; /***/ }), -/* 1264 */ +/* 1276 */ /***/ (function(module, exports) { /** @@ -176091,7 +179348,7 @@ module.exports = 'pause'; /***/ }), -/* 1265 */ +/* 1277 */ /***/ (function(module, exports) { /** @@ -176114,7 +179371,7 @@ module.exports = 'resume'; /***/ }), -/* 1266 */ +/* 1278 */ /***/ (function(module, exports) { /** @@ -176146,7 +179403,7 @@ module.exports = 'tilecollide'; /***/ }), -/* 1267 */ +/* 1279 */ /***/ (function(module, exports) { /** @@ -176178,7 +179435,7 @@ module.exports = 'tileoverlap'; /***/ }), -/* 1268 */ +/* 1280 */ /***/ (function(module, exports) { /** @@ -176210,7 +179467,7 @@ module.exports = 'worldbounds'; /***/ }), -/* 1269 */ +/* 1281 */ /***/ (function(module, exports) { /** @@ -176236,7 +179493,7 @@ module.exports = 'worldstep'; /***/ }), -/* 1270 */ +/* 1282 */ /***/ (function(module, exports) { /** @@ -176277,7 +179534,7 @@ module.exports = ProcessTileCallbacks; /***/ }), -/* 1271 */ +/* 1283 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176286,9 +179543,9 @@ module.exports = ProcessTileCallbacks; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileCheckX = __webpack_require__(1272); -var TileCheckY = __webpack_require__(1274); -var TileIntersectsBody = __webpack_require__(463); +var TileCheckX = __webpack_require__(1284); +var TileCheckY = __webpack_require__(1286); +var TileIntersectsBody = __webpack_require__(470); /** * The core separation function to separate a physics body and a tile. @@ -176397,7 +179654,7 @@ module.exports = SeparateTile; /***/ }), -/* 1272 */ +/* 1284 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176406,7 +179663,7 @@ module.exports = SeparateTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationX = __webpack_require__(1273); +var ProcessTileSeparationX = __webpack_require__(1285); /** * Check the body against the given tile on the X axis. @@ -176487,7 +179744,7 @@ module.exports = TileCheckX; /***/ }), -/* 1273 */ +/* 1285 */ /***/ (function(module, exports) { /** @@ -176534,7 +179791,7 @@ module.exports = ProcessTileSeparationX; /***/ }), -/* 1274 */ +/* 1286 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176543,7 +179800,7 @@ module.exports = ProcessTileSeparationX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ProcessTileSeparationY = __webpack_require__(1275); +var ProcessTileSeparationY = __webpack_require__(1287); /** * Check the body against the given tile on the Y axis. @@ -176624,7 +179881,7 @@ module.exports = TileCheckY; /***/ }), -/* 1275 */ +/* 1287 */ /***/ (function(module, exports) { /** @@ -176671,7 +179928,7 @@ module.exports = ProcessTileSeparationY; /***/ }), -/* 1276 */ +/* 1288 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176680,7 +179937,7 @@ module.exports = ProcessTileSeparationY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapX = __webpack_require__(460); +var GetOverlapX = __webpack_require__(467); /** * Separates two overlapping bodies on the X-axis (horizontally). @@ -176762,7 +180019,7 @@ module.exports = SeparateX; /***/ }), -/* 1277 */ +/* 1289 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176771,7 +180028,7 @@ module.exports = SeparateX; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetOverlapY = __webpack_require__(461); +var GetOverlapY = __webpack_require__(468); /** * Separates two overlapping bodies on the Y-axis (vertically). @@ -176853,62 +180110,7 @@ module.exports = SeparateY; /***/ }), -/* 1278 */ -/***/ (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.Impact.Events - */ - -module.exports = { - - COLLIDE: __webpack_require__(1392), - PAUSE: __webpack_require__(1393), - RESUME: __webpack_require__(1394) - -}; - - -/***/ }), -/* 1279 */ -/***/ (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.Impact.Components - */ - -module.exports = { - - 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) - -}; - - -/***/ }), -/* 1280 */ +/* 1290 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -176924,9 +180126,9 @@ var Composites = {}; module.exports = Composites; -var Composite = __webpack_require__(145); -var Constraint = __webpack_require__(216); -var Common = __webpack_require__(37); +var Composite = __webpack_require__(148); +var Constraint = __webpack_require__(219); +var Common = __webpack_require__(38); var Body = __webpack_require__(62); var Bodies = __webpack_require__(109); @@ -177241,7 +180443,7 @@ var Bodies = __webpack_require__(109); /***/ }), -/* 1281 */ +/* 1291 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177258,8 +180460,8 @@ var Svg = {}; module.exports = Svg; -var Bounds = __webpack_require__(102); -var Common = __webpack_require__(37); +var Bounds = __webpack_require__(100); +var Common = __webpack_require__(38); (function() { @@ -177472,7 +180674,7 @@ var Common = __webpack_require__(37); })(); /***/ }), -/* 1282 */ +/* 1292 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177485,7 +180687,7 @@ var Common = __webpack_require__(37); var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); -var Common = __webpack_require__(37); +var Common = __webpack_require__(38); var GetFastValue = __webpack_require__(2); var Vertices = __webpack_require__(86); @@ -177614,7 +180816,7 @@ module.exports = PhysicsEditorParser; /***/ }), -/* 1283 */ +/* 1293 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177731,7 +180933,7 @@ module.exports = PhysicsJSONParser; /***/ }), -/* 1284 */ +/* 1294 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177746,28 +180948,28 @@ module.exports = PhysicsJSONParser; module.exports = { - 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) + AFTER_ADD: __webpack_require__(1404), + AFTER_REMOVE: __webpack_require__(1405), + AFTER_UPDATE: __webpack_require__(1406), + BEFORE_ADD: __webpack_require__(1407), + BEFORE_REMOVE: __webpack_require__(1408), + BEFORE_UPDATE: __webpack_require__(1409), + COLLISION_ACTIVE: __webpack_require__(1410), + COLLISION_END: __webpack_require__(1411), + COLLISION_START: __webpack_require__(1412), + DRAG_END: __webpack_require__(1413), + DRAG: __webpack_require__(1414), + DRAG_START: __webpack_require__(1415), + PAUSE: __webpack_require__(1416), + RESUME: __webpack_require__(1417), + SLEEP_END: __webpack_require__(1418), + SLEEP_START: __webpack_require__(1419) }; /***/ }), -/* 1285 */ +/* 1295 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -177779,9 +180981,10 @@ module.exports = { var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); var Class = __webpack_require__(0); -var Components = __webpack_require__(508); +var Components = __webpack_require__(513); +var EventEmitter = __webpack_require__(10); var GetFastValue = __webpack_require__(2); -var HasValue = __webpack_require__(99); +var HasValue = __webpack_require__(108); var Vertices = __webpack_require__(86); /** @@ -177799,6 +181002,7 @@ var Vertices = __webpack_require__(86); * * @class TileBody * @memberof Phaser.Physics.Matter + * @extends Phaser.Events.EventEmitter * @constructor * @since 3.0.0 * @@ -177817,6 +181021,8 @@ var Vertices = __webpack_require__(86); */ var MatterTileBody = new Class({ + Extends: EventEmitter, + Mixins: [ Components.Bounce, Components.Collision, @@ -177832,6 +181038,8 @@ var MatterTileBody = new Class({ function MatterTileBody (world, tile, options) { + EventEmitter.call(this); + /** * The tile object the body is associated with. * @@ -178072,6 +181280,7 @@ var MatterTileBody = new Class({ { this.removeBody(); this.tile.physics.matterBody = undefined; + this.removeAllListeners(); } }); @@ -178080,7 +181289,7 @@ module.exports = MatterTileBody; /***/ }), -/* 1286 */ +/* 1296 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178093,35 +181302,35 @@ module.exports = MatterTileBody; * @namespace Phaser.Physics.Matter.Matter */ -var Matter = __webpack_require__(1383); +var Matter = __webpack_require__(1386); Matter.Body = __webpack_require__(62); -Matter.Composite = __webpack_require__(145); -Matter.World = __webpack_require__(1288); +Matter.Composite = __webpack_require__(148); +Matter.World = __webpack_require__(1298); -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.Detector = __webpack_require__(514); +Matter.Grid = __webpack_require__(1299); +Matter.Pairs = __webpack_require__(1300); +Matter.Pair = __webpack_require__(472); +Matter.Query = __webpack_require__(1387); +Matter.Resolver = __webpack_require__(1301); +Matter.SAT = __webpack_require__(515); -Matter.Constraint = __webpack_require__(216); +Matter.Constraint = __webpack_require__(219); -Matter.Common = __webpack_require__(37); -Matter.Engine = __webpack_require__(1385); -Matter.Events = __webpack_require__(237); -Matter.Sleeping = __webpack_require__(236); -Matter.Plugin = __webpack_require__(1287); +Matter.Common = __webpack_require__(38); +Matter.Engine = __webpack_require__(1388); +Matter.Events = __webpack_require__(240); +Matter.Sleeping = __webpack_require__(239); +Matter.Plugin = __webpack_require__(1297); Matter.Bodies = __webpack_require__(109); -Matter.Composites = __webpack_require__(1280); +Matter.Composites = __webpack_require__(1290); -Matter.Axes = __webpack_require__(507); -Matter.Bounds = __webpack_require__(102); -Matter.Svg = __webpack_require__(1281); -Matter.Vector = __webpack_require__(101); +Matter.Axes = __webpack_require__(512); +Matter.Bounds = __webpack_require__(100); +Matter.Svg = __webpack_require__(1291); +Matter.Vector = __webpack_require__(99); Matter.Vertices = __webpack_require__(86); // aliases @@ -178137,7 +181346,7 @@ module.exports = Matter; /***/ }), -/* 1287 */ +/* 1297 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178150,7 +181359,7 @@ var Plugin = {}; module.exports = Plugin; -var Common = __webpack_require__(37); +var Common = __webpack_require__(38); (function() { @@ -178487,7 +181696,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 1288 */ +/* 1298 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178507,9 +181716,9 @@ var World = {}; module.exports = World; -var Composite = __webpack_require__(145); -var Constraint = __webpack_require__(216); -var Common = __webpack_require__(37); +var Composite = __webpack_require__(148); +var Constraint = __webpack_require__(219); +var Common = __webpack_require__(38); (function() { @@ -178640,7 +181849,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 1289 */ +/* 1299 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178653,9 +181862,9 @@ var Grid = {}; module.exports = Grid; -var Pair = __webpack_require__(467); -var Detector = __webpack_require__(509); -var Common = __webpack_require__(37); +var Pair = __webpack_require__(472); +var Detector = __webpack_require__(514); +var Common = __webpack_require__(38); (function() { @@ -178967,7 +182176,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 1290 */ +/* 1300 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -178980,8 +182189,8 @@ var Pairs = {}; module.exports = Pairs; -var Pair = __webpack_require__(467); -var Common = __webpack_require__(37); +var Pair = __webpack_require__(472); +var Common = __webpack_require__(38); (function() { @@ -179132,7 +182341,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 1291 */ +/* 1301 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179146,9 +182355,9 @@ 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); +var Vector = __webpack_require__(99); +var Common = __webpack_require__(38); +var Bounds = __webpack_require__(100); (function() { @@ -179488,7 +182697,7 @@ var Bounds = __webpack_require__(102); /***/ }), -/* 1292 */ +/* 1302 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179503,17 +182712,17 @@ var Bounds = __webpack_require__(102); module.exports = { - BasePlugin: __webpack_require__(468), - DefaultPlugins: __webpack_require__(173), + BasePlugin: __webpack_require__(473), + DefaultPlugins: __webpack_require__(175), PluginCache: __webpack_require__(23), - PluginManager: __webpack_require__(364), - ScenePlugin: __webpack_require__(1293) + PluginManager: __webpack_require__(369), + ScenePlugin: __webpack_require__(1303) }; /***/ }), -/* 1293 */ +/* 1303 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179522,9 +182731,9 @@ module.exports = { * @license {@link https://github.com/photonstorm/phaser3-plugin-template/blob/master/LICENSE|MIT License} */ -var BasePlugin = __webpack_require__(468); +var BasePlugin = __webpack_require__(473); var Class = __webpack_require__(0); -var SceneEvents = __webpack_require__(19); +var SceneEvents = __webpack_require__(22); /** * @classdesc @@ -179641,7 +182850,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1294 */ +/* 1304 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179650,8 +182859,8 @@ module.exports = ScenePlugin; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); -var CONST = __webpack_require__(175); +var Extend = __webpack_require__(18); +var CONST = __webpack_require__(177); /** * @namespace Phaser.Scale @@ -179679,12 +182888,12 @@ var CONST = __webpack_require__(175); var Scale = { - Center: __webpack_require__(353), + Center: __webpack_require__(358), Events: __webpack_require__(92), - Orientation: __webpack_require__(354), - ScaleManager: __webpack_require__(365), - ScaleModes: __webpack_require__(355), - Zoom: __webpack_require__(356) + Orientation: __webpack_require__(359), + ScaleManager: __webpack_require__(370), + ScaleModes: __webpack_require__(360), + Zoom: __webpack_require__(361) }; @@ -179697,7 +182906,7 @@ module.exports = Scale; /***/ }), -/* 1295 */ +/* 1305 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179706,8 +182915,8 @@ module.exports = Scale; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var CONST = __webpack_require__(123); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(125); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Scenes @@ -179715,11 +182924,11 @@ var Extend = __webpack_require__(17); var Scene = { - Events: __webpack_require__(19), - SceneManager: __webpack_require__(367), - ScenePlugin: __webpack_require__(1296), - Settings: __webpack_require__(369), - Systems: __webpack_require__(178) + Events: __webpack_require__(22), + SceneManager: __webpack_require__(372), + ScenePlugin: __webpack_require__(1306), + Settings: __webpack_require__(374), + Systems: __webpack_require__(180) }; @@ -179730,7 +182939,7 @@ module.exports = Scene; /***/ }), -/* 1296 */ +/* 1306 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -179739,9 +182948,9 @@ module.exports = Scene; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); var Class = __webpack_require__(0); -var Events = __webpack_require__(19); +var Events = __webpack_require__(22); var GetFastValue = __webpack_require__(2); var PluginCache = __webpack_require__(23); @@ -180054,7 +183263,7 @@ var ScenePlugin = new Class({ if (target.sys.isSleeping()) { - target.sys.wake(); + target.sys.wake(GetFastValue(config, 'data')); } else { @@ -180740,7 +183949,7 @@ module.exports = ScenePlugin; /***/ }), -/* 1297 */ +/* 1307 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180755,18 +183964,18 @@ module.exports = ScenePlugin; module.exports = { - List: __webpack_require__(126), - Map: __webpack_require__(159), - ProcessQueue: __webpack_require__(184), - RTree: __webpack_require__(462), - Set: __webpack_require__(108), - Size: __webpack_require__(366) + List: __webpack_require__(129), + Map: __webpack_require__(162), + ProcessQueue: __webpack_require__(186), + RTree: __webpack_require__(469), + Set: __webpack_require__(133), + Size: __webpack_require__(371) }; /***/ }), -/* 1298 */ +/* 1308 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180775,8 +183984,8 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Extend = __webpack_require__(17); -var FilterMode = __webpack_require__(1299); +var Extend = __webpack_require__(18); +var FilterMode = __webpack_require__(1309); /** * @namespace Phaser.Textures @@ -180802,14 +184011,14 @@ var FilterMode = __webpack_require__(1299); var Textures = { - CanvasTexture: __webpack_require__(371), - Events: __webpack_require__(119), + CanvasTexture: __webpack_require__(376), + Events: __webpack_require__(121), FilterMode: FilterMode, Frame: __webpack_require__(94), - Parsers: __webpack_require__(373), - Texture: __webpack_require__(180), - TextureManager: __webpack_require__(370), - TextureSource: __webpack_require__(372) + Parsers: __webpack_require__(378), + Texture: __webpack_require__(182), + TextureManager: __webpack_require__(375), + TextureSource: __webpack_require__(377) }; @@ -180819,7 +184028,7 @@ module.exports = Textures; /***/ }), -/* 1299 */ +/* 1309 */ /***/ (function(module, exports) { /** @@ -180863,7 +184072,7 @@ module.exports = CONST; /***/ }), -/* 1300 */ +/* 1310 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180878,30 +184087,30 @@ module.exports = CONST; module.exports = { - Components: __webpack_require__(137), - Parsers: __webpack_require__(1330), + Components: __webpack_require__(141), + Parsers: __webpack_require__(1340), - Formats: __webpack_require__(31), - ImageCollection: __webpack_require__(479), - ParseToTilemap: __webpack_require__(224), + Formats: __webpack_require__(32), + ImageCollection: __webpack_require__(484), + ParseToTilemap: __webpack_require__(227), Tile: __webpack_require__(74), - Tilemap: __webpack_require__(488), - TilemapCreator: __webpack_require__(1339), - TilemapFactory: __webpack_require__(1340), - Tileset: __webpack_require__(141), + Tilemap: __webpack_require__(493), + TilemapCreator: __webpack_require__(1349), + TilemapFactory: __webpack_require__(1350), + Tileset: __webpack_require__(104), - LayerData: __webpack_require__(104), - MapData: __webpack_require__(105), - ObjectLayer: __webpack_require__(482), + LayerData: __webpack_require__(102), + MapData: __webpack_require__(103), + ObjectLayer: __webpack_require__(487), - DynamicTilemapLayer: __webpack_require__(489), - StaticTilemapLayer: __webpack_require__(490) + DynamicTilemapLayer: __webpack_require__(494), + StaticTilemapLayer: __webpack_require__(495) }; /***/ }), -/* 1301 */ +/* 1311 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180966,7 +184175,7 @@ module.exports = Copy; /***/ }), -/* 1302 */ +/* 1312 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -180975,10 +184184,10 @@ module.exports = Copy; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(139); -var TileToWorldY = __webpack_require__(140); +var TileToWorldX = __webpack_require__(143); +var TileToWorldY = __webpack_require__(144); var GetTilesWithin = __webpack_require__(24); -var ReplaceByIndex = __webpack_require__(469); +var ReplaceByIndex = __webpack_require__(474); /** * Creates a Sprite for every object matching the given tile indexes in the layer. You can @@ -181051,7 +184260,7 @@ module.exports = CreateFromTiles; /***/ }), -/* 1303 */ +/* 1313 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181061,7 +184270,7 @@ module.exports = CreateFromTiles; */ var SnapFloor = __webpack_require__(93); -var SnapCeil = __webpack_require__(325); +var SnapCeil = __webpack_require__(329); /** * Returns the tiles in the given layer that are within the camera's viewport. This is used internally. @@ -181208,7 +184417,7 @@ module.exports = CullTiles; /***/ }), -/* 1304 */ +/* 1314 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181262,7 +184471,7 @@ module.exports = Fill; /***/ }), -/* 1305 */ +/* 1315 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181310,7 +184519,7 @@ module.exports = FilterTiles; /***/ }), -/* 1306 */ +/* 1316 */ /***/ (function(module, exports) { /** @@ -181398,7 +184607,7 @@ module.exports = FindByIndex; /***/ }), -/* 1307 */ +/* 1317 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181452,7 +184661,7 @@ module.exports = FindTile; /***/ }), -/* 1308 */ +/* 1318 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181502,7 +184711,7 @@ module.exports = ForEachTile; /***/ }), -/* 1309 */ +/* 1319 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181511,7 +184720,7 @@ module.exports = ForEachTile; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var GetTileAt = __webpack_require__(138); +var GetTileAt = __webpack_require__(142); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -181543,7 +184752,7 @@ module.exports = GetTileAtWorldXY; /***/ }), -/* 1310 */ +/* 1320 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181552,12 +184761,12 @@ module.exports = GetTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Geom = __webpack_require__(422); +var Geom = __webpack_require__(429); var GetTilesWithin = __webpack_require__(24); -var Intersects = __webpack_require__(423); +var Intersects = __webpack_require__(430); var NOOP = __webpack_require__(1); -var TileToWorldX = __webpack_require__(139); -var TileToWorldY = __webpack_require__(140); +var TileToWorldX = __webpack_require__(143); +var TileToWorldY = __webpack_require__(144); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -181640,7 +184849,7 @@ module.exports = GetTilesWithinShape; /***/ }), -/* 1311 */ +/* 1321 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181690,7 +184899,7 @@ module.exports = GetTilesWithinWorldXY; /***/ }), -/* 1312 */ +/* 1322 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181699,7 +184908,7 @@ module.exports = GetTilesWithinWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var HasTileAt = __webpack_require__(470); +var HasTileAt = __webpack_require__(475); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -181730,7 +184939,7 @@ module.exports = HasTileAtWorldXY; /***/ }), -/* 1313 */ +/* 1323 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181739,7 +184948,7 @@ module.exports = HasTileAtWorldXY; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var PutTileAt = __webpack_require__(218); +var PutTileAt = __webpack_require__(221); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -181773,7 +184982,7 @@ module.exports = PutTileAtWorldXY; /***/ }), -/* 1314 */ +/* 1324 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181783,7 +184992,7 @@ module.exports = PutTileAtWorldXY; */ var CalculateFacesWithin = __webpack_require__(51); -var PutTileAt = __webpack_require__(218); +var PutTileAt = __webpack_require__(221); /** * Puts an array of tiles or a 2D array of tiles at the given tile coordinates in the specified @@ -181837,7 +185046,7 @@ module.exports = PutTilesAt; /***/ }), -/* 1315 */ +/* 1325 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181847,7 +185056,7 @@ module.exports = PutTilesAt; */ var GetTilesWithin = __webpack_require__(24); -var GetRandom = __webpack_require__(183); +var GetRandom = __webpack_require__(185); /** * Randomizes the indexes of a rectangular region of tiles (in tile coordinates) within the @@ -181895,7 +185104,7 @@ module.exports = Randomize; /***/ }), -/* 1316 */ +/* 1326 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181904,7 +185113,7 @@ module.exports = Randomize; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var RemoveTileAt = __webpack_require__(471); +var RemoveTileAt = __webpack_require__(476); var WorldToTileX = __webpack_require__(63); var WorldToTileY = __webpack_require__(64); @@ -181936,7 +185145,7 @@ module.exports = RemoveTileAtWorldXY; /***/ }), -/* 1317 */ +/* 1327 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -181946,7 +185155,7 @@ module.exports = RemoveTileAtWorldXY; */ var GetTilesWithin = __webpack_require__(24); -var Color = __webpack_require__(348); +var Color = __webpack_require__(353); var defaultTileColor = new Color(105, 210, 231, 150); var defaultCollidingTileColor = new Color(243, 134, 48, 200); @@ -182025,7 +185234,7 @@ module.exports = RenderDebug; /***/ }), -/* 1318 */ +/* 1328 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182036,7 +185245,7 @@ module.exports = RenderDebug; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(219); +var SetLayerCollisionIndex = __webpack_require__(222); /** * Sets collision on the given tile or tiles within a layer by index. You can pass in either a @@ -182094,7 +185303,7 @@ module.exports = SetCollision; /***/ }), -/* 1319 */ +/* 1329 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182105,7 +185314,7 @@ module.exports = SetCollision; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(219); +var SetLayerCollisionIndex = __webpack_require__(222); /** * Sets collision on a range of tiles in a layer whose index is between the specified `start` and @@ -182169,7 +185378,7 @@ module.exports = SetCollisionBetween; /***/ }), -/* 1320 */ +/* 1330 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182180,7 +185389,7 @@ module.exports = SetCollisionBetween; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var SetLayerCollisionIndex = __webpack_require__(219); +var SetLayerCollisionIndex = __webpack_require__(222); /** * Sets collision on all tiles in the given layer, except for tiles that have an index specified in @@ -182226,7 +185435,7 @@ module.exports = SetCollisionByExclusion; /***/ }), -/* 1321 */ +/* 1331 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182237,7 +185446,7 @@ module.exports = SetCollisionByExclusion; var SetTileCollision = __webpack_require__(73); var CalculateFacesWithin = __webpack_require__(51); -var HasValue = __webpack_require__(99); +var HasValue = __webpack_require__(108); /** * Sets collision on the tiles within a layer by checking tile properties. If a tile has a property @@ -182301,7 +185510,7 @@ module.exports = SetCollisionByProperty; /***/ }), -/* 1322 */ +/* 1332 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182361,7 +185570,7 @@ module.exports = SetCollisionFromCollisionGroup; /***/ }), -/* 1323 */ +/* 1333 */ /***/ (function(module, exports) { /** @@ -182408,7 +185617,7 @@ module.exports = SetTileIndexCallback; /***/ }), -/* 1324 */ +/* 1334 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182451,7 +185660,7 @@ module.exports = SetTileLocationCallback; /***/ }), -/* 1325 */ +/* 1335 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182496,7 +185705,7 @@ module.exports = Shuffle; /***/ }), -/* 1326 */ +/* 1336 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182547,7 +185756,7 @@ module.exports = SwapByIndex; /***/ }), -/* 1327 */ +/* 1337 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182556,8 +185765,8 @@ module.exports = SwapByIndex; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var TileToWorldX = __webpack_require__(139); -var TileToWorldY = __webpack_require__(140); +var TileToWorldX = __webpack_require__(143); +var TileToWorldY = __webpack_require__(144); var Vector2 = __webpack_require__(3); /** @@ -182591,7 +185800,7 @@ module.exports = TileToWorldXY; /***/ }), -/* 1328 */ +/* 1338 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182671,7 +185880,7 @@ module.exports = WeightedRandomize; /***/ }), -/* 1329 */ +/* 1339 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182716,7 +185925,7 @@ module.exports = WorldToTileXY; /***/ }), -/* 1330 */ +/* 1340 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182731,18 +185940,18 @@ module.exports = WorldToTileXY; module.exports = { - Parse: __webpack_require__(472), - Parse2DArray: __webpack_require__(220), - ParseCSV: __webpack_require__(473), + Parse: __webpack_require__(477), + Parse2DArray: __webpack_require__(223), + ParseCSV: __webpack_require__(478), - Impact: __webpack_require__(1331), - Tiled: __webpack_require__(1332) + Impact: __webpack_require__(1341), + Tiled: __webpack_require__(1342) }; /***/ }), -/* 1331 */ +/* 1341 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182757,15 +185966,15 @@ module.exports = { module.exports = { - ParseTileLayers: __webpack_require__(486), - ParseTilesets: __webpack_require__(487), - ParseWeltmeister: __webpack_require__(485) + ParseTileLayers: __webpack_require__(491), + ParseTilesets: __webpack_require__(492), + ParseWeltmeister: __webpack_require__(490) }; /***/ }), -/* 1332 */ +/* 1342 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182780,22 +185989,22 @@ module.exports = { module.exports = { - 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) + AssignTileProperties: __webpack_require__(489), + Base64Decode: __webpack_require__(481), + BuildTilesetIndex: __webpack_require__(488), + ParseGID: __webpack_require__(224), + ParseImageLayers: __webpack_require__(482), + ParseJSONTiled: __webpack_require__(479), + ParseObject: __webpack_require__(226), + ParseObjectLayers: __webpack_require__(486), + ParseTileLayers: __webpack_require__(480), + ParseTilesets: __webpack_require__(483) }; /***/ }), -/* 1333 */ +/* 1343 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182809,12 +186018,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1334); + renderWebGL = __webpack_require__(1344); } if (true) { - renderCanvas = __webpack_require__(1335); + renderCanvas = __webpack_require__(1345); } module.exports = { @@ -182826,7 +186035,7 @@ module.exports = { /***/ }), -/* 1334 */ +/* 1344 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -182835,7 +186044,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Utils = __webpack_require__(10); +var Utils = __webpack_require__(9); /** * Renders this Game Object with the WebGL Renderer to the given Camera. @@ -182943,7 +186152,7 @@ module.exports = DynamicTilemapLayerWebGLRenderer; /***/ }), -/* 1335 */ +/* 1345 */ /***/ (function(module, exports) { /** @@ -183075,7 +186284,7 @@ module.exports = DynamicTilemapLayerCanvasRenderer; /***/ }), -/* 1336 */ +/* 1346 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183089,12 +186298,12 @@ var renderCanvas = __webpack_require__(1); if (true) { - renderWebGL = __webpack_require__(1337); + renderWebGL = __webpack_require__(1347); } if (true) { - renderCanvas = __webpack_require__(1338); + renderCanvas = __webpack_require__(1348); } module.exports = { @@ -183106,7 +186315,7 @@ module.exports = { /***/ }), -/* 1337 */ +/* 1347 */ /***/ (function(module, exports) { /** @@ -183178,7 +186387,7 @@ module.exports = StaticTilemapLayerWebGLRenderer; /***/ }), -/* 1338 */ +/* 1348 */ /***/ (function(module, exports) { /** @@ -183312,7 +186521,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; /***/ }), -/* 1339 */ +/* 1349 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183322,7 +186531,7 @@ module.exports = StaticTilemapLayerCanvasRenderer; */ var GameObjectCreator = __webpack_require__(16); -var ParseToTilemap = __webpack_require__(224); +var ParseToTilemap = __webpack_require__(227); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -183356,7 +186565,7 @@ GameObjectCreator.register('tilemap', function (config) /***/ }), -/* 1340 */ +/* 1350 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183366,7 +186575,7 @@ GameObjectCreator.register('tilemap', function (config) */ var GameObjectFactory = __webpack_require__(5); -var ParseToTilemap = __webpack_require__(224); +var ParseToTilemap = __webpack_require__(227); /** * Creates a Tilemap from the given key or data, or creates a blank Tilemap if no key/data provided. @@ -183422,7 +186631,7 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt /***/ }), -/* 1341 */ +/* 1351 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183437,14 +186646,14 @@ GameObjectFactory.register('tilemap', function (key, tileWidth, tileHeight, widt module.exports = { - Clock: __webpack_require__(1342), - TimerEvent: __webpack_require__(491) + Clock: __webpack_require__(1352), + TimerEvent: __webpack_require__(496) }; /***/ }), -/* 1342 */ +/* 1352 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183455,8 +186664,8 @@ module.exports = { var Class = __webpack_require__(0); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var TimerEvent = __webpack_require__(491); +var SceneEvents = __webpack_require__(22); +var TimerEvent = __webpack_require__(496); /** * @classdesc @@ -183850,7 +187059,7 @@ module.exports = Clock; /***/ }), -/* 1343 */ +/* 1353 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183860,7 +187069,7 @@ module.exports = Clock; */ var CONST = __webpack_require__(89); -var Extend = __webpack_require__(17); +var Extend = __webpack_require__(18); /** * @namespace Phaser.Tweens @@ -183868,13 +187077,13 @@ var Extend = __webpack_require__(17); var Tweens = { - Builders: __webpack_require__(1344), - Events: __webpack_require__(229), + Builders: __webpack_require__(1354), + Events: __webpack_require__(232), - TweenManager: __webpack_require__(1359), - Tween: __webpack_require__(228), - TweenData: __webpack_require__(230), - Timeline: __webpack_require__(497) + TweenManager: __webpack_require__(1369), + Tween: __webpack_require__(231), + TweenData: __webpack_require__(233), + Timeline: __webpack_require__(502) }; @@ -183885,7 +187094,7 @@ module.exports = Tweens; /***/ }), -/* 1344 */ +/* 1354 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -183901,22 +187110,22 @@ module.exports = Tweens; module.exports = { GetBoolean: __webpack_require__(88), - GetEaseFunction: __webpack_require__(82), - 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) + GetEaseFunction: __webpack_require__(69), + GetNewValue: __webpack_require__(145), + GetProps: __webpack_require__(497), + GetTargets: __webpack_require__(228), + GetTweens: __webpack_require__(498), + GetValueOp: __webpack_require__(229), + NumberTweenBuilder: __webpack_require__(499), + StaggerBuilder: __webpack_require__(500), + TimelineBuilder: __webpack_require__(501), + TweenBuilder: __webpack_require__(146) }; /***/ }), -/* 1345 */ +/* 1355 */ /***/ (function(module, exports) { /** @@ -183991,7 +187200,7 @@ module.exports = [ /***/ }), -/* 1346 */ +/* 1356 */ /***/ (function(module, exports) { /** @@ -184027,7 +187236,7 @@ module.exports = 'complete'; /***/ }), -/* 1347 */ +/* 1357 */ /***/ (function(module, exports) { /** @@ -184064,7 +187273,7 @@ module.exports = 'loop'; /***/ }), -/* 1348 */ +/* 1358 */ /***/ (function(module, exports) { /** @@ -184101,7 +187310,7 @@ module.exports = 'pause'; /***/ }), -/* 1349 */ +/* 1359 */ /***/ (function(module, exports) { /** @@ -184138,7 +187347,7 @@ module.exports = 'resume'; /***/ }), -/* 1350 */ +/* 1360 */ /***/ (function(module, exports) { /** @@ -184174,7 +187383,7 @@ module.exports = 'start'; /***/ }), -/* 1351 */ +/* 1361 */ /***/ (function(module, exports) { /** @@ -184211,7 +187420,7 @@ module.exports = 'update'; /***/ }), -/* 1352 */ +/* 1362 */ /***/ (function(module, exports) { /** @@ -184251,7 +187460,7 @@ module.exports = 'active'; /***/ }), -/* 1353 */ +/* 1363 */ /***/ (function(module, exports) { /** @@ -184292,7 +187501,7 @@ module.exports = 'complete'; /***/ }), -/* 1354 */ +/* 1364 */ /***/ (function(module, exports) { /** @@ -184336,7 +187545,7 @@ module.exports = 'loop'; /***/ }), -/* 1355 */ +/* 1365 */ /***/ (function(module, exports) { /** @@ -184381,7 +187590,7 @@ module.exports = 'repeat'; /***/ }), -/* 1356 */ +/* 1366 */ /***/ (function(module, exports) { /** @@ -184421,7 +187630,7 @@ module.exports = 'start'; /***/ }), -/* 1357 */ +/* 1367 */ /***/ (function(module, exports) { /** @@ -184464,7 +187673,7 @@ module.exports = 'update'; /***/ }), -/* 1358 */ +/* 1368 */ /***/ (function(module, exports) { /** @@ -184510,7 +187719,7 @@ module.exports = 'yoyo'; /***/ }), -/* 1359 */ +/* 1369 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -184519,15 +187728,15 @@ module.exports = 'yoyo'; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ArrayRemove = __webpack_require__(121); +var ArrayRemove = __webpack_require__(123); var Class = __webpack_require__(0); -var NumberTweenBuilder = __webpack_require__(494); +var NumberTweenBuilder = __webpack_require__(499); var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var StaggerBuilder = __webpack_require__(495); -var TimelineBuilder = __webpack_require__(496); +var SceneEvents = __webpack_require__(22); +var StaggerBuilder = __webpack_require__(500); +var TimelineBuilder = __webpack_require__(501); var TWEEN_CONST = __webpack_require__(89); -var TweenBuilder = __webpack_require__(143); +var TweenBuilder = __webpack_require__(146); /** * @classdesc @@ -185282,7 +188491,7 @@ module.exports = TweenManager; /***/ }), -/* 1360 */ +/* 1370 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185297,16 +188506,16 @@ module.exports = TweenManager; module.exports = { - Array: __webpack_require__(181), - Base64: __webpack_require__(1361), - Objects: __webpack_require__(1363), - String: __webpack_require__(1367) + Array: __webpack_require__(183), + Base64: __webpack_require__(1371), + Objects: __webpack_require__(1373), + String: __webpack_require__(1377) }; /***/ }), -/* 1361 */ +/* 1371 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185321,14 +188530,14 @@ module.exports = { module.exports = { - ArrayBufferToBase64: __webpack_require__(1362), - Base64ToArrayBuffer: __webpack_require__(380) + ArrayBufferToBase64: __webpack_require__(1372), + Base64ToArrayBuffer: __webpack_require__(387) }; /***/ }), -/* 1362 */ +/* 1372 */ /***/ (function(module, exports) { /** @@ -185386,7 +188595,7 @@ module.exports = ArrayBufferToBase64; /***/ }), -/* 1363 */ +/* 1373 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185402,25 +188611,25 @@ module.exports = ArrayBufferToBase64; module.exports = { Clone: __webpack_require__(67), - Extend: __webpack_require__(17), - GetAdvancedValue: __webpack_require__(15), + Extend: __webpack_require__(18), + GetAdvancedValue: __webpack_require__(14), GetFastValue: __webpack_require__(2), - GetMinMaxValue: __webpack_require__(1364), + GetMinMaxValue: __webpack_require__(1374), GetValue: __webpack_require__(6), - HasAll: __webpack_require__(1365), - HasAny: __webpack_require__(399), - HasValue: __webpack_require__(99), + HasAll: __webpack_require__(1375), + HasAny: __webpack_require__(406), + HasValue: __webpack_require__(108), IsPlainObject: __webpack_require__(7), - Merge: __webpack_require__(107), - MergeRight: __webpack_require__(1366), - Pick: __webpack_require__(480), - SetValue: __webpack_require__(419) + Merge: __webpack_require__(126), + MergeRight: __webpack_require__(1376), + Pick: __webpack_require__(485), + SetValue: __webpack_require__(426) }; /***/ }), -/* 1364 */ +/* 1374 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185430,7 +188639,7 @@ module.exports = { */ var GetValue = __webpack_require__(6); -var Clamp = __webpack_require__(22); +var Clamp = __webpack_require__(19); /** * Retrieves and clamps a numerical value from an object. @@ -185459,7 +188668,7 @@ module.exports = GetMinMaxValue; /***/ }), -/* 1365 */ +/* 1375 */ /***/ (function(module, exports) { /** @@ -185496,7 +188705,7 @@ module.exports = HasAll; /***/ }), -/* 1366 */ +/* 1376 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185539,7 +188748,7 @@ module.exports = MergeRight; /***/ }), -/* 1367 */ +/* 1377 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185554,17 +188763,17 @@ module.exports = MergeRight; module.exports = { - Format: __webpack_require__(1368), - Pad: __webpack_require__(160), - Reverse: __webpack_require__(1369), - UppercaseFirst: __webpack_require__(179), - UUID: __webpack_require__(194) + Format: __webpack_require__(1378), + Pad: __webpack_require__(163), + Reverse: __webpack_require__(1379), + UppercaseFirst: __webpack_require__(181), + UUID: __webpack_require__(196) }; /***/ }), -/* 1368 */ +/* 1378 */ /***/ (function(module, exports) { /** @@ -185599,7 +188808,7 @@ module.exports = Format; /***/ }), -/* 1369 */ +/* 1379 */ /***/ (function(module, exports) { /** @@ -185628,7 +188837,7 @@ module.exports = Reverse; /***/ }), -/* 1370 */ +/* 1380 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -185644,2586 +188853,27 @@ module.exports = Reverse; module.exports = { - SoundManagerCreator: __webpack_require__(374), + SoundManagerCreator: __webpack_require__(379), Events: __webpack_require__(59), - BaseSound: __webpack_require__(125), - BaseSoundManager: __webpack_require__(124), + BaseSound: __webpack_require__(128), + BaseSoundManager: __webpack_require__(127), - WebAudioSound: __webpack_require__(381), - WebAudioSoundManager: __webpack_require__(379), + WebAudioSound: __webpack_require__(388), + WebAudioSoundManager: __webpack_require__(386), - HTML5AudioSound: __webpack_require__(376), - HTML5AudioSoundManager: __webpack_require__(375), + HTML5AudioSound: __webpack_require__(383), + HTML5AudioSoundManager: __webpack_require__(380), - NoAudioSound: __webpack_require__(378), - NoAudioSoundManager: __webpack_require__(377) + NoAudioSound: __webpack_require__(385), + NoAudioSoundManager: __webpack_require__(384) }; /***/ }), -/* 1371 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -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 - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} body - [description] - */ - -/** - * @classdesc - * An Impact.js compatible physics body. - * This re-creates the properties you'd get on an Entity and the math needed to update them. - * - * @class Body - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} [sx=16] - [description] - * @param {number} [sy=16] - [description] - */ -var Body = new Class({ - - initialize: - - function Body (world, x, y, sx, sy) - { - if (sx === undefined) { sx = 16; } - if (sy === undefined) { sy = sx; } - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#world - * @type {Phaser.Physics.Impact.World} - * @since 3.0.0 - */ - this.world = world; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#gameObject - * @type {Phaser.GameObjects.GameObject} - * @default null - * @since 3.0.0 - */ - this.gameObject = null; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#enabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.enabled = true; - - /** - * The ImpactBody, ImpactSprite or ImpactImage object that owns this Body, if any. - * - * @name Phaser.Physics.Impact.Body#parent - * @type {?(Phaser.Physics.Impact.ImpactBody|Phaser.Physics.Impact.ImpactImage|Phaser.Physics.Impact.ImpactSprite)} - * @since 3.0.0 - */ - this.parent; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#id - * @type {integer} - * @since 3.0.0 - */ - this.id = world.getNextID(); - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#name - * @type {string} - * @default '' - * @since 3.0.0 - */ - this.name = ''; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#size - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.size = { x: sx, y: sy }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#offset - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.offset = { x: 0, y: 0 }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#pos - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.pos = { x: x, y: y }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#last - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.last = { x: x, y: y }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#vel - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.vel = { x: 0, y: 0 }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#accel - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.accel = { x: 0, y: 0 }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#friction - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.friction = { x: 0, y: 0 }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#maxVel - * @type {Phaser.Types.Math.Vector2Like} - * @since 3.0.0 - */ - this.maxVel = { x: world.defaults.maxVelocityX, y: world.defaults.maxVelocityY }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#standing - * @type {boolean} - * @default false - * @since 3.0.0 - */ - this.standing = false; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#gravityFactor - * @type {number} - * @since 3.0.0 - */ - this.gravityFactor = world.defaults.gravityFactor; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#bounciness - * @type {number} - * @since 3.0.0 - */ - this.bounciness = world.defaults.bounciness; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#minBounceVelocity - * @type {number} - * @since 3.0.0 - */ - this.minBounceVelocity = world.defaults.minBounceVelocity; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#accelGround - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accelGround = 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#accelAir - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.accelAir = 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#jumpSpeed - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.jumpSpeed = 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#type - * @type {Phaser.Physics.Impact.TYPE} - * @since 3.0.0 - */ - this.type = TYPE.NONE; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#checkAgainst - * @type {Phaser.Physics.Impact.TYPE} - * @since 3.0.0 - */ - this.checkAgainst = TYPE.NONE; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#collides - * @type {Phaser.Physics.Impact.COLLIDES} - * @since 3.0.0 - */ - this.collides = COLLIDES.NEVER; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#debugShowBody - * @type {boolean} - * @since 3.0.0 - */ - this.debugShowBody = world.defaults.debugShowBody; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#debugShowVelocity - * @type {boolean} - * @since 3.0.0 - */ - this.debugShowVelocity = world.defaults.debugShowVelocity; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#debugBodyColor - * @type {integer} - * @since 3.0.0 - */ - this.debugBodyColor = world.defaults.bodyDebugColor; - - /** - * [description] - * - * @name Phaser.Physics.Impact.Body#updateCallback - * @type {?Phaser.Types.Physics.Impact.BodyUpdateCallback} - * @since 3.0.0 - */ - this.updateCallback; - - /** - * min 44 deg, max 136 deg - * - * @name Phaser.Physics.Impact.Body#slopeStanding - * @type {{ min: number, max: number }} - * @since 3.0.0 - */ - this.slopeStanding = { min: 0.767944870877505, max: 2.3736477827122884 }; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#reset - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - */ - reset: function (x, y) - { - this.pos = { x: x, y: y }; - this.last = { x: x, y: y }; - 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 = false; - - this.gravityFactor = 1; - this.bounciness = 0; - this.minBounceVelocity = 40; - - this.accelGround = 0; - this.accelAir = 0; - this.jumpSpeed = 0; - - this.type = TYPE.NONE; - this.checkAgainst = TYPE.NONE; - this.collides = COLLIDES.NEVER; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#update - * @since 3.0.0 - * - * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update: function (delta) - { - var pos = this.pos; - - this.last.x = pos.x; - this.last.y = pos.y; - - this.vel.y += this.world.gravity * delta * this.gravityFactor; - - this.vel.x = GetVelocity(delta, this.vel.x, this.accel.x, this.friction.x, this.maxVel.x); - this.vel.y = GetVelocity(delta, this.vel.y, this.accel.y, this.friction.y, this.maxVel.y); - - var mx = this.vel.x * delta; - var my = this.vel.y * delta; - - var res = this.world.collisionMap.trace(pos.x, pos.y, mx, my, this.size.x, this.size.y); - - if (this.handleMovementTrace(res)) - { - UpdateMotion(this, res); - } - - var go = this.gameObject; - - if (go) - { - go.x = (pos.x - this.offset.x) + go.displayOriginX * go.scaleX; - go.y = (pos.y - this.offset.y) + go.displayOriginY * go.scaleY; - } - - if (this.updateCallback) - { - this.updateCallback(this); - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#drawDebug - * @since 3.0.0 - * - * @param {Phaser.GameObjects.Graphics} graphic - [description] - */ - drawDebug: function (graphic) - { - var pos = this.pos; - - if (this.debugShowBody) - { - graphic.lineStyle(1, this.debugBodyColor, 1); - graphic.strokeRect(pos.x, pos.y, this.size.x, this.size.y); - } - - if (this.debugShowVelocity) - { - var x = pos.x + this.size.x / 2; - var y = pos.y + this.size.y / 2; - - graphic.lineStyle(1, this.world.defaults.velocityDebugColor, 1); - graphic.lineBetween(x, y, x + this.vel.x, y + this.vel.y); - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#willDrawDebug - * @since 3.0.0 - * - * @return {boolean} [description] - */ - willDrawDebug: function () - { - return (this.debugShowBody || this.debugShowVelocity); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#skipHash - * @since 3.0.0 - * - * @return {boolean} [description] - */ - skipHash: function () - { - return (!this.enabled || (this.type === 0 && this.checkAgainst === 0 && this.collides === 0)); - }, - - /** - * Determines whether the body collides with the `other` one or not. - * - * @method Phaser.Physics.Impact.Body#touches - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} other - [description] - * - * @return {boolean} [description] - */ - touches: function (other) - { - return !( - this.pos.x >= other.pos.x + other.size.x || - this.pos.x + this.size.x <= other.pos.x || - this.pos.y >= other.pos.y + other.size.y || - this.pos.y + this.size.y <= other.pos.y - ); - }, - - /** - * Reset the size and position of the physics body. - * - * @method Phaser.Physics.Impact.Body#resetSize - * @since 3.0.0 - * - * @param {number} x - The x coordinate to position the body. - * @param {number} y - The y coordinate to position the body. - * @param {number} width - The width of the body. - * @param {number} height - The height of the body. - * - * @return {Phaser.Physics.Impact.Body} This Body object. - */ - resetSize: function (x, y, width, height) - { - this.pos.x = x; - this.pos.y = y; - this.size.x = width; - this.size.y = height; - - return this; - }, - - /** - * Export this body object to JSON. - * - * @method Phaser.Physics.Impact.Body#toJSON - * @since 3.0.0 - * - * @return {Phaser.Types.Physics.Impact.JSONImpactBody} JSON representation of this body object. - */ - toJSON: function () - { - var output = { - 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 - }; - - return output; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#fromJSON - * @todo Code it! - * @since 3.0.0 - * - * @param {object} config - [description] - */ - fromJSON: function () - { - }, - - /** - * Can be overridden by user code - * - * @method Phaser.Physics.Impact.Body#check - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} other - [description] - */ - check: function () - { - }, - - /** - * Can be overridden by user code - * - * @method Phaser.Physics.Impact.Body#collideWith - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} other - [description] - * @param {string} axis - [description] - */ - collideWith: function (other, axis) - { - if (this.parent && this.parent._collideCallback) - { - this.parent._collideCallback.call(this.parent._callbackScope, this, other, axis); - } - }, - - /** - * Can be overridden by user code but must return a boolean. - * - * @method Phaser.Physics.Impact.Body#handleMovementTrace - * @since 3.0.0 - * - * @param {number} res - [description] - * - * @return {boolean} [description] - */ - handleMovementTrace: function () - { - return true; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Body#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.world.remove(this); - - this.enabled = false; - - this.world = null; - - this.gameObject = null; - - this.parent = null; - } - -}); - -module.exports = Body; - - -/***/ }), -/* 1372 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var DefaultDefs = __webpack_require__(1395); - -/** - * @classdesc - * [description] - * - * @class CollisionMap - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {integer} [tilesize=32] - [description] - * @param {array} [data] - [description] - */ -var CollisionMap = new Class({ - - initialize: - - function CollisionMap (tilesize, data) - { - if (tilesize === undefined) { tilesize = 32; } - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#tilesize - * @type {integer} - * @default 32 - * @since 3.0.0 - */ - this.tilesize = tilesize; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#data - * @type {array} - * @since 3.0.0 - */ - this.data = (Array.isArray(data)) ? data : []; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#width - * @type {number} - * @since 3.0.0 - */ - this.width = (Array.isArray(data)) ? data[0].length : 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#height - * @type {number} - * @since 3.0.0 - */ - this.height = (Array.isArray(data)) ? data.length : 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#lastSlope - * @type {integer} - * @default 55 - * @since 3.0.0 - */ - this.lastSlope = 55; - - /** - * [description] - * - * @name Phaser.Physics.Impact.CollisionMap#tiledef - * @type {object} - * @since 3.0.0 - */ - this.tiledef = DefaultDefs; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.CollisionMap#trace - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} vx - [description] - * @param {number} vy - [description] - * @param {number} objectWidth - [description] - * @param {number} objectHeight - [description] - * - * @return {boolean} [description] - */ - trace: function (x, y, vx, vy, objectWidth, objectHeight) - { - // Set up the trace-result - var res = { - collision: { x: false, y: false, slope: false }, - pos: { x: x + vx, y: y + vy }, - tile: { x: 0, y: 0 } - }; - - if (!this.data) - { - return res; - } - - var steps = Math.ceil(Math.max(Math.abs(vx), Math.abs(vy)) / this.tilesize); - - if (steps > 1) - { - var sx = vx / steps; - var sy = vy / steps; - - for (var i = 0; i < steps && (sx || sy); i++) - { - this.step(res, x, y, sx, sy, objectWidth, objectHeight, vx, vy, i); - - x = res.pos.x; - y = res.pos.y; - - if (res.collision.x) - { - sx = 0; - vx = 0; - } - - if (res.collision.y) - { - sy = 0; - vy = 0; - } - - if (res.collision.slope) - { - break; - } - } - } - else - { - this.step(res, x, y, vx, vy, objectWidth, objectHeight, vx, vy, 0); - } - - return res; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.CollisionMap#step - * @since 3.0.0 - * - * @param {object} res - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} vx - [description] - * @param {number} vy - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} rvx - [description] - * @param {number} rvy - [description] - * @param {number} step - [description] - */ - step: function (res, x, y, vx, vy, width, height, rvx, rvy, step) - { - var t = 0; - var tileX; - var tileY; - var tilesize = this.tilesize; - var mapWidth = this.width; - var mapHeight = this.height; - - // Horizontal - if (vx) - { - var pxOffsetX = (vx > 0 ? width : 0); - var tileOffsetX = (vx < 0 ? tilesize : 0); - - var firstTileY = Math.max(Math.floor(y / tilesize), 0); - var lastTileY = Math.min(Math.ceil((y + height) / tilesize), mapHeight); - - tileX = Math.floor((res.pos.x + pxOffsetX) / tilesize); - - var prevTileX = Math.floor((x + pxOffsetX) / tilesize); - - if (step > 0 || tileX === prevTileX || prevTileX < 0 || prevTileX >= mapWidth) - { - prevTileX = -1; - } - - if (tileX >= 0 && tileX < mapWidth) - { - for (tileY = firstTileY; tileY < lastTileY; tileY++) - { - if (prevTileX !== -1) - { - t = this.data[tileY][prevTileX]; - - if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, prevTileX, tileY)) - { - break; - } - } - - t = this.data[tileY][tileX]; - - if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY))) - { - if (t > 1 && t <= this.lastSlope && res.collision.slope) - { - break; - } - - res.collision.x = true; - res.tile.x = t; - res.pos.x = (tileX * tilesize) - pxOffsetX + tileOffsetX; - x = res.pos.x; - rvx = 0; - - break; - } - } - } - } - - // Vertical - if (vy) - { - var pxOffsetY = (vy > 0 ? height : 0); - var tileOffsetY = (vy < 0 ? tilesize : 0); - - var firstTileX = Math.max(Math.floor(res.pos.x / tilesize), 0); - var lastTileX = Math.min(Math.ceil((res.pos.x + width) / tilesize), mapWidth); - - tileY = Math.floor((res.pos.y + pxOffsetY) / tilesize); - - var prevTileY = Math.floor((y + pxOffsetY) / tilesize); - - if (step > 0 || tileY === prevTileY || prevTileY < 0 || prevTileY >= mapHeight) - { - prevTileY = -1; - } - - if (tileY >= 0 && tileY < mapHeight) - { - for (tileX = firstTileX; tileX < lastTileX; tileX++) - { - if (prevTileY !== -1) - { - t = this.data[prevTileY][tileX]; - - if (t > 1 && t <= this.lastSlope && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, prevTileY)) - { - break; - } - } - - t = this.data[tileY][tileX]; - - if (t === 1 || t > this.lastSlope || (t > 1 && this.checkDef(res, t, x, y, rvx, rvy, width, height, tileX, tileY))) - { - if (t > 1 && t <= this.lastSlope && res.collision.slope) - { - break; - } - - res.collision.y = true; - res.tile.y = t; - res.pos.y = tileY * tilesize - pxOffsetY + tileOffsetY; - - break; - } - } - } - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.CollisionMap#checkDef - * @since 3.0.0 - * - * @param {object} res - [description] - * @param {number} t - [description] - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} vx - [description] - * @param {number} vy - [description] - * @param {number} width - [description] - * @param {number} height - [description] - * @param {number} tileX - [description] - * @param {number} tileY - [description] - * - * @return {boolean} [description] - */ - checkDef: function (res, t, x, y, vx, vy, width, height, tileX, tileY) - { - var def = this.tiledef[t]; - - if (!def) - { - return false; - } - - var tilesize = this.tilesize; - - var lx = (tileX + def[0]) * tilesize; - var ly = (tileY + def[1]) * tilesize; - var lvx = (def[2] - def[0]) * tilesize; - var lvy = (def[3] - def[1]) * tilesize; - var solid = def[4]; - - var tx = x + vx + (lvy < 0 ? width : 0) - lx; - var ty = y + vy + (lvx > 0 ? height : 0) - ly; - - if (lvx * ty - lvy * tx > 0) - { - if (vx * -lvy + vy * lvx < 0) - { - return solid; - } - - var length = Math.sqrt(lvx * lvx + lvy * lvy); - var nx = lvy / length; - var ny = -lvx / length; - - var proj = tx * nx + ty * ny; - var px = nx * proj; - var py = ny * proj; - - if (px * px + py * py >= vx * vx + vy * vy) - { - return solid || (lvx * (ty - vy) - lvy * (tx - vx) < 0.5); - } - - res.pos.x = x + vx - px; - res.pos.y = y + vy - py; - res.collision.slope = { x: lvx, y: lvy, nx: nx, ny: ny }; - - return true; - } - - return false; - } - -}); - -module.exports = CollisionMap; - - -/***/ }), -/* 1373 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var ImpactBody = __webpack_require__(1374); -var ImpactImage = __webpack_require__(1375); -var ImpactSprite = __webpack_require__(1376); - -/** - * @classdesc - * 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. - * - * @class Factory - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - A reference to the Impact Physics world. - */ -var Factory = new Class({ - - initialize: - - function Factory (world) - { - /** - * A reference to the Impact Physics world. - * - * @name Phaser.Physics.Impact.Factory#world - * @type {Phaser.Physics.Impact.World} - * @since 3.0.0 - */ - this.world = world; - - /** - * A reference to the Scene.Systems this Impact Physics instance belongs to. - * - * @name Phaser.Physics.Impact.Factory#sys - * @type {Phaser.Scenes.Systems} - * @since 3.0.0 - */ - this.sys = world.scene.sys; - }, - - /** - * Creates a new ImpactBody object and adds it to the physics simulation. - * - * @method Phaser.Physics.Impact.Factory#body - * @since 3.0.0 - * - * @param {number} x - The horizontal position of the body in the physics world. - * @param {number} y - The vertical position of the body in the physics world. - * @param {number} width - The width of the body. - * @param {number} height - The height of the body. - * - * @return {Phaser.Physics.Impact.ImpactBody} The ImpactBody object that was created. - */ - body: function (x, y, width, height) - { - return new ImpactBody(this.world, x, y, width, height); - }, - - /** - * Adds an Impact Physics Body to the given Game Object. - * - * @method Phaser.Physics.Impact.Factory#existing - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - The Game Object to receive the physics body. - * - * @return {Phaser.GameObjects.GameObject} The Game Object. - */ - existing: function (gameObject) - { - var x = gameObject.x - gameObject.frame.centerX; - var y = gameObject.y - gameObject.frame.centerY; - var w = gameObject.width; - var h = gameObject.height; - - gameObject.body = this.world.create(x, y, w, h); - - gameObject.body.parent = gameObject; - gameObject.body.gameObject = gameObject; - - return gameObject; - }, - - /** - * Creates a new ImpactImage object and adds it to the physics world. - * - * @method Phaser.Physics.Impact.Factory#image - * @since 3.0.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} 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. - * - * @return {Phaser.Physics.Impact.ImpactImage} The ImpactImage object that was created. - */ - image: function (x, y, key, frame) - { - var image = new ImpactImage(this.world, x, y, key, frame); - - this.sys.displayList.add(image); - - return image; - }, - - /** - * Creates a new ImpactSprite object and adds it to the physics world. - * - * @method Phaser.Physics.Impact.Factory#sprite - * @since 3.0.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} 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. - * - * @return {Phaser.Physics.Impact.ImpactSprite} The ImpactSprite object that was created. - */ - sprite: function (x, y, key, frame) - { - var sprite = new ImpactSprite(this.world, x, y, key, frame); - - this.sys.displayList.add(sprite); - this.sys.updateList.add(sprite); - - return sprite; - }, - - /** - * Destroys this Factory. - * - * @method Phaser.Physics.Impact.Factory#destroy - * @since 3.5.0 - */ - destroy: function () - { - this.world = null; - this.sys = null; - } - -}); - -module.exports = Factory; - - -/***/ }), -/* 1374 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Components = __webpack_require__(1279); - -/** - * @classdesc - * [description] - * - * @class ImpactBody - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @extends Phaser.Physics.Impact.Components.Acceleration - * @extends Phaser.Physics.Impact.Components.BodyScale - * @extends Phaser.Physics.Impact.Components.BodyType - * @extends Phaser.Physics.Impact.Components.Bounce - * @extends Phaser.Physics.Impact.Components.CheckAgainst - * @extends Phaser.Physics.Impact.Components.Collides - * @extends Phaser.Physics.Impact.Components.Debug - * @extends Phaser.Physics.Impact.Components.Friction - * @extends Phaser.Physics.Impact.Components.Gravity - * @extends Phaser.Physics.Impact.Components.Offset - * @extends Phaser.Physics.Impact.Components.SetGameObject - * @extends Phaser.Physics.Impact.Components.Velocity - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @param {number} x - x - The horizontal position of this physics body in the world. - * @param {number} y - y - The vertical position of this physics body in the world. - * @param {number} width - The width of the physics body in the world. - * @param {number} height - [description] - */ -var ImpactBody = new Class({ - - Mixins: [ - Components.Acceleration, - Components.BodyScale, - Components.BodyType, - Components.Bounce, - Components.CheckAgainst, - Components.Collides, - Components.Debug, - Components.Friction, - Components.Gravity, - Components.Offset, - Components.SetGameObject, - Components.Velocity - ], - - initialize: - - function ImpactBody (world, x, y, width, height) - { - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#body - * @type {Phaser.Physics.Impact.Body} - * @since 3.0.0 - */ - this.body = world.create(x, y, width, height); - - this.body.parent = this; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#size - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.size = this.body.size; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#offset - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.offset = this.body.offset; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#vel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.vel = this.body.vel; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#accel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.accel = this.body.accel; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#friction - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.friction = this.body.friction; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactBody#maxVel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.maxVel = this.body.maxVel; - } - -}); - -module.exports = ImpactBody; - - -/***/ }), -/* 1375 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Components = __webpack_require__(1279); -var Image = __webpack_require__(98); - -/** - * @classdesc - * An Impact 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. - * - * @class ImpactImage - * @extends Phaser.GameObjects.Image - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @extends Phaser.Physics.Impact.Components.Acceleration - * @extends Phaser.Physics.Impact.Components.BodyScale - * @extends Phaser.Physics.Impact.Components.BodyType - * @extends Phaser.Physics.Impact.Components.Bounce - * @extends Phaser.Physics.Impact.Components.CheckAgainst - * @extends Phaser.Physics.Impact.Components.Collides - * @extends Phaser.Physics.Impact.Components.Debug - * @extends Phaser.Physics.Impact.Components.Friction - * @extends Phaser.Physics.Impact.Components.Gravity - * @extends Phaser.Physics.Impact.Components.Offset - * @extends Phaser.Physics.Impact.Components.SetGameObject - * @extends Phaser.Physics.Impact.Components.Velocity - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.Texture - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @param {Phaser.Physics.Impact.World} world - The physics world of the Impact physics system. - * @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. - */ -var ImpactImage = new Class({ - - Extends: Image, - - Mixins: [ - Components.Acceleration, - Components.BodyScale, - Components.BodyType, - Components.Bounce, - Components.CheckAgainst, - Components.Collides, - Components.Debug, - Components.Friction, - Components.Gravity, - Components.Offset, - Components.SetGameObject, - Components.Velocity - ], - - initialize: - - function ImpactImage (world, x, y, texture, frame) - { - Image.call(this, world.scene, x, y, texture, frame); - - /** - * The Physics Body linked to an ImpactImage. - * - * @name Phaser.Physics.Impact.ImpactImage#body - * @type {Phaser.Physics.Impact.Body} - * @since 3.0.0 - */ - this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height); - - this.body.parent = this; - this.body.gameObject = this; - - /** - * The size of the physics Body. - * - * @name Phaser.Physics.Impact.ImpactImage#size - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.size = this.body.size; - - /** - * The X and Y offset of the Body from the left and top of the Image. - * - * @name Phaser.Physics.Impact.ImpactImage#offset - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.offset = this.body.offset; - - /** - * The velocity, or rate of change the Body's position. Measured in pixels per second. - * - * @name Phaser.Physics.Impact.ImpactImage#vel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.vel = this.body.vel; - - /** - * The acceleration is the rate of change of the velocity. Measured in pixels per second squared. - * - * @name Phaser.Physics.Impact.ImpactImage#accel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.accel = this.body.accel; - - /** - * Friction between colliding bodies. - * - * @name Phaser.Physics.Impact.ImpactImage#friction - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.friction = this.body.friction; - - /** - * The maximum velocity of the body. - * - * @name Phaser.Physics.Impact.ImpactImage#maxVel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.maxVel = this.body.maxVel; - } - -}); - -module.exports = ImpactImage; - - -/***/ }), -/* 1376 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Components = __webpack_require__(1279); -var Sprite = __webpack_require__(69); - -/** - * @classdesc - * An Impact 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. - * - * @class ImpactSprite - * @extends Phaser.GameObjects.Sprite - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @extends Phaser.Physics.Impact.Components.Acceleration - * @extends Phaser.Physics.Impact.Components.BodyScale - * @extends Phaser.Physics.Impact.Components.BodyType - * @extends Phaser.Physics.Impact.Components.Bounce - * @extends Phaser.Physics.Impact.Components.CheckAgainst - * @extends Phaser.Physics.Impact.Components.Collides - * @extends Phaser.Physics.Impact.Components.Debug - * @extends Phaser.Physics.Impact.Components.Friction - * @extends Phaser.Physics.Impact.Components.Gravity - * @extends Phaser.Physics.Impact.Components.Offset - * @extends Phaser.Physics.Impact.Components.SetGameObject - * @extends Phaser.Physics.Impact.Components.Velocity - * @extends Phaser.GameObjects.Components.Alpha - * @extends Phaser.GameObjects.Components.BlendMode - * @extends Phaser.GameObjects.Components.Depth - * @extends Phaser.GameObjects.Components.Flip - * @extends Phaser.GameObjects.Components.GetBounds - * @extends Phaser.GameObjects.Components.Origin - * @extends Phaser.GameObjects.Components.Pipeline - * @extends Phaser.GameObjects.Components.ScrollFactor - * @extends Phaser.GameObjects.Components.Size - * @extends Phaser.GameObjects.Components.Texture - * @extends Phaser.GameObjects.Components.Tint - * @extends Phaser.GameObjects.Components.Transform - * @extends Phaser.GameObjects.Components.Visible - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @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. - */ -var ImpactSprite = new Class({ - - Extends: Sprite, - - Mixins: [ - Components.Acceleration, - Components.BodyScale, - Components.BodyType, - Components.Bounce, - Components.CheckAgainst, - Components.Collides, - Components.Debug, - Components.Friction, - Components.Gravity, - Components.Offset, - Components.SetGameObject, - Components.Velocity - ], - - initialize: - - function ImpactSprite (world, x, y, texture, frame) - { - Sprite.call(this, world.scene, x, y, texture, frame); - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#body - * @type {Phaser.Physics.Impact.Body} - * @since 3.0.0 - */ - this.body = world.create(x - this.frame.centerX, y - this.frame.centerY, this.width, this.height); - - this.body.parent = this; - this.body.gameObject = this; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#size - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.size = this.body.size; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#offset - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.offset = this.body.offset; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#vel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.vel = this.body.vel; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#accel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.accel = this.body.accel; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#friction - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.friction = this.body.friction; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactSprite#maxVel - * @type {{x: number, y: number}} - * @since 3.0.0 - */ - this.maxVel = this.body.maxVel; - } - -}); - -module.exports = ImpactSprite; - - -/***/ }), -/* 1377 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Body = __webpack_require__(1371); -var Class = __webpack_require__(0); -var COLLIDES = __webpack_require__(465); -var CollisionMap = __webpack_require__(1372); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(1278); -var GetFastValue = __webpack_require__(2); -var HasValue = __webpack_require__(99); -var Set = __webpack_require__(108); -var Solver = __webpack_require__(1409); -var TILEMAP_FORMATS = __webpack_require__(31); -var TYPE = __webpack_require__(466); - -/** - * @classdesc - * [description] - * - * @class World - * @extends Phaser.Events.EventEmitter - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - The Scene to which this Impact World instance belongs. - * @param {Phaser.Types.Physics.Impact.WorldConfig} config - [description] - */ -var World = new Class({ - - Extends: EventEmitter, - - initialize: - - function World (scene, config) - { - EventEmitter.call(this); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#bodies - * @type {Phaser.Structs.Set.} - * @since 3.0.0 - */ - this.bodies = new Set(); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#gravity - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.gravity = GetFastValue(config, 'gravity', 0); - - /** - * Spatial hash cell dimensions - * - * @name Phaser.Physics.Impact.World#cellSize - * @type {integer} - * @default 64 - * @since 3.0.0 - */ - this.cellSize = GetFastValue(config, 'cellSize', 64); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#collisionMap - * @type {Phaser.Physics.Impact.CollisionMap} - * @since 3.0.0 - */ - this.collisionMap = new CollisionMap(); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#timeScale - * @type {number} - * @default 1 - * @since 3.0.0 - */ - this.timeScale = GetFastValue(config, 'timeScale', 1); - - /** - * Impacts maximum time step is 20 fps. - * - * @name Phaser.Physics.Impact.World#maxStep - * @type {number} - * @default 0.05 - * @since 3.0.0 - */ - this.maxStep = GetFastValue(config, 'maxStep', 0.05); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#enabled - * @type {boolean} - * @default true - * @since 3.0.0 - */ - this.enabled = true; - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#drawDebug - * @type {boolean} - * @since 3.0.0 - */ - this.drawDebug = GetFastValue(config, 'debug', false); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#debugGraphic - * @type {Phaser.GameObjects.Graphics} - * @since 3.0.0 - */ - this.debugGraphic; - - var _maxVelocity = GetFastValue(config, 'maxVelocity', 100); - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#defaults - * @type {Phaser.Types.Physics.Impact.WorldDefaults} - * @since 3.0.0 - */ - this.defaults = { - debugShowBody: GetFastValue(config, 'debugShowBody', true), - debugShowVelocity: GetFastValue(config, 'debugShowVelocity', true), - bodyDebugColor: GetFastValue(config, 'debugBodyColor', 0xff00ff), - velocityDebugColor: GetFastValue(config, 'debugVelocityColor', 0x00ff00), - maxVelocityX: GetFastValue(config, 'maxVelocityX', _maxVelocity), - maxVelocityY: GetFastValue(config, 'maxVelocityY', _maxVelocity), - minBounceVelocity: GetFastValue(config, 'minBounceVelocity', 40), - gravityFactor: GetFastValue(config, 'gravityFactor', 1), - bounciness: GetFastValue(config, 'bounciness', 0) - }; - - /** - * An object containing the 4 wall bodies that bound the physics world. - * - * @name Phaser.Physics.Impact.World#walls - * @type {Phaser.Types.Physics.Impact.WorldWalls} - * @since 3.0.0 - */ - this.walls = { left: null, right: null, top: null, bottom: null }; - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#delta - * @type {number} - * @default 0 - * @since 3.0.0 - */ - this.delta = 0; - - /** - * [description] - * - * @name Phaser.Physics.Impact.World#_lastId - * @type {number} - * @private - * @default 0 - * @since 3.0.0 - */ - this._lastId = 0; - - 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); - } - } - - if (this.drawDebug) - { - this.createDebugGraphic(); - } - }, - - /** - * Sets the collision map for the world either from a Weltmeister JSON level in the cache or from - * a 2D array. If loading from a Weltmeister level, the map must have a layer called "collision". - * - * @method Phaser.Physics.Impact.World#setCollisionMap - * @since 3.0.0 - * - * @param {(string|integer[][])} key - Either a string key that corresponds to a Weltmeister level - * in the cache, or a 2D array of collision IDs. - * @param {integer} tileSize - The size of a tile. This is optional if loading from a Weltmeister - * level in the cache. - * - * @return {?Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap, or null if the method failed to - * create the CollisionMap. - */ - setCollisionMap: function (key, tileSize) - { - if (typeof key === 'string') - { - var tilemapData = this.scene.cache.tilemap.get(key); - - if (!tilemapData || tilemapData.format !== TILEMAP_FORMATS.WELTMEISTER) - { - console.warn('The specified key does not correspond to a Weltmeister tilemap: ' + key); - return null; - } - - var layers = tilemapData.data.layer; - var collisionLayer; - for (var i = 0; i < layers.length; i++) - { - if (layers[i].name === 'collision') - { - collisionLayer = layers[i]; - break; - } - } - - if (tileSize === undefined) { tileSize = collisionLayer.tilesize; } - - this.collisionMap = new CollisionMap(tileSize, collisionLayer.data); - } - else if (Array.isArray(key)) - { - this.collisionMap = new CollisionMap(tileSize, key); - } - else - { - console.warn('Invalid Weltmeister collision map data: ' + key); - } - - return this.collisionMap; - }, - - /** - * Sets the collision map for the world from a tilemap layer. Only tiles that are marked as - * colliding will be used. You can specify the mapping from tiles to slope IDs in a couple of - * ways. The easiest is to use Tiled and the slopeTileProperty option. Alternatively, you can - * manually create a slopeMap that stores the mapping between tile indices and slope IDs. - * - * @method Phaser.Physics.Impact.World#setCollisionMapFromTilemapLayer - * @since 3.0.0 - * - * @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemap layer to use. - * @param {Phaser.Types.Physics.Impact.CollisionOptions} [options] - Options for controlling the mapping from tiles to slope IDs. - * - * @return {Phaser.Physics.Impact.CollisionMap} The newly created CollisionMap. - */ - setCollisionMapFromTilemapLayer: function (tilemapLayer, options) - { - if (options === undefined) { options = {}; } - var slopeProperty = GetFastValue(options, 'slopeProperty', null); - var slopeMap = GetFastValue(options, 'slopeMap', null); - var collidingSlope = GetFastValue(options, 'defaultCollidingSlope', null); - var nonCollidingSlope = GetFastValue(options, 'defaultNonCollidingSlope', 0); - - var layerData = tilemapLayer.layer; - var tileSize = layerData.baseTileWidth; - var collisionData = []; - - for (var ty = 0; ty < layerData.height; ty++) - { - collisionData[ty] = []; - - for (var tx = 0; tx < layerData.width; tx++) - { - var tile = layerData.data[ty][tx]; - - if (tile && tile.collides) - { - if (slopeProperty !== null && HasValue(tile.properties, slopeProperty)) - { - collisionData[ty][tx] = parseInt(tile.properties[slopeProperty], 10); - } - else if (slopeMap !== null && HasValue(slopeMap, tile.index)) - { - collisionData[ty][tx] = slopeMap[tile.index]; - } - else if (collidingSlope !== null) - { - collisionData[ty][tx] = collidingSlope; - } - else - { - collisionData[ty][tx] = tile.index; - } - } - else - { - collisionData[ty][tx] = nonCollidingSlope; - } - } - } - - this.collisionMap = new CollisionMap(tileSize, collisionData); - - return this.collisionMap; - }, - - /** - * Sets the bounds of the Physics world to match the given world pixel dimensions. - * You can optionally set which 'walls' to create: left, right, top or bottom. - * If none of the walls are given it will default to use the walls settings it had previously. - * I.e. if you previously told it to not have the left or right walls, and you then adjust the world size - * the newly created bounds will also not have the left and right walls. - * Explicitly state them in the parameters to override this. - * - * @method Phaser.Physics.Impact.World#setBounds - * @since 3.0.0 - * - * @param {number} [x] - The x coordinate of the top-left corner of the bounds. - * @param {number} [y] - 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=64] - [description] - * @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. - * @param {boolean} [bottom=true] - If true will create the bottom bounds wall. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setBounds: function (x, y, width, height, thickness, left, right, top, bottom) - { - if (x === undefined) { x = 0; } - 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 = 64; } - if (left === undefined) { left = true; } - if (right === undefined) { right = true; } - if (top === undefined) { top = true; } - if (bottom === undefined) { bottom = true; } - - this.updateWall(left, 'left', x - thickness, y, thickness, height); - this.updateWall(right, 'right', x + width, y, thickness, height); - this.updateWall(top, 'top', x, y - thickness, width, thickness); - this.updateWall(bottom, 'bottom', x, y + height, width, thickness); - - return this; - }, - - /** - * position = 'left', 'right', 'top' or 'bottom' - * - * @method Phaser.Physics.Impact.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] - */ - updateWall: function (add, position, x, y, width, height) - { - var wall = this.walls[position]; - - if (add) - { - if (wall) - { - wall.resetSize(x, y, width, height); - } - else - { - this.walls[position] = this.create(x, y, width, height); - this.walls[position].name = position; - this.walls[position].gravityFactor = 0; - this.walls[position].collides = COLLIDES.FIXED; - } - } - else - { - if (wall) - { - this.bodies.remove(wall); - } - - this.walls[position] = null; - } - }, - - /** - * Creates a Graphics Game Object used for debug display and enables the world for debug drawing. - * - * @method Phaser.Physics.Impact.World#createDebugGraphic - * @since 3.0.0 - * - * @return {Phaser.GameObjects.Graphics} The Graphics object created that will have the debug visuals drawn to it. - */ - createDebugGraphic: function () - { - var graphic = this.scene.sys.add.graphics({ x: 0, y: 0 }); - - graphic.setDepth(Number.MAX_VALUE); - - this.debugGraphic = graphic; - - this.drawDebug = true; - - return graphic; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#getNextID - * @since 3.0.0 - * - * @return {integer} [description] - */ - getNextID: function () - { - return this._lastId++; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#create - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} sizeX - [description] - * @param {number} sizeY - [description] - * - * @return {Phaser.Physics.Impact.Body} The Body that was added to this World. - */ - create: function (x, y, sizeX, sizeY) - { - var body = new Body(this, x, y, sizeX, sizeY); - - this.bodies.set(body); - - return body; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#remove - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} object - The Body to remove from this World. - */ - remove: function (object) - { - this.bodies.delete(object); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#pause - * @fires Phaser.Physics.Impact.Events#PAUSE - * @since 3.0.0 - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - pause: function () - { - this.enabled = false; - - this.emit(Events.PAUSE); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#resume - * @fires Phaser.Physics.Impact.Events#RESUME - * @since 3.0.0 - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - resume: function () - { - this.enabled = true; - - this.emit(Events.RESUME); - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#update - * @since 3.0.0 - * - * @param {number} time - The current time. Either a High Resolution Timer value if it comes from Request Animation Frame, or Date.now if using SetTimeout. - * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - */ - update: function (time, delta) - { - if (!this.enabled || this.bodies.size === 0) - { - return; - } - - // Impact uses a divided delta value that is clamped to the maxStep (20fps) maximum - - var clampedDelta = Math.min(delta / 1000, this.maxStep) * this.timeScale; - - this.delta = clampedDelta; - - // Update all active bodies - - var i; - var body; - var bodies = this.bodies.entries; - var len = bodies.length; - var hash = {}; - var size = this.cellSize; - - for (i = 0; i < len; i++) - { - body = bodies[i]; - - if (body.enabled) - { - body.update(clampedDelta); - } - } - - // Run collision against them all now they're in the new positions from the update - - for (i = 0; i < len; i++) - { - body = bodies[i]; - - if (body && !body.skipHash()) - { - this.checkHash(body, hash, size); - } - } - - if (this.drawDebug) - { - var graphics = this.debugGraphic; - - graphics.clear(); - - for (i = 0; i < len; i++) - { - body = bodies[i]; - - if (body && body.willDrawDebug()) - { - body.drawDebug(graphics); - } - } - } - }, - - /** - * Check the body against the spatial hash. - * - * @method Phaser.Physics.Impact.World#checkHash - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} body - [description] - * @param {object} hash - [description] - * @param {number} size - [description] - */ - checkHash: function (body, hash, size) - { - var checked = {}; - - var xmin = Math.floor(body.pos.x / size); - var ymin = Math.floor(body.pos.y / size); - var xmax = Math.floor((body.pos.x + body.size.x) / size) + 1; - var ymax = Math.floor((body.pos.y + body.size.y) / size) + 1; - - for (var x = xmin; x < xmax; x++) - { - for (var y = ymin; y < ymax; y++) - { - if (!hash[x]) - { - hash[x] = {}; - hash[x][y] = [ body ]; - } - else if (!hash[x][y]) - { - hash[x][y] = [ body ]; - } - else - { - var cell = hash[x][y]; - - for (var c = 0; c < cell.length; c++) - { - if (body.touches(cell[c]) && !checked[cell[c].id]) - { - checked[cell[c].id] = true; - - this.checkBodies(body, cell[c]); - } - } - - cell.push(body); - } - } - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#checkBodies - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} bodyA - [description] - * @param {Phaser.Physics.Impact.Body} bodyB - [description] - */ - checkBodies: function (bodyA, bodyB) - { - // 2 fixed bodies won't do anything - if (bodyA.collides === COLLIDES.FIXED && bodyB.collides === COLLIDES.FIXED) - { - return; - } - - // bitwise checks - if (bodyA.checkAgainst & bodyB.type) - { - bodyA.check(bodyB); - } - - if (bodyB.checkAgainst & bodyA.type) - { - bodyB.check(bodyA); - } - - if (bodyA.collides && bodyB.collides && bodyA.collides + bodyB.collides > COLLIDES.ACTIVE) - { - Solver(this, bodyA, bodyB); - } - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setCollidesNever - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setCollidesNever: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.NEVER; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setLite - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setLite: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.LITE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setPassive - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setPassive: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.PASSIVE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setActive - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setActive: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.ACTIVE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setFixed - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the collides value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setFixed: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].collides = COLLIDES.FIXED; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setTypeNone - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setTypeNone: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.NONE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setTypeA - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setTypeA: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.A; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setTypeB - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setTypeB: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.B; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setAvsB - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setAvsB: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.A; - bodies[i].checkAgainst = TYPE.B; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setBvsA - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setBvsA: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].type = TYPE.B; - bodies[i].checkAgainst = TYPE.A; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setCheckAgainstNone - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setCheckAgainstNone: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].checkAgainst = TYPE.NONE; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setCheckAgainstA - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setCheckAgainstA: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].checkAgainst = TYPE.A; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#setCheckAgainstB - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body[]} bodies - An Array of Impact Bodies to set the type value on. - * - * @return {Phaser.Physics.Impact.World} This World object. - */ - setCheckAgainstB: function (bodies) - { - for (var i = 0; i < bodies.length; i++) - { - bodies[i].checkAgainst = TYPE.B; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#shutdown - * @since 3.0.0 - */ - shutdown: function () - { - this.removeAllListeners(); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.World#destroy - * @since 3.0.0 - */ - destroy: function () - { - this.removeAllListeners(); - - this.scene = null; - - this.bodies.clear(); - - this.bodies = null; - - this.collisionMap = null; - } - -}); - -module.exports = World; - - -/***/ }), -/* 1378 */ +/* 1381 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188629,7 +189279,7 @@ module.exports = BodyBounds; /***/ }), -/* 1379 */ +/* 1382 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -188640,16 +189290,16 @@ module.exports = BodyBounds; 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 Composites = __webpack_require__(1290); +var Constraint = __webpack_require__(219); +var Svg = __webpack_require__(1291); +var MatterGameObject = __webpack_require__(1393); +var MatterImage = __webpack_require__(1384); +var MatterSprite = __webpack_require__(1385); +var MatterTileBody = __webpack_require__(1295); +var PhysicsEditorParser = __webpack_require__(1292); +var PhysicsJSONParser = __webpack_require__(1293); +var PointerConstraint = __webpack_require__(1422); var Vertices = __webpack_require__(86); /** @@ -189559,7 +190209,7 @@ module.exports = Factory; /***/ }), -/* 1380 */ +/* 1383 */ /***/ (function(module, exports) { /** @@ -190229,7 +190879,7 @@ function points_eq(a,b,precision){ /***/ }), -/* 1381 */ +/* 1384 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190239,11 +190889,11 @@ function points_eq(a,b,precision){ */ var Class = __webpack_require__(0); -var Components = __webpack_require__(508); -var GameObject = __webpack_require__(14); +var Components = __webpack_require__(513); +var GameObject = __webpack_require__(13); var GetFastValue = __webpack_require__(2); -var Image = __webpack_require__(98); -var Pipeline = __webpack_require__(153); +var Image = __webpack_require__(107); +var Pipeline = __webpack_require__(156); var Vector2 = __webpack_require__(3); /** @@ -190365,7 +191015,7 @@ module.exports = MatterImage; /***/ }), -/* 1382 */ +/* 1385 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190374,13 +191024,13 @@ module.exports = MatterImage; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var AnimationComponent = __webpack_require__(498); +var AnimationComponent = __webpack_require__(503); var Class = __webpack_require__(0); -var Components = __webpack_require__(508); -var GameObject = __webpack_require__(14); +var Components = __webpack_require__(513); +var GameObject = __webpack_require__(13); var GetFastValue = __webpack_require__(2); -var Pipeline = __webpack_require__(153); -var Sprite = __webpack_require__(69); +var Pipeline = __webpack_require__(156); +var Sprite = __webpack_require__(75); var Vector2 = __webpack_require__(3); /** @@ -190507,7 +191157,7 @@ module.exports = MatterSprite; /***/ }), -/* 1383 */ +/* 1386 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190520,8 +191170,8 @@ var Matter = {}; module.exports = Matter; -var Plugin = __webpack_require__(1287); -var Common = __webpack_require__(37); +var Plugin = __webpack_require__(1297); +var Common = __webpack_require__(38); (function() { @@ -190599,7 +191249,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 1384 */ +/* 1387 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190614,9 +191264,9 @@ var Query = {}; module.exports = Query; -var Vector = __webpack_require__(101); -var SAT = __webpack_require__(510); -var Bounds = __webpack_require__(102); +var Vector = __webpack_require__(99); +var SAT = __webpack_require__(515); +var Bounds = __webpack_require__(100); var Bodies = __webpack_require__(109); var Vertices = __webpack_require__(86); @@ -190741,7 +191391,7 @@ var Vertices = __webpack_require__(86); /***/ }), -/* 1385 */ +/* 1388 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -190758,16 +191408,16 @@ var Engine = {}; module.exports = Engine; -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 World = __webpack_require__(1298); +var Sleeping = __webpack_require__(239); +var Resolver = __webpack_require__(1301); +var Pairs = __webpack_require__(1300); +var Metrics = __webpack_require__(1423); +var Grid = __webpack_require__(1299); +var Events = __webpack_require__(240); +var Composite = __webpack_require__(148); +var Constraint = __webpack_require__(219); +var Common = __webpack_require__(38); var Body = __webpack_require__(62); (function() { @@ -191234,7 +191884,7 @@ var Body = __webpack_require__(62); /***/ }), -/* 1386 */ +/* 1389 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -191246,18 +191896,18 @@ var Body = __webpack_require__(62); var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); var Class = __webpack_require__(0); -var Common = __webpack_require__(37); -var Composite = __webpack_require__(145); -var Engine = __webpack_require__(1385); -var EventEmitter = __webpack_require__(9); -var Events = __webpack_require__(1284); +var Common = __webpack_require__(38); +var Composite = __webpack_require__(148); +var Engine = __webpack_require__(1388); +var EventEmitter = __webpack_require__(10); +var Events = __webpack_require__(1294); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); var MatterBody = __webpack_require__(62); -var MatterEvents = __webpack_require__(237); -var MatterTileBody = __webpack_require__(1285); -var MatterWorld = __webpack_require__(1288); -var Vector = __webpack_require__(101); +var MatterEvents = __webpack_require__(240); +var MatterTileBody = __webpack_require__(1295); +var MatterWorld = __webpack_require__(1298); +var Vector = __webpack_require__(99); /** * @classdesc @@ -193455,7 +194105,7 @@ module.exports = World; /***/ }), -/* 1387 */ +/* 1390 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(global) {/** @@ -193464,10 +194114,10 @@ module.exports = World; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -__webpack_require__(512); +__webpack_require__(517); -var CONST = __webpack_require__(29); -var Extend = __webpack_require__(17); +var CONST = __webpack_require__(33); +var Extend = __webpack_require__(18); /** * @namespace Phaser @@ -193475,38 +194125,38 @@ var Extend = __webpack_require__(17); var Phaser = { - Actions: __webpack_require__(238), - Animations: __webpack_require__(632), + Actions: __webpack_require__(241), + Animations: __webpack_require__(637), BlendModes: __webpack_require__(52), - Cache: __webpack_require__(633), - Cameras: __webpack_require__(636), - Core: __webpack_require__(719), + Cache: __webpack_require__(638), + Cameras: __webpack_require__(641), + Core: __webpack_require__(727), Class: __webpack_require__(0), - 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) + Create: __webpack_require__(788), + Curves: __webpack_require__(794), + Data: __webpack_require__(797), + Display: __webpack_require__(799), + DOM: __webpack_require__(816), + Events: __webpack_require__(817), + Game: __webpack_require__(819), + GameObjects: __webpack_require__(912), + Geom: __webpack_require__(429), + Input: __webpack_require__(1199), + Loader: __webpack_require__(1233), + Math: __webpack_require__(170), + Physics: __webpack_require__(1391), + Plugins: __webpack_require__(1302), + Renderer: __webpack_require__(1428), + Scale: __webpack_require__(1304), + ScaleModes: __webpack_require__(234), + Scene: __webpack_require__(373), + Scenes: __webpack_require__(1305), + Structs: __webpack_require__(1307), + Textures: __webpack_require__(1308), + Tilemaps: __webpack_require__(1310), + Time: __webpack_require__(1351), + Tweens: __webpack_require__(1353), + Utils: __webpack_require__(1370) }; @@ -193514,7 +194164,7 @@ var Phaser = { if (true) { - Phaser.Sound = __webpack_require__(1370); + Phaser.Sound = __webpack_require__(1380); } if (false) @@ -193546,10 +194196,10 @@ global.Phaser = Phaser; * -- Dick Brandon */ -/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(511))) +/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(516))) /***/ }), -/* 1388 */ +/* 1391 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -193568,1869 +194218,14 @@ global.Phaser = Phaser; module.exports = { - Arcade: __webpack_require__(1247), - Impact: __webpack_require__(1389), - Matter: __webpack_require__(1412) + Arcade: __webpack_require__(1259), + Matter: __webpack_require__(1392) }; -/***/ }), -/* 1389 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * An Impact.js compatible physics world, body and solver, for those who are used - * to the Impact way of defining and controlling physics bodies. Also works with - * the new Loader support for Weltmeister map data. - * - * World updated to run off the Phaser main loop. - * Body extended to support additional setter functions. - * - * To create the map data you'll need Weltmeister, which comes with Impact - * and can be purchased from http://impactjs.com - * - * My thanks to Dominic Szablewski for his permission to support Impact in Phaser. - * - * @namespace Phaser.Physics.Impact - */ -module.exports = { - - 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) - -}; - - -/***/ }), -/* 1390 */ -/***/ (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); - -/** - * [description] - * - * @function Phaser.Physics.Impact.GetVelocity - * @since 3.0.0 - * - * @param {number} delta - The delta time in ms since the last frame. This is a smoothed and capped value based on the FPS rate. - * @param {number} vel - [description] - * @param {number} accel - [description] - * @param {number} friction - [description] - * @param {number} max - [description] - * - * @return {number} [description] - */ -var GetVelocity = function (delta, vel, accel, friction, max) -{ - if (accel) - { - return Clamp(vel + accel * delta, -max, max); - } - else if (friction) - { - var frictionDelta = friction * delta; - - if (vel - frictionDelta > 0) - { - return vel - frictionDelta; - } - else if (vel + frictionDelta < 0) - { - return vel + frictionDelta; - } - else - { - return 0; - } - } - - return Clamp(vel, -max, max); -}; - -module.exports = GetVelocity; - - -/***/ }), -/* 1391 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * Set up the trace-result - * var res = { - * collision: {x: false, y: false, slope: false}, - * pos: {x: x, y: y}, - * tile: {x: 0, y: 0} - * }; - * - * @function Phaser.Physics.Impact.UpdateMotion - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} body - [description] - * @param {object} res - [description] - */ -var UpdateMotion = function (body, res) -{ - body.standing = false; - - // Y - if (res.collision.y) - { - if (body.bounciness > 0 && Math.abs(body.vel.y) > body.minBounceVelocity) - { - body.vel.y *= -body.bounciness; - } - else - { - if (body.vel.y > 0) - { - body.standing = true; - } - - body.vel.y = 0; - } - } - - // X - if (res.collision.x) - { - if (body.bounciness > 0 && Math.abs(body.vel.x) > body.minBounceVelocity) - { - body.vel.x *= -body.bounciness; - } - else - { - body.vel.x = 0; - } - } - - // SLOPE - if (res.collision.slope) - { - var s = res.collision.slope; - - if (body.bounciness > 0) - { - var proj = body.vel.x * s.nx + body.vel.y * s.ny; - - body.vel.x = (body.vel.x - s.nx * proj * 2) * body.bounciness; - body.vel.y = (body.vel.y - s.ny * proj * 2) * body.bounciness; - } - else - { - var lengthSquared = s.x * s.x + s.y * s.y; - var dot = (body.vel.x * s.x + body.vel.y * s.y) / lengthSquared; - - body.vel.x = s.x * dot; - body.vel.y = s.y * dot; - - var angle = Math.atan2(s.x, s.y); - - if (angle > body.slopeStanding.min && angle < body.slopeStanding.max) - { - body.standing = true; - } - } - } - - body.pos.x = res.pos.x; - body.pos.y = res.pos.y; -}; - -module.exports = UpdateMotion; - - /***/ }), /* 1392 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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)`. - * - * @event Phaser.Physics.Impact.Events#COLLIDE - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.Body} bodyA - The first body involved in the collision. - * @param {Phaser.Physics.Impact.Body} bodyB - The second body involved in the collision. - * @param {string} axis - The collision axis. Either `x` or `y`. - */ -module.exports = 'collide'; - - -/***/ }), -/* 1393 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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)`. - * - * @event Phaser.Physics.Impact.Events#PAUSE - * @since 3.0.0 - */ -module.exports = 'pause'; - - -/***/ }), -/* 1394 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * 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)`. - * - * @event Phaser.Physics.Impact.Events#RESUME - * @since 3.0.0 - */ -module.exports = 'resume'; - - -/***/ }), -/* 1395 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var H = 0.5; -var N = 1 / 3; -var M = 2 / 3; - -// Tile ID to Slope defs. -// First 4 elements = line data, final = solid or non-solid behind the line - -module.exports = { - - 2: [ 0, 1, 1, 0, true ], - 3: [ 0, 1, 1, H, true ], - 4: [ 0, H, 1, 0, true ], - 5: [ 0, 1, 1, M, true ], - 6: [ 0, M, 1, N, true ], - 7: [ 0, N, 1, 0, true ], - 8: [ H, 1, 0, 0, true ], - 9: [ 1, 0, H, 1, true ], - 10: [ H, 1, 1, 0, true ], - 11: [ 0, 0, H, 1, true ], - 12: [ 0, 0, 1, 0, false ], - 13: [ 1, 1, 0, 0, true ], - 14: [ 1, H, 0, 0, true ], - 15: [ 1, 1, 0, H, true ], - 16: [ 1, N, 0, 0, true ], - 17: [ 1, M, 0, N, true ], - 18: [ 1, 1, 0, M, true ], - 19: [ 1, 1, H, 0, true ], - 20: [ H, 0, 0, 1, true ], - 21: [ 0, 1, H, 0, true ], - 22: [ H, 0, 1, 1, true ], - 23: [ 1, 1, 0, 1, false ], - 24: [ 0, 0, 1, 1, true ], - 25: [ 0, 0, 1, H, true ], - 26: [ 0, H, 1, 1, true ], - 27: [ 0, 0, 1, N, true ], - 28: [ 0, N, 1, M, true ], - 29: [ 0, M, 1, 1, true ], - 30: [ N, 1, 0, 0, true ], - 31: [ 1, 0, M, 1, true ], - 32: [ M, 1, 1, 0, true ], - 33: [ 0, 0, N, 1, true ], - 34: [ 1, 0, 1, 1, false ], - 35: [ 1, 0, 0, 1, true ], - 36: [ 1, H, 0, 1, true ], - 37: [ 1, 0, 0, H, true ], - 38: [ 1, M, 0, 1, true ], - 39: [ 1, N, 0, M, true ], - 40: [ 1, 0, 0, N, true ], - 41: [ M, 1, N, 0, true ], - 42: [ M, 0, N, 1, true ], - 43: [ N, 1, M, 0, true ], - 44: [ N, 0, M, 1, true ], - 45: [ 0, 1, 0, 0, false ], - 52: [ 1, 1, M, 0, true ], - 53: [ N, 0, 0, 1, true ], - 54: [ 0, 1, N, 0, true ], - 55: [ M, 0, 1, 1, true ] - -}; - - -/***/ }), -/* 1396 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Acceleration component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Acceleration - * @since 3.0.0 - */ -var Acceleration = { - - /** - * Sets the horizontal acceleration of this body. - * - * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationX - * @since 3.0.0 - * - * @param {number} x - The amount of acceleration to apply. - * - * @return {this} This Game Object. - */ - setAccelerationX: function (x) - { - this.accel.x = x; - - return this; - }, - - /** - * Sets the vertical acceleration of this body. - * - * @method Phaser.Physics.Impact.Components.Acceleration#setAccelerationY - * @since 3.0.0 - * - * @param {number} y - The amount of acceleration to apply. - * - * @return {this} This Game Object. - */ - setAccelerationY: function (y) - { - this.accel.y = y; - - return this; - }, - - /** - * Sets the horizontal and vertical acceleration of this body. - * - * @method Phaser.Physics.Impact.Components.Acceleration#setAcceleration - * @since 3.0.0 - * - * @param {number} x - The amount of horizontal acceleration to apply. - * @param {number} y - The amount of vertical acceleration to apply. - * - * @return {this} This Game Object. - */ - setAcceleration: function (x, y) - { - this.accel.x = x; - this.accel.y = y; - - return this; - } - -}; - -module.exports = Acceleration; - - -/***/ }), -/* 1397 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Body Scale component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.BodyScale - * @since 3.0.0 - */ -var BodyScale = { - - /** - * Sets the size of the physics body. - * - * @method Phaser.Physics.Impact.Components.BodyScale#setBodySize - * @since 3.0.0 - * - * @param {number} width - The width of the body in pixels. - * @param {number} [height=width] - The height of the body in pixels. - * - * @return {this} This Game Object. - */ - setBodySize: function (width, height) - { - if (height === undefined) { height = width; } - - this.body.size.x = Math.round(width); - this.body.size.y = Math.round(height); - - return this; - }, - - /** - * Sets the scale of the physics body. - * - * @method Phaser.Physics.Impact.Components.BodyScale#setBodyScale - * @since 3.0.0 - * - * @param {number} scaleX - The horizontal scale of the body. - * @param {number} [scaleY] - The vertical scale of the body. If not given, will use the horizontal scale value. - * - * @return {this} This Game Object. - */ - setBodyScale: function (scaleX, scaleY) - { - if (scaleY === undefined) { scaleY = scaleX; } - - var gameObject = this.body.gameObject; - - if (gameObject) - { - gameObject.setScale(scaleX, scaleY); - - return this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY); - } - else - { - return this.setBodySize(this.body.size.x * scaleX, this.body.size.y * scaleY); - } - } - -}; - -module.exports = BodyScale; - - -/***/ }), -/* 1398 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var TYPE = __webpack_require__(466); - -/** - * The Impact Body Type component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.BodyType - * @since 3.0.0 - */ -var BodyType = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.BodyType#getBodyType - * @since 3.0.0 - * - * @return {number} [description] - */ - getBodyType: function () - { - return this.body.type; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.BodyType#setTypeNone - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setTypeNone: function () - { - this.body.type = TYPE.NONE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.BodyType#setTypeA - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setTypeA: function () - { - this.body.type = TYPE.A; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.BodyType#setTypeB - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setTypeB: function () - { - this.body.type = TYPE.B; - - return this; - } - -}; - -module.exports = BodyType; - - -/***/ }), -/* 1399 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Bounce component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Bounce - * @since 3.0.0 - */ -var Bounce = { - - /** - * Sets the impact physics bounce, or restitution, value. - * - * @method Phaser.Physics.Impact.Components.Bounce#setBounce - * @since 3.0.0 - * - * @param {number} value - A value between 0 (no rebound) and 1 (full rebound) - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setBounce: function (value) - { - this.body.bounciness = value; - - return this; - }, - - /** - * Sets the minimum velocity the body is allowed to be moving to be considered for rebound. - * - * @method Phaser.Physics.Impact.Components.Bounce#setMinBounceVelocity - * @since 3.0.0 - * - * @param {number} value - The minimum allowed velocity. - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setMinBounceVelocity: function (value) - { - this.body.minBounceVelocity = value; - - return this; - }, - - /** - * The bounce, or restitution, value of this body. - * A value between 0 (no rebound) and 1 (full rebound) - * - * @name Phaser.Physics.Impact.Components.Bounce#bounce - * @type {number} - * @since 3.0.0 - */ - bounce: { - - get: function () - { - return this.body.bounciness; - }, - - set: function (value) - { - this.body.bounciness = value; - } - - } - -}; - -module.exports = Bounce; - - -/***/ }), -/* 1400 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var TYPE = __webpack_require__(466); - -/** - * The Impact Check Against component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.CheckAgainst - * @since 3.0.0 - */ -var CheckAgainst = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setAvsB - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setAvsB: function () - { - this.setTypeA(); - - return this.setCheckAgainstB(); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setBvsA - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setBvsA: function () - { - this.setTypeB(); - - return this.setCheckAgainstA(); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstNone - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCheckAgainstNone: function () - { - this.body.checkAgainst = TYPE.NONE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstA - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCheckAgainstA: function () - { - this.body.checkAgainst = TYPE.A; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.CheckAgainst#setCheckAgainstB - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCheckAgainstB: function () - { - this.body.checkAgainst = TYPE.B; - - return this; - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.CheckAgainst#checkAgainst - * @type {number} - * @since 3.0.0 - */ - checkAgainst: { - - get: function () - { - return this.body.checkAgainst; - }, - - set: function (value) - { - this.body.checkAgainst = value; - } - - } - -}; - -module.exports = CheckAgainst; - - -/***/ }), -/* 1401 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var COLLIDES = __webpack_require__(465); - -/** - * @callback CollideCallback - * - * @param {Phaser.Physics.Impact.Body} body - [description] - * @param {Phaser.Physics.Impact.Body} other - [description] - * @param {string} axis - [description] - */ - -/** - * The Impact Collides component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Collides - * @since 3.0.0 - */ -var Collides = { - - _collideCallback: null, - _callbackScope: null, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setCollideCallback - * @since 3.0.0 - * - * @param {CollideCallback} callback - [description] - * @param {*} scope - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCollideCallback: function (callback, scope) - { - this._collideCallback = callback; - - if (scope) - { - this._callbackScope = scope; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setCollidesNever - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setCollidesNever: function () - { - this.body.collides = COLLIDES.NEVER; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setLiteCollision - * @since 3.6.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setLiteCollision: function () - { - this.body.collides = COLLIDES.LITE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setPassiveCollision - * @since 3.6.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setPassiveCollision: function () - { - this.body.collides = COLLIDES.PASSIVE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setActiveCollision - * @since 3.6.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setActiveCollision: function () - { - this.body.collides = COLLIDES.ACTIVE; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Collides#setFixedCollision - * @since 3.6.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setFixedCollision: function () - { - this.body.collides = COLLIDES.FIXED; - - return this; - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Collides#collides - * @type {number} - * @since 3.0.0 - */ - collides: { - - get: function () - { - return this.body.collides; - }, - - set: function (value) - { - this.body.collides = value; - } - - } - -}; - -module.exports = Collides; - - -/***/ }), -/* 1402 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Debug component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Debug - * @since 3.0.0 - */ -var Debug = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Debug#setDebug - * @since 3.0.0 - * - * @param {boolean} showBody - [description] - * @param {boolean} showVelocity - [description] - * @param {number} bodyColor - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setDebug: function (showBody, showVelocity, bodyColor) - { - this.debugShowBody = showBody; - this.debugShowVelocity = showVelocity; - this.debugBodyColor = bodyColor; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Debug#setDebugBodyColor - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setDebugBodyColor: function (value) - { - this.body.debugBodyColor = value; - - return this; - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Debug#debugShowBody - * @type {boolean} - * @since 3.0.0 - */ - debugShowBody: { - - get: function () - { - return this.body.debugShowBody; - }, - - set: function (value) - { - this.body.debugShowBody = value; - } - - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Debug#debugShowVelocity - * @type {boolean} - * @since 3.0.0 - */ - debugShowVelocity: { - - get: function () - { - return this.body.debugShowVelocity; - }, - - set: function (value) - { - this.body.debugShowVelocity = value; - } - - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Debug#debugBodyColor - * @type {number} - * @since 3.0.0 - */ - debugBodyColor: { - - get: function () - { - return this.body.debugBodyColor; - }, - - set: function (value) - { - this.body.debugBodyColor = value; - } - - } - -}; - -module.exports = Debug; - - -/***/ }), -/* 1403 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Friction component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Friction - * @since 3.0.0 - */ -var Friction = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Friction#setFrictionX - * @since 3.0.0 - * - * @param {number} x - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setFrictionX: function (x) - { - this.friction.x = x; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Friction#setFrictionY - * @since 3.0.0 - * - * @param {number} y - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setFrictionY: function (y) - { - this.friction.y = y; - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Friction#setFriction - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setFriction: function (x, y) - { - this.friction.x = x; - this.friction.y = y; - - return this; - } - -}; - -module.exports = Friction; - - -/***/ }), -/* 1404 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Gravity component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Gravity - * @since 3.0.0 - */ -var Gravity = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Gravity#setGravity - * @since 3.0.0 - * - * @param {number} value - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setGravity: function (value) - { - this.body.gravityFactor = value; - - return this; - }, - - /** - * [description] - * - * @name Phaser.Physics.Impact.Components.Gravity#gravity - * @type {number} - * @since 3.0.0 - */ - gravity: { - - get: function () - { - return this.body.gravityFactor; - }, - - set: function (value) - { - this.body.gravityFactor = value; - } - - } - -}; - -module.exports = Gravity; - - -/***/ }), -/* 1405 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Offset component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Offset - * @since 3.0.0 - */ -var Offset = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.Offset#setOffset - * @since 3.0.0 - * - * @param {number} x - [description] - * @param {number} y - [description] - * @param {number} [width] - [description] - * @param {number} [height] - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setOffset: function (x, y, width, height) - { - this.body.offset.x = x; - this.body.offset.y = y; - - if (width) - { - this.setBodySize(width, height); - } - - return this; - } - -}; - -module.exports = Offset; - - -/***/ }), -/* 1406 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Set Game Object component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.SetGameObject - * @since 3.0.0 - */ -var SetGameObject = { - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.SetGameObject#setGameObject - * @since 3.0.0 - * - * @param {Phaser.GameObjects.GameObject} gameObject - [description] - * @param {boolean} [sync=true] - [description] - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - setGameObject: function (gameObject, sync) - { - if (sync === undefined) { sync = true; } - - if (gameObject) - { - this.body.gameObject = gameObject; - - if (sync) - { - this.syncGameObject(); - } - } - else - { - this.body.gameObject = null; - } - - return this; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.Components.SetGameObject#syncGameObject - * @since 3.0.0 - * - * @return {Phaser.GameObjects.GameObject} This Game Object. - */ - syncGameObject: function () - { - var gameObject = this.body.gameObject; - - if (gameObject) - { - this.setBodySize(gameObject.width * gameObject.scaleX, gameObject.height * gameObject.scaleY); - } - - return this; - } - -}; - -module.exports = SetGameObject; - - -/***/ }), -/* 1407 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * The Impact Velocity component. - * Should be applied as a mixin. - * - * @namespace Phaser.Physics.Impact.Components.Velocity - * @since 3.0.0 - */ -var Velocity = { - - /** - * Sets the horizontal velocity of the physics body. - * - * @method Phaser.Physics.Impact.Components.Velocity#setVelocityX - * @since 3.0.0 - * - * @param {number} x - The horizontal velocity value. - * - * @return {this} This Game Object. - */ - setVelocityX: function (x) - { - this.vel.x = x; - - return this; - }, - - /** - * Sets the vertical velocity of the physics body. - * - * @method Phaser.Physics.Impact.Components.Velocity#setVelocityY - * @since 3.0.0 - * - * @param {number} y - The vertical velocity value. - * - * @return {this} This Game Object. - */ - setVelocityY: function (y) - { - this.vel.y = y; - - return this; - }, - - /** - * Sets the horizontal and vertical velocities of the physics body. - * - * @method Phaser.Physics.Impact.Components.Velocity#setVelocity - * @since 3.0.0 - * - * @param {number} x - The horizontal velocity value. - * @param {number} [y=x] - The vertical velocity value. If not given, defaults to the horizontal value. - * - * @return {this} This Game Object. - */ - setVelocity: function (x, y) - { - if (y === undefined) { y = x; } - - this.vel.x = x; - this.vel.y = y; - - return this; - }, - - /** - * Sets the maximum velocity this body can travel at. - * - * @method Phaser.Physics.Impact.Components.Velocity#setMaxVelocity - * @since 3.0.0 - * - * @param {number} x - The maximum allowed horizontal velocity. - * @param {number} [y=x] - The maximum allowed vertical velocity. If not given, defaults to the horizontal value. - * - * @return {this} This Game Object. - */ - setMaxVelocity: function (x, y) - { - if (y === undefined) { y = x; } - - this.maxVel.x = x; - this.maxVel.y = y; - - return this; - } - -}; - -module.exports = Velocity; - - -/***/ }), -/* 1408 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var Class = __webpack_require__(0); -var Factory = __webpack_require__(1373); -var GetFastValue = __webpack_require__(2); -var Merge = __webpack_require__(107); -var PluginCache = __webpack_require__(23); -var SceneEvents = __webpack_require__(19); -var World = __webpack_require__(1377); - -/** - * @classdesc - * [description] - * - * @class ImpactPhysics - * @memberof Phaser.Physics.Impact - * @constructor - * @since 3.0.0 - * - * @param {Phaser.Scene} scene - [description] - */ -var ImpactPhysics = new Class({ - - initialize: - - function ImpactPhysics (scene) - { - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#scene - * @type {Phaser.Scene} - * @since 3.0.0 - */ - this.scene = scene; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#systems - * @type {Phaser.Scenes.Systems} - * @since 3.0.0 - */ - this.systems = scene.sys; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#config - * @type {object} - * @since 3.0.0 - */ - this.config = this.getConfig(); - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#world - * @type {Phaser.Physics.Impact.World} - * @since 3.0.0 - */ - this.world; - - /** - * [description] - * - * @name Phaser.Physics.Impact.ImpactPhysics#add - * @type {Phaser.Physics.Impact.Factory} - * @since 3.0.0 - */ - this.add; - - scene.sys.events.once(SceneEvents.BOOT, this.boot, this); - scene.sys.events.on(SceneEvents.START, this.start, this); - }, - - /** - * This method is called automatically, only once, when the Scene is first created. - * Do not invoke it directly. - * - * @method Phaser.Physics.Impact.ImpactPhysics#boot - * @private - * @since 3.5.1 - */ - boot: function () - { - this.world = new World(this.scene, this.config); - this.add = new Factory(this.world); - - this.systems.events.once(SceneEvents.DESTROY, this.destroy, this); - }, - - /** - * This method is called automatically by the Scene when it is starting up. - * It is responsible for creating local systems, properties and listening for Scene events. - * Do not invoke it directly. - * - * @method Phaser.Physics.Impact.ImpactPhysics#start - * @private - * @since 3.5.0 - */ - start: function () - { - if (!this.world) - { - this.world = new World(this.scene, this.config); - this.add = new Factory(this.world); - } - - var eventEmitter = this.systems.events; - - eventEmitter.on(SceneEvents.UPDATE, this.world.update, this.world); - eventEmitter.once(SceneEvents.SHUTDOWN, this.shutdown, this); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.ImpactPhysics#getConfig - * @since 3.0.0 - * - * @return {object} [description] - */ - getConfig: function () - { - var gameConfig = this.systems.game.config.physics; - var sceneConfig = this.systems.settings.physics; - - var config = Merge( - GetFastValue(sceneConfig, 'impact', {}), - GetFastValue(gameConfig, 'impact', {}) - ); - - return config; - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.ImpactPhysics#pause - * @since 3.0.0 - * - * @return {Phaser.Physics.Impact.World} The Impact World object. - */ - pause: function () - { - return this.world.pause(); - }, - - /** - * [description] - * - * @method Phaser.Physics.Impact.ImpactPhysics#resume - * @since 3.0.0 - * - * @return {Phaser.Physics.Impact.World} The Impact World object. - */ - resume: function () - { - return this.world.resume(); - }, - - /** - * 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. - * - * @method Phaser.Physics.Impact.ImpactPhysics#shutdown - * @private - * @since 3.0.0 - */ - shutdown: function () - { - var eventEmitter = this.systems.events; - - eventEmitter.off(SceneEvents.UPDATE, this.world.update, this.world); - eventEmitter.off(SceneEvents.SHUTDOWN, this.shutdown, this); - - this.add.destroy(); - this.world.destroy(); - - this.add = null; - this.world = null; - }, - - /** - * The Scene that owns this plugin is being destroyed. - * We need to shutdown and then kill off all external references. - * - * @method Phaser.Physics.Impact.ImpactPhysics#destroy - * @private - * @since 3.0.0 - */ - destroy: function () - { - this.shutdown(); - - this.scene.sys.events.off(SceneEvents.START, this.start, this); - - this.scene = null; - this.systems = null; - } - -}); - -PluginCache.register('ImpactPhysics', ImpactPhysics, 'impactPhysics'); - -module.exports = ImpactPhysics; - - -/***/ }), -/* 1409 */ -/***/ (function(module, exports, __webpack_require__) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -var COLLIDES = __webpack_require__(465); -var Events = __webpack_require__(1278); -var SeparateX = __webpack_require__(1410); -var SeparateY = __webpack_require__(1411); - -/** - * Impact Physics Solver - * - * @function Phaser.Physics.Impact.Solver - * @fires Phaser.Physics.Impact.Events#COLLIDE - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - The Impact simulation to run the solver in. - * @param {Phaser.Physics.Impact.Body} bodyA - The first body in the collision. - * @param {Phaser.Physics.Impact.Body} bodyB - The second body in the collision. - */ -var Solver = function (world, bodyA, bodyB) -{ - var weak = null; - - if (bodyA.collides === COLLIDES.LITE || bodyB.collides === COLLIDES.FIXED) - { - weak = bodyA; - } - else if (bodyB.collides === COLLIDES.LITE || bodyA.collides === COLLIDES.FIXED) - { - weak = bodyB; - } - - if (bodyA.last.x + bodyA.size.x > bodyB.last.x && bodyA.last.x < bodyB.last.x + bodyB.size.x) - { - if (bodyA.last.y < bodyB.last.y) - { - SeparateY(world, bodyA, bodyB, weak); - } - else - { - SeparateY(world, bodyB, bodyA, weak); - } - - bodyA.collideWith(bodyB, 'y'); - bodyB.collideWith(bodyA, 'y'); - - world.emit(Events.COLLIDE, bodyA, bodyB, 'y'); - } - else if (bodyA.last.y + bodyA.size.y > bodyB.last.y && bodyA.last.y < bodyB.last.y + bodyB.size.y) - { - if (bodyA.last.x < bodyB.last.x) - { - SeparateX(world, bodyA, bodyB, weak); - } - else - { - SeparateX(world, bodyB, bodyA, weak); - } - - bodyA.collideWith(bodyB, 'x'); - bodyB.collideWith(bodyA, 'x'); - - world.emit(Events.COLLIDE, bodyA, bodyB, 'x'); - } -}; - -module.exports = Solver; - - -/***/ }), -/* 1410 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Physics.Impact.SeparateX - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @param {Phaser.Physics.Impact.Body} left - [description] - * @param {Phaser.Physics.Impact.Body} right - [description] - * @param {Phaser.Physics.Impact.Body} [weak] - [description] - */ -var SeparateX = function (world, left, right, weak) -{ - var nudge = left.pos.x + left.size.x - right.pos.x; - - // We have a weak entity, so just move this one - if (weak) - { - var strong = (left === weak) ? right : left; - - weak.vel.x = -weak.vel.x * weak.bounciness + strong.vel.x; - - var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, weak === left ? -nudge : nudge, 0, weak.size.x, weak.size.y); - - weak.pos.x = resWeak.pos.x; - } - else - { - var v2 = (left.vel.x - right.vel.x) / 2; - - left.vel.x = -v2; - right.vel.x = v2; - - var resLeft = world.collisionMap.trace(left.pos.x, left.pos.y, -nudge / 2, 0, left.size.x, left.size.y); - - left.pos.x = Math.floor(resLeft.pos.x); - - var resRight = world.collisionMap.trace(right.pos.x, right.pos.y, nudge / 2, 0, right.size.x, right.size.y); - - right.pos.x = Math.ceil(resRight.pos.x); - } -}; - -module.exports = SeparateX; - - -/***/ }), -/* 1411 */ -/***/ (function(module, exports) { - -/** - * @author Richard Davey - * @copyright 2020 Photon Storm Ltd. - * @license {@link https://opensource.org/licenses/MIT|MIT License} - */ - -/** - * [description] - * - * @function Phaser.Physics.Impact.SeparateY - * @since 3.0.0 - * - * @param {Phaser.Physics.Impact.World} world - [description] - * @param {Phaser.Physics.Impact.Body} top - [description] - * @param {Phaser.Physics.Impact.Body} bottom - [description] - * @param {Phaser.Physics.Impact.Body} [weak] - [description] - */ -var SeparateY = function (world, top, bottom, weak) -{ - var nudge = (top.pos.y + top.size.y - bottom.pos.y); - var nudgeX; - var resTop; - - if (weak) - { - var strong = (top === weak) ? bottom : top; - - weak.vel.y = -weak.vel.y * weak.bounciness + strong.vel.y; - - // Riding on a platform? - nudgeX = 0; - - if (weak === top && Math.abs(weak.vel.y - strong.vel.y) < weak.minBounceVelocity) - { - weak.standing = true; - nudgeX = strong.vel.x * world.delta; - } - - var resWeak = world.collisionMap.trace(weak.pos.x, weak.pos.y, nudgeX, weak === top ? -nudge : nudge, weak.size.x, weak.size.y); - - weak.pos.y = resWeak.pos.y; - weak.pos.x = resWeak.pos.x; - } - else if (world.gravity && (bottom.standing || top.vel.y > 0)) - { - resTop = world.collisionMap.trace(top.pos.x, top.pos.y, 0, -(top.pos.y + top.size.y - bottom.pos.y), top.size.x, top.size.y); - - top.pos.y = resTop.pos.y; - - if (top.bounciness > 0 && top.vel.y > top.minBounceVelocity) - { - top.vel.y *= -top.bounciness; - } - else - { - top.standing = true; - top.vel.y = 0; - } - } - else - { - var v2 = (top.vel.y - bottom.vel.y) / 2; - - top.vel.y = -v2; - bottom.vel.y = v2; - - nudgeX = bottom.vel.x * world.delta; - - resTop = world.collisionMap.trace(top.pos.x, top.pos.y, nudgeX, -nudge / 2, top.size.x, top.size.y); - - top.pos.y = resTop.pos.y; - - var resBottom = world.collisionMap.trace(bottom.pos.x, bottom.pos.y, 0, nudge / 2, bottom.size.x, bottom.size.y); - - bottom.pos.y = resBottom.pos.y; - } -}; - -module.exports = SeparateY; - - -/***/ }), -/* 1412 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195445,23 +194240,23 @@ module.exports = SeparateY; module.exports = { - 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) + BodyBounds: __webpack_require__(1381), + Factory: __webpack_require__(1382), + Image: __webpack_require__(1384), + Matter: __webpack_require__(1296), + MatterPhysics: __webpack_require__(1424), + PolyDecomp: __webpack_require__(1383), + Sprite: __webpack_require__(1385), + TileBody: __webpack_require__(1295), + PhysicsEditorParser: __webpack_require__(1292), + PhysicsJSONParser: __webpack_require__(1293), + World: __webpack_require__(1389) }; /***/ }), -/* 1413 */ +/* 1393 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195470,7 +194265,7 @@ module.exports = { * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Components = __webpack_require__(508); +var Components = __webpack_require__(513); var GetFastValue = __webpack_require__(2); var Vector2 = __webpack_require__(3); @@ -195587,7 +194382,7 @@ module.exports = MatterGameObject; /***/ }), -/* 1414 */ +/* 1394 */ /***/ (function(module, exports) { /** @@ -195627,7 +194422,7 @@ module.exports = Bounce; /***/ }), -/* 1415 */ +/* 1395 */ /***/ (function(module, exports) { /** @@ -195813,7 +194608,7 @@ module.exports = Collision; /***/ }), -/* 1416 */ +/* 1396 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -195969,7 +194764,7 @@ module.exports = Force; /***/ }), -/* 1417 */ +/* 1397 */ /***/ (function(module, exports) { /** @@ -196059,7 +194854,7 @@ module.exports = Friction; /***/ }), -/* 1418 */ +/* 1398 */ /***/ (function(module, exports) { /** @@ -196099,7 +194894,7 @@ module.exports = Gravity; /***/ }), -/* 1419 */ +/* 1399 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196181,7 +194976,7 @@ module.exports = Mass; /***/ }), -/* 1420 */ +/* 1400 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196236,7 +195031,7 @@ module.exports = Static; /***/ }), -/* 1421 */ +/* 1401 */ /***/ (function(module, exports) { /** @@ -196290,7 +195085,7 @@ module.exports = Sensor; /***/ }), -/* 1422 */ +/* 1402 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196301,10 +195096,10 @@ module.exports = Sensor; var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); -var FuzzyEquals = __webpack_require__(144); +var FuzzyEquals = __webpack_require__(106); var GetFastValue = __webpack_require__(2); -var PhysicsEditorParser = __webpack_require__(1282); -var PhysicsJSONParser = __webpack_require__(1283); +var PhysicsEditorParser = __webpack_require__(1292); +var PhysicsJSONParser = __webpack_require__(1293); var Vertices = __webpack_require__(86); /** @@ -196580,7 +195375,7 @@ module.exports = SetBody; /***/ }), -/* 1423 */ +/* 1403 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -196589,9 +195384,9 @@ module.exports = SetBody; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Events = __webpack_require__(1284); -var Sleeping = __webpack_require__(236); -var MatterEvents = __webpack_require__(237); +var Events = __webpack_require__(1294); +var Sleeping = __webpack_require__(239); +var MatterEvents = __webpack_require__(240); /** * Enables a Matter-enabled Game Object to be able to go to sleep. Should be used as a mixin and not directly. @@ -196734,7 +195529,7 @@ module.exports = Sleep; /***/ }), -/* 1424 */ +/* 1404 */ /***/ (function(module, exports) { /** @@ -196768,7 +195563,7 @@ module.exports = 'afteradd'; /***/ }), -/* 1425 */ +/* 1405 */ /***/ (function(module, exports) { /** @@ -196802,7 +195597,7 @@ module.exports = 'afterremove'; /***/ }), -/* 1426 */ +/* 1406 */ /***/ (function(module, exports) { /** @@ -196835,7 +195630,7 @@ module.exports = 'afterupdate'; /***/ }), -/* 1427 */ +/* 1407 */ /***/ (function(module, exports) { /** @@ -196869,7 +195664,7 @@ module.exports = 'beforeadd'; /***/ }), -/* 1428 */ +/* 1408 */ /***/ (function(module, exports) { /** @@ -196903,7 +195698,7 @@ module.exports = 'beforeremove'; /***/ }), -/* 1429 */ +/* 1409 */ /***/ (function(module, exports) { /** @@ -196936,7 +195731,7 @@ module.exports = 'beforeupdate'; /***/ }), -/* 1430 */ +/* 1410 */ /***/ (function(module, exports) { /** @@ -196973,7 +195768,7 @@ module.exports = 'collisionactive'; /***/ }), -/* 1431 */ +/* 1411 */ /***/ (function(module, exports) { /** @@ -197010,7 +195805,7 @@ module.exports = 'collisionend'; /***/ }), -/* 1432 */ +/* 1412 */ /***/ (function(module, exports) { /** @@ -197047,7 +195842,7 @@ module.exports = 'collisionstart'; /***/ }), -/* 1433 */ +/* 1413 */ /***/ (function(module, exports) { /** @@ -197074,7 +195869,7 @@ module.exports = 'dragend'; /***/ }), -/* 1434 */ +/* 1414 */ /***/ (function(module, exports) { /** @@ -197101,7 +195896,7 @@ module.exports = 'drag'; /***/ }), -/* 1435 */ +/* 1415 */ /***/ (function(module, exports) { /** @@ -197129,7 +195924,7 @@ module.exports = 'dragstart'; /***/ }), -/* 1436 */ +/* 1416 */ /***/ (function(module, exports) { /** @@ -197152,7 +195947,7 @@ module.exports = 'pause'; /***/ }), -/* 1437 */ +/* 1417 */ /***/ (function(module, exports) { /** @@ -197175,7 +195970,7 @@ module.exports = 'resume'; /***/ }), -/* 1438 */ +/* 1418 */ /***/ (function(module, exports) { /** @@ -197208,7 +196003,7 @@ module.exports = 'sleepend'; /***/ }), -/* 1439 */ +/* 1419 */ /***/ (function(module, exports) { /** @@ -197241,7 +196036,7 @@ module.exports = 'sleepstart'; /***/ }), -/* 1440 */ +/* 1420 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197251,9 +196046,9 @@ module.exports = 'sleepstart'; */ var Body = __webpack_require__(62); -var MATH_CONST = __webpack_require__(13); -var WrapAngle = __webpack_require__(232); -var WrapAngleDegrees = __webpack_require__(233); +var MATH_CONST = __webpack_require__(15); +var WrapAngle = __webpack_require__(235); +var WrapAngleDegrees = __webpack_require__(236); // global bitmask flag for GameObject.renderMask (used by Scale) var _FLAG = 4; // 0100 @@ -197556,7 +196351,7 @@ module.exports = Transform; /***/ }), -/* 1441 */ +/* 1421 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197657,7 +196452,7 @@ module.exports = Velocity; /***/ }), -/* 1442 */ +/* 1422 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -197666,15 +196461,15 @@ module.exports = Velocity; * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var Bounds = __webpack_require__(102); +var Bounds = __webpack_require__(100); var Class = __webpack_require__(0); -var Composite = __webpack_require__(145); -var Constraint = __webpack_require__(216); -var Detector = __webpack_require__(509); -var Events = __webpack_require__(1284); +var Composite = __webpack_require__(148); +var Constraint = __webpack_require__(219); +var Detector = __webpack_require__(514); +var Events = __webpack_require__(1294); var InputEvents = __webpack_require__(54); -var Merge = __webpack_require__(107); -var Sleeping = __webpack_require__(236); +var Merge = __webpack_require__(126); +var Sleeping = __webpack_require__(239); var Vector2 = __webpack_require__(3); var Vertices = __webpack_require__(86); @@ -198045,7 +196840,7 @@ module.exports = PointerConstraint; /***/ }), -/* 1443 */ +/* 1423 */ /***/ (function(module, exports, __webpack_require__) { // @if DEBUG @@ -198058,8 +196853,8 @@ var Metrics = {}; module.exports = Metrics; -var Composite = __webpack_require__(145); -var Common = __webpack_require__(37); +var Composite = __webpack_require__(148); +var Common = __webpack_require__(38); (function() { @@ -198144,7 +196939,7 @@ var Common = __webpack_require__(37); /***/ }), -/* 1444 */ +/* 1424 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -198153,39 +196948,39 @@ var Common = __webpack_require__(37); * @license {@link https://opensource.org/licenses/MIT|MIT License} */ -var ALIGN_CONST = __webpack_require__(106); -var Axes = __webpack_require__(507); +var ALIGN_CONST = __webpack_require__(105); +var Axes = __webpack_require__(512); var Bodies = __webpack_require__(109); var Body = __webpack_require__(62); -var BodyBounds = __webpack_require__(1378); -var Bounds = __webpack_require__(102); +var BodyBounds = __webpack_require__(1381); +var Bounds = __webpack_require__(100); var Class = __webpack_require__(0); -var Composite = __webpack_require__(145); -var Composites = __webpack_require__(1280); -var Constraint = __webpack_require__(216); -var Detector = __webpack_require__(509); +var Composite = __webpack_require__(148); +var Composites = __webpack_require__(1290); +var Constraint = __webpack_require__(219); +var Detector = __webpack_require__(514); var DistanceBetween = __webpack_require__(53); -var Factory = __webpack_require__(1379); +var Factory = __webpack_require__(1382); var GetFastValue = __webpack_require__(2); var GetValue = __webpack_require__(6); -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 Grid = __webpack_require__(1299); +var MatterAttractors = __webpack_require__(1425); +var MatterCollisionEvents = __webpack_require__(1426); +var MatterLib = __webpack_require__(1386); +var MatterWrap = __webpack_require__(1427); +var Merge = __webpack_require__(126); +var Pair = __webpack_require__(472); +var Pairs = __webpack_require__(1300); +var Plugin = __webpack_require__(1297); 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 Query = __webpack_require__(1387); +var Resolver = __webpack_require__(1301); +var SAT = __webpack_require__(515); +var SceneEvents = __webpack_require__(22); +var Svg = __webpack_require__(1291); +var Vector = __webpack_require__(99); var Vertices = __webpack_require__(86); -var World = __webpack_require__(1386); +var World = __webpack_require__(1389); /** * @classdesc @@ -199613,10 +198408,10 @@ module.exports = MatterPhysics; /***/ }), -/* 1445 */ +/* 1425 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1286); +var Matter = __webpack_require__(1296); /** * An attractors plugin for matter.js. @@ -199755,7 +198550,7 @@ module.exports = MatterAttractors; /***/ }), -/* 1446 */ +/* 1426 */ /***/ (function(module, exports) { /** @@ -199888,10 +198683,10 @@ module.exports = MatterCollisionEvents; /***/ }), -/* 1447 */ +/* 1427 */ /***/ (function(module, exports, __webpack_require__) { -var Matter = __webpack_require__(1286); +var Matter = __webpack_require__(1296); /** * A coordinate wrapping plugin for matter.js. @@ -200070,7 +198865,7 @@ module.exports = MatterWrap; */ /***/ }), -/* 1448 */ +/* 1428 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200089,15 +198884,15 @@ module.exports = MatterWrap; module.exports = { - Canvas: __webpack_require__(1449), - Snapshot: __webpack_require__(1450), - WebGL: __webpack_require__(1451) + Canvas: __webpack_require__(1429), + Snapshot: __webpack_require__(1430), + WebGL: __webpack_require__(1431) }; /***/ }), -/* 1449 */ +/* 1429 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200112,15 +198907,15 @@ module.exports = { module.exports = { - CanvasRenderer: __webpack_require__(499), - GetBlendModes: __webpack_require__(501), - SetTransform: __webpack_require__(27) + CanvasRenderer: __webpack_require__(504), + GetBlendModes: __webpack_require__(506), + SetTransform: __webpack_require__(28) }; /***/ }), -/* 1450 */ +/* 1430 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200135,14 +198930,14 @@ module.exports = { module.exports = { - Canvas: __webpack_require__(500), - WebGL: __webpack_require__(503) + Canvas: __webpack_require__(505), + WebGL: __webpack_require__(508) }; /***/ }), -/* 1451 */ +/* 1431 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200157,10 +198952,10 @@ module.exports = { module.exports = { - Utils: __webpack_require__(10), - WebGLPipeline: __webpack_require__(234), - WebGLRenderer: __webpack_require__(502), - Pipelines: __webpack_require__(1452), + Utils: __webpack_require__(9), + WebGLPipeline: __webpack_require__(147), + WebGLRenderer: __webpack_require__(507), + Pipelines: __webpack_require__(1432), // Constants BYTE: 0, @@ -200173,7 +198968,7 @@ module.exports = { /***/ }), -/* 1452 */ +/* 1432 */ /***/ (function(module, exports, __webpack_require__) { /** @@ -200188,10 +198983,11 @@ module.exports = { module.exports = { - BitmapMaskPipeline: __webpack_require__(504), - ForwardDiffuseLightPipeline: __webpack_require__(505), - TextureTintPipeline: __webpack_require__(235), - ModelViewProjection: __webpack_require__(506) + BitmapMaskPipeline: __webpack_require__(509), + ForwardDiffuseLightPipeline: __webpack_require__(510), + TextureTintPipeline: __webpack_require__(237), + TextureTintStripPipeline: __webpack_require__(511), + ModelViewProjection: __webpack_require__(238) }; diff --git a/dist/phaser.min.js b/dist/phaser.min.js index efff29f22..ee5f706dc 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=1387)}([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(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.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},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*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},limit:function(t){var e=this.length();return e&&e>t&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});r.ZERO=new r,r.RIGHT=new r(1,0),r.LEFT=new r(-1,0),r.UP=new r(0,-1),r.DOWN=new r(0,1),r.ONE=new r(1,1),t.exports=r},function(t,e,i){var n=i(0),s=i(47),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(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(532),AlphaSingle:i(269),Animation:i(503),BlendMode:i(272),ComputedSize:i(551),Crop:i(552),Depth:i(273),Flip:i(553),GetBounds:i(554),Mask:i(277),Origin:i(571),PathFollower:i(572),Pipeline:i(156),ScrollFactor:i(280),Size:i(573),Texture:i(574),TextureCrop:i(575),Tint:i(576),ToJSON:i(281),Transform:i(282),TransformMatrix:i(29),Visible:i(283)}},function(t,e,i){var n=i(0),s=i(281),r=i(113),o=i(10),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},incData:function(t,e){return this.data||(this.data=new r(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new r(this)),this.data.toggle(t),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(170),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){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(23),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){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},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,i){t.exports={BOOT:i(708),CREATE:i(709),DESTROY:i(710),PAUSE:i(711),POST_UPDATE:i(712),PRE_UPDATE:i(713),READY:i(714),RENDER:i(715),RESUME:i(716),SHUTDOWN:i(717),SLEEP:i(718),START:i(719),TRANSITION_COMPLETE:i(720),TRANSITION_INIT:i(721),TRANSITION_OUT:i(722),TRANSITION_START:i(723),TRANSITION_WAKE:i(724),UPDATE:i(725),WAKE:i(726)}},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(33),a=i(167),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(12),r=i(13),o=i(56),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,i){var n=i(0),s=i(165),r=i(295),o=i(166),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){t.exports={CSV:0,TILED_JSON:1,ARRAY_2D:2,WELTMEISTER:3}},function(t,e,i){var n={VERSION:"3.23.0",BlendModes:i(52),ScaleModes:i(234),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){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(15);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){t.exports={DESTROY:i(646),FADE_IN_COMPLETE:i(647),FADE_IN_START:i(648),FADE_OUT_COMPLETE:i(649),FADE_OUT_START:i(650),FLASH_COMPLETE:i(651),FLASH_START:i(652),PAN_COMPLETE:i(653),PAN_START:i(654),POST_RENDER:i(655),PRE_RENDER:i(656),ROTATE_COMPLETE:i(657),ROTATE_START:i(658),SHAKE_COMPLETE:i(659),SHAKE_START:i(660),ZOOM_COMPLETE:i(661),ZOOM_START:i(662)}},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]"===Object.prototype.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){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(142),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(275),r=i(153),o=i(47),a=i(154),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(889),DECODED:i(890),DECODED_ALL:i(891),DESTROY:i(892),DETUNE:i(893),GLOBAL_DETUNE:i(894),GLOBAL_MUTE:i(895),GLOBAL_RATE:i(896),GLOBAL_VOLUME:i(897),LOOP:i(898),LOOPED:i(899),MUTE:i(900),PAUSE_ALL:i(901),PAUSE:i(902),PLAY:i(903),RATE:i(904),RESUME_ALL:i(905),RESUME:i(906),SEEK:i(907),STOP_ALL:i(908),STOP:i(909),UNLOCKED:i(910),VOLUME:i(911)}},function(t,e,i){var n=i(0),s=i(17),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===_(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 _(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(115),s=i(181);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,i){var n=i(9);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(17),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,i){var n=i(0),s=i(12),r=i(13),o=i(965),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){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(868),COMPLETE:i(869),FILE_COMPLETE:i(870),FILE_KEY_COMPLETE:i(871),FILE_LOAD_ERROR:i(872),FILE_LOAD:i(873),FILE_PROGRESS:i(874),POST_PROCESS:i(875),PROGRESS:i(876),START:i(877)}},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(99),r=i(38);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(19);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(581),VIDEO_COMPLETE:i(582),VIDEO_CREATED:i(583),VIDEO_ERROR:i(584),VIDEO_LOOP:i(585),VIDEO_PLAY:i(586),VIDEO_SEEKED:i(587),VIDEO_SEEKING:i(588),VIDEO_STOP:i(589),VIDEO_TIMEOUT:i(590),VIDEO_UNLOCKED:i(591)}},function(t,e,i){var n=i(0),s=i(12),r=i(35),o=i(10),a=i(36),h=i(11),l=i(29),u=i(164),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&&w_&&bs&&(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(702),FULLSCREEN_FAILED:i(703),FULLSCREEN_UNSUPPORTED:i(704),LEAVE_FULLSCREEN:i(705),ORIENTATION_CHANGE:i(706),RESIZE:i(707)}},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(19),r=i(18),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,_=Math.min(x.b,w)-E;v=S,m=_,p=o?h+(u-(b-x.x)-S):h+(b-x.x),g=a?l+(c-(E-x.y)-_):l+(E-x.y),e=b,i=E,n=S,r=_}else p=0,g=0,v=0,m=0}else o&&(p=h+(u-e-n)),a&&(g=l+(c-i-r));var A=this.source.width,C=this.source.height;return t.u0=Math.max(0,p/A),t.v0=Math.max(0,g/C),t.u1=Math.min(1,(p+v)/A),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(397),o=i(398),a=i(47),h=i(157),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(241),s=i(0),r=i(90),o=i(2),a=i(6),h=i(7),l=i(391),u=i(133),c=i(75),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=this.firstgid&&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,i){var n=i(302),s=i(303),r=i(304),o=i(305),a=i(306),h=i(307),l=i(308),u=i(309),c=i(310),d=i(311),f=i(312),p=i(313);t.exports={Power0:l,Power1:u.Out,Power2:o.Out,Power3:c.Out,Power4:d.Out,Linear:l,Quad:u.Out,Cubic:o.Out,Quart:c.Out,Quint:d.Out,Sine:f.Out,Expo:h.Out,Circ:r.Out,Elastic:a.Out,Back:n.Out,Bounce:s.Out,Stepped:p,"Quad.easeIn":u.In,"Cubic.easeIn":o.In,"Quart.easeIn":c.In,"Quint.easeIn":d.In,"Sine.easeIn":f.In,"Expo.easeIn":h.In,"Circ.easeIn":r.In,"Elastic.easeIn":a.In,"Back.easeIn":n.In,"Bounce.easeIn":s.In,"Quad.easeOut":u.Out,"Cubic.easeOut":o.Out,"Quart.easeOut":c.Out,"Quint.easeOut":d.Out,"Sine.easeOut":f.Out,"Expo.easeOut":h.Out,"Circ.easeOut":r.Out,"Elastic.easeOut":a.Out,"Back.easeOut":n.Out,"Bounce.easeOut":s.Out,"Quad.easeInOut":u.InOut,"Cubic.easeInOut":o.InOut,"Quart.easeInOut":c.InOut,"Quint.easeInOut":d.InOut,"Sine.easeInOut":f.InOut,"Expo.easeInOut":h.InOut,"Circ.easeInOut":r.InOut,"Elastic.easeInOut":a.InOut,"Back.easeInOut":n.InOut,"Bounce.easeInOut":s.InOut}},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(728))},function(t,e,i){var n,s=i(117),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 Math.random()*(e-t)+t}},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(780),ERROR:i(781),LOAD:i(782),READY:i(783),REMOVE:i(784)}},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(80);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(67);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(67),r=i(10),o=i(59),a=i(20),h=i(1),l=i(381),u=i(382),c=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,this.onGameBlur,this),t.events.on(a.FOCUS,this.onGameFocus,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},get:function(t){return u(this.sounds,"key",t)},getAll:function(t){return l(this.sounds,"key",t)},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)},removeAll:function(){this.sounds.forEach(function(t){t.destroy()}),this.sounds.length=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)},stopByKey:function(t){var e=0;return this.getAll(t).forEach(function(t){t.stop()&&e++}),e},unlock:h,onBlur:h,onFocus:h,onGameBlur:function(){this.pauseOnBlur&&this.onBlur()},onGameFocus:function(){this.pauseOnBlur&&this.onFocus()},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.game.events.off(a.BLUR,this.onGameBlur,this),this.game.events.off(a.FOCUS,this.onGameFocus,this),this.game.events.off(a.PRE_STEP,this.update,this),this.removeAllListeners(),this.removeAll(),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=c},function(t,e,i){var n=i(0),s=i(10),r=i(59),o=i(18),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(183),s=i(0),r=i(1),o=i(131),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(184),s=i(389);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(a-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&&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(1215),ANY_KEY_UP:i(1216),COMBO_MATCH:i(1217),DOWN:i(1218),KEY_DOWN:i(1219),KEY_UP:i(1220),UP:i(1221)}},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,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===s&&(s=0),void 0===r&&(r=!1),{responseType:t,async:e,user:i,password:n,timeout:s,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:r}}},function(t,e,i){var n=i(0),s=i(217),r=i(75),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(220),CalculateFacesWithin:i(51),Copy:i(1311),CreateFromTiles:i(1312),CullTiles:i(1313),Fill:i(1314),FilterTiles:i(1315),FindByIndex:i(1316),FindTile:i(1317),ForEachTile:i(1318),GetTileAt:i(142),GetTileAtWorldXY:i(1319),GetTilesWithin:i(24),GetTilesWithinShape:i(1320),GetTilesWithinWorldXY:i(1321),HasTileAt:i(475),HasTileAtWorldXY:i(1322),IsInLayerBounds:i(101),PutTileAt:i(221),PutTileAtWorldXY:i(1323),PutTilesAt:i(1324),Randomize:i(1325),RemoveTileAt:i(476),RemoveTileAtWorldXY:i(1326),RenderDebug:i(1327),ReplaceByIndex:i(474),SetCollision:i(1328),SetCollisionBetween:i(1329),SetCollisionByExclusion:i(1330),SetCollisionByProperty:i(1331),SetCollisionFromCollisionGroup:i(1332),SetTileIndexCallback:i(1333),SetTileLocationCallback:i(1334),Shuffle:i(1335),SwapByIndex:i(1336),TileToWorldX:i(143),TileToWorldXY:i(1337),TileToWorldY:i(144),WeightedRandomize:i(1338),WorldToTileX:i(63),WorldToTileXY:i(1339),WorldToTileY:i(64)}},function(t,e,i){var n=i(101);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){t.exports=function(t,e,i){var n;n=t.hasOwnProperty(e)?"function"==typeof t[e]?function(i,n,s,r,o,a){return t[e](i,n,s,r,o,a)}:function(){return t[e]}:"function"==typeof i?i:function(){return i};return n}},function(t,e,i){var n=i(230),s=i(14),r=i(88),o=i(69),a=i(145),h=i(497),l=i(228),u=i(6),c=i(229),d=i(231),f=i(233);t.exports=function(t,e,i){void 0===i&&(i=n);for(var p=i.targets?i.targets:l(e),g=h(e),v=a(e,"delay",i.delay),m=a(e,"duration",i.duration),y=u(e,"easeParams",i.easeParams),x=o(u(e,"ease",i.ease),y),T=a(e,"hold",i.hold),w=a(e,"repeat",i.repeat),b=a(e,"repeatDelay",i.repeatDelay),E=r(e,"yoyo",i.yoyo),S=r(e,"flipX",i.flipX),_=r(e,"flipY",i.flipY),A=[],C=0;C=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={};t.exports=n;var s=i(240),r=i(38),o=i(100),a=i(62);n.create=function(t){return r.extend({id:r.nextId(),type:"composite",parent:null,isModified:!1,bodies:[],constraints:[],composites:[],label:"Composite",plugin:{}},t)},n.setModified=function(t,e,i,r){if(s.trigger(t,"compositeModified",t),t.isModified=e,i&&t.parent&&n.setModified(t.parent,e,i,r),r)for(var o=0;o1?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(19),s=i(0),r=i(10),o=i(111),a=i(270),h=i(271),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._repeatDelay&&!t.pendingRepeat||(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&&i>0&&(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(165);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(15);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(183),s=i(52),r=i(0),o=i(12),a=i(90),h=i(13),l=i(11),u=i(952),c=i(393),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.parentContainer){var e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y);t.setTo(e.x,e.y,0,0)}if(this.list.length>0){var i=this.list,n=new l,s=i[0].getBounds();t.setTo(s.x,s.y,s.width,s.height);for(var r=1;r-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(132),s=i(0),r=i(957),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(192),o=i(269),a=i(272),h=i(273),l=i(277),u=i(156),c=i(282),d=i(283),f=i(280),p=i(29),g=i(95),v=i(13),m=i(2),y=i(6),x=i(15),T=i(963),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(13),o=i(401),a=i(129),h=i(403),l=i(973),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;rr&&(o=t[r]),s[r]=o,t.length>r+1&&(o=t[r+1]),s[r+1]=o}return this},setColors:function(t){var e=this.points.length;if(e<1)return this;var i,n=this.colors;void 0===t?t=[16777215]:Array.isArray(t)||(t=[t]);var s=0;if(t.length===e)for(i=0;is&&(r=t[s]),n[s]=r,t.length>s+1&&(r=t[s+1]),n[s+1]=r}return this},setPoints:function(t,e,i){if(void 0===t&&(t=2),"number"==typeof t){var n,s,r,o=t;if(o<2&&(o=2),t=[],this.horizontal)for(r=-this.frame.halfWidth,s=this.frame.width/(o-1),n=0;nl){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&&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(20),a=i(13),h=i(328),l=i(167),u=i(992),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(19),r=i(12),o=i(90),a=i(20),h=i(13),l=i(59),u=i(196),c=i(995),d=i(15),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(202),r=i(418),o=i(47),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(208);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(431);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(1201),BUTTON_UP:i(1202),CONNECTED:i(1203),DISCONNECTED:i(1204),GAMEPAD_BUTTON_DOWN:i(1205),GAMEPAD_BUTTON_UP:i(1206)}},function(t,e,i){var n=i(18),s=i(139);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(17),r=i(21),o=i(8),a=i(2),h=i(7),l=i(363),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(142);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(101),r=i(220),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(32),s=i(102),r=i(103),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(1356),TIMELINE_LOOP:i(1357),TIMELINE_PAUSE:i(1358),TIMELINE_RESUME:i(1359),TIMELINE_START:i(1360),TIMELINE_UPDATE:i(1361),TWEEN_ACTIVE:i(1362),TWEEN_COMPLETE:i(1363),TWEEN_LOOP:i(1364),TWEEN_REPEAT:i(1365),TWEEN_START:i(1366),TWEEN_UPDATE:i(1367),TWEEN_YOYO:i(1368)}},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(66),r=i(2),o=i(238),a=i(339),h=i(340),l=i(29),u=i(9),c=i(147),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 _=T+g,A=w+v,C=r.getX(T,w),M=r.getY(T,w),P=r.getX(T,A),O=r.getY(T,A),R=r.getX(_,A),L=r.getY(_,A),D=r.getX(_,w),k=r.getY(_,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+A,F=y/n+C,I=(m+x)/i+A,B=(y+T)/n+C,N=o,Y=a,X=-g,U=-v;if(t.isCropped){var z=t._crop;N=z.width,Y=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),k=G/i+A,F=W/n+C,I=(G+z.width)/i+A,B=(W+z.height)/n+C,X=-g+m,U=-v+y}d^=!O&&e.isRenderTexture?1:0,c&&(N*=-1,X+=o),d&&(Y*=-1,U+=a);var V=X+N,H=U+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,U),q=D.getY(X,U),K=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),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,_,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],z,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],z,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){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(240);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(38);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&&(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(152),s=i(112);t.exports=function(t,e,i,r){void 0===r&&(r=[]),!e&&i>0&&(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.rotateToEffect.reset(),this.panEffect.reset(),this.shakeEffect.reset(),this.flashEffect.reset(),this.fadeEffect.reset(),this},update:function(t,e){this.visible&&(this.rotateToEffect.update(t,e),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(31);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(31);t.exports=function(t){return new n(t.r,t.g,t.b,t.a)}},function(t,e,i){var n=i(31);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(663),Flash:i(664),Pan:i(665),Shake:i(698),RotateTo:i(699),Zoom:i(700)}},function(t,e,i){t.exports={In:i(666),Out:i(667),InOut:i(668)}},function(t,e,i){t.exports={In:i(669),Out:i(670),InOut:i(671)}},function(t,e,i){t.exports={In:i(672),Out:i(673),InOut:i(674)}},function(t,e,i){t.exports={In:i(675),Out:i(676),InOut: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=i(684)},function(t,e,i){t.exports={In:i(685),Out:i(686),InOut:i(687)}},function(t,e,i){t.exports={In:i(688),Out:i(689),InOut:i(690)}},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=i(697)},function(t,e,i){var n=i(0),s=i(33),r=i(315),o=i(2),a=i(6),h=i(7),l=i(170),u=i(1),c=i(175),d=i(164),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.loaderWithCredentials=a(t,"loader.withCredentials",!1),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(117),browser:i(118),features:i(169),input:i(729),audio:i(730),video:i(731),fullscreen:i(732),canvasFeatures:i(316)}},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){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},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,_=c*v-d*g,A=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*A+S*_;return R?(R=1/R,i[0]=(h*O-l*P+u*M)*R,i[1]=(l*C-a*O-u*A)*R,i[2]=(a*P-h*C+u*_)*R,i[3]=(r*P-s*O-o*M)*R,i[4]=(n*O-r*C+o*A)*R,i[5]=(s*C-n*P-o*_)*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,_=l*v-d*f,A=u*g-c*p,C=u*v-d*p,M=c*v-d*g,P=m*M-y*C+x*A+T*_-w*S+b*E;return P?(P=1/P,t[0]=(o*M-a*C+h*A)*P,t[1]=(n*C-i*M-s*A)*P,t[2]=(p*b-g*w+v*T)*P,t[3]=(c*w-u*b-d*T)*P,t[4]=(a*_-r*M-h*S)*P,t[5]=(e*M-n*_+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*_+h*E)*P,t[9]=(i*_-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-a*E)*P,t[13]=(e*A-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,_=n*s*l-r*a,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*_+p*A+y*C,i[5]=c*_+g*A+x*C,i[6]=d*_+v*A+T*C,i[7]=f*_+m*A+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(174),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(26),r=i(33),o=i(169);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(504),h=i(507),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){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){var n=i(33);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(343),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(20);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(346),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(117);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(177);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(179),r=i(10),o=i(54),a=i(20),h=i(365),l=i(366),u=i(367),c=i(368),d=i(29),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(169),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(53),o=i(106),a=i(327),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.call(screen,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.setAspectRatio(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(19),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(125),r=i(22),o=i(20),a=i(6),h=i(82),l=i(1),u=i(373),c=i(180),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;i.sceneUpdate=l,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=o(this.currentConfig.volume*this.manager.volume,0,1))},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=a},function(t,e,i){var n=i(127),s=i(0),r=i(10),o=i(385),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(128),s=i(0),r=i(10),o=i(18),a=function(){return!1},h=function(){return this},l=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:a,updateMarker:a,removeMarker:function(){return null},play:a,pause:a,resume:a,stop:a,destroy:function(){n.prototype.destroy.call(this)},setMute:h,setVolume:h,setRate:h,setDetune:h,setSeek:h,setLoop:h});t.exports=l},function(t,e,i){var n=i(387),s=i(127),r=i(0),o=i(59),a=i(388),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(128),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(955),o=i(13),a=i(7),h=i(178),l=i(22),u=i(333),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;e0&&(e=n(t)/i);for(var h=0;h>>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(404),a=i(405),h=i(972),l=i(2),u=i(185),c=i(406),d=i(108),f=i(402),p=i(407),g=i(11),v=i(131),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(1001),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;s0&&(e=h/i);for(var l=0;lc+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(1022),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(1025),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&&i>0&&(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(47),s=i(18),r={Circle:i(1088),Ellipse:i(1098),Intersects:i(430),Line:i(1117),Point:i(1139),Polygon:i(1153),Rectangle:i(443),Triangle:i(1184)};r=s(!1,r,n),t.exports=r},function(t,e,i){t.exports={CircleToCircle:i(205),CircleToRectangle:i(206),GetCircleToCircle:i(1108),GetCircleToRectangle:i(1109),GetLineToCircle:i(207),GetLineToRectangle:i(209),GetRectangleIntersection:i(1110),GetRectangleToRectangle:i(1111),GetRectangleToTriangle:i(1112),GetTriangleToCircle:i(1113),GetTriangleToLine:i(435),GetTriangleToTriangle:i(1114),LineToCircle:i(208),LineToLine:i(84),LineToRectangle:i(431),PointToLine:i(439),PointToLineSegment:i(1115),RectangleToRectangle:i(135),RectangleToTriangle:i(432),RectangleToValues:i(1116),TriangleToCircle:i(434),TriangleToLine:i(436),TriangleToTriangle:i(437)}},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(48),r=i(210),o=i(433);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(208),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(15),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(1158),n.Ceil=i(1159),n.CeilAll=i(1160),n.CenterOn=i(168),n.Clone=i(1161),n.Contains=i(48),n.ContainsPoint=i(1162),n.ContainsRect=i(444),n.CopyFrom=i(1163),n.Decompose=i(433),n.Equals=i(1164),n.FitInside=i(1165),n.FitOutside=i(1166),n.Floor=i(1167),n.FloorAll=i(1168),n.FromPoints=i(176),n.FromXY=i(1169),n.GetAspectRatio=i(212),n.GetCenter=i(1170),n.GetPoint=i(152),n.GetPoints=i(274),n.GetSize=i(1171),n.Inflate=i(1172),n.Intersection=i(1173),n.MarchingAnts=i(285),n.MergePoints=i(1174),n.MergeRect=i(1175),n.MergeXY=i(1176),n.Offset=i(1177),n.OffsetPoint=i(1178),n.Overlaps=i(1179),n.Perimeter=i(112),n.PerimeterPoint=i(1180),n.Random=i(155),n.RandomOutside=i(1181),n.SameDimensions=i(1182),n.Scale=i(1183),n.Union=i(393),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(449),s=i(450),r=i(0),o=i(10),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(this.fixedStep||(s=.001*e,a=!0,this._elapsed=0),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&&!u.checkCollision.none)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.width-t)/2,r=(n.height-e)/2;this.offset.set(s,r)}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(390);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(48),a=i(3),h=new s({initialize:function(t,e){var i=e.displayWidth?e.displayWidth:64,n=e.displayHeight?e.displayHeight: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(this.position.x+this.halfWidth,this.position.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){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(101),r=i(220);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(32),s=i(223),r=i(478),o=i(479),a=i(490);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(32),s=i(223);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(32),s=i(103),r=i(480),o=i(482),a=i(483),h=i(486),l=i(488),u=i(489);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(481),s=i(2),r=i(102),o=i(224),a=i(74),h=i(225);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(225);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(104),s=i(484),r=i(226);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(102),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(104);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(20),o=i(13),a=i(1346),h=i(141),l=i(29),u=i(9),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),_=m.getX(y,w),A=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),_=Math.round(_),A=Math.round(A),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]=_,R[++t]=A,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(1355);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(230),s=i(14),r=i(88),o=i(69),a=i(145),h=i(6),l=i(229),u=i(231),c=i(233);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),_=c(p[0],0,"value",S.getEnd,S.getStart,S.getActive,y,g,v,b,x,T,w,!1,!1);_.start=d,_.current=d,_.to=f,E.push(_);var A=new u(t,E,p);A.offset=s(e,"offset",null),A.completeDelay=s(e,"completeDelay",0),A.loop=Math.round(s(e,"loop",0)),A.loopDelay=Math.round(s(e,"loopDelay",0)),A.paused=r(e,"paused",!1),A.useFrames=r(e,"useFrames",!1);for(var C=h(e,"callbackScope",A),M=[A,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%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(),e._originComponent&&(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(505),s=i(36),r=i(0),o=i(33),a=i(506),h=i(92),l=i(29),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(31),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(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(91),s=i(36),r=i(0),o=i(33),a=i(20),h=i(120),l=i(1),u=i(92),c=i(80),d=i(121),f=i(29),p=i(9),g=i(508),v=i(509),m=i(510),y=i(237),x=i(511),T=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){this.setPipeline(this.pipelines.TextureTintPipeline);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){if(e.flush(),this.setFramebuffer(null),t.emit(s.POST_RENDER,t),t.renderToGame){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,i){var n=i(0),s=i(2),r=i(238),o=i(339),a=i(340),h=i(29),l=i(147),u=new n({Extends:l,Mixins:[r],initialize:function(t){var e=t.renderer.config;l.call(this,{game:t.game,renderer:t.renderer,gl:t.renderer.gl,topology:t.renderer.gl.TRIANGLE_STRIP,vertShader:s(t,"vertShader",a),fragShader:s(t,"fragShader",o),vertexCapacity:s(t,"vertexCapacity",6*e.batchSize),vertexSize:s(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 h,this._tempMatrix2=new h,this._tempMatrix3=new h,this.mvpInit()},onBind:function(){return l.prototype.onBind.call(this),this.mvpUpdate(),this},resize:function(t,e,i){return l.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}});t.exports=u},function(t,e,i){var n={};t.exports=n;var s=i(99),r=i(38);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(99);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(293),BaseCamera:i(91),CameraManager:i(701),Effects:i(301),Events:i(36)}},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="camerarotatecomplete"},function(t,e){t.exports="camerarotatestart"},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(19),s=i(0),r=i(36),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(19),s=i(0),r=i(36),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._elapsedthis.source?Math.abs(this.destination-this.source):Math.abs(this.destination+u)-this.source)<(f=this.source>this.destination?Math.abs(this.source-this.destination):Math.abs(this.source+u)-this.destination)?this.clockwise=!0:d>f&&(this.clockwise=!1)}return this.camera.emit(r.ROTATE_START,this.camera,this,i,l),c},update:function(t,e){if(this.isRunning){this._elapsed+=e;var i=n(this._elapsed/this.duration,0,1);this.progress=i;var s=this.camera;if(this._elapsed=l?Math.abs(h-l):Math.abs(h+a)-l;var u=0;u=this.clockwise?s.rotation+o*r:s.rotation-o*r,s.rotation=u,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,u)}else s.rotation=this.destination,this._onUpdate&&this._onUpdate.call(this._onUpdateScope,s,i,this.destination),this.effectComplete()}},effectComplete:function(){this._onUpdate=null,this._onUpdateScope=null,this.isRunning=!1,this.camera.emit(r.ROTATE_COMPLETE,this.camera,this)},reset:function(){this.isRunning=!1,this._onUpdate=null,this._onUpdateScope=null},destroy:function(){this.reset(),this.camera=null,this.source=null,this.destination=null}});t.exports=a},function(t,e,i){var n=i(19),s=i(0),r=i(115),o=i(36),a=new s({initialize:function(t){this.camera=t,this.isRunning=!1,this.duration=0,this.source=1,this.destination=1,this.ease,this.progress=0,this._elapsed=0,this._onUpdate,this._onUpdateScope},start:function(t,e,i,n,s,a){void 0===e&&(e=1e3),void 0===i&&(i=r.Linear),void 0===n&&(n=!1),void 0===s&&(s=null),void 0===a&&(a=this.camera.scene);var h=this.camera;return!n&&this.isRunning?h:(this.isRunning=!0,this.duration=e,this.progress=0,this.source=h.zoom,this.destination=t,"string"==typeof i&&r.hasOwnProperty(i)?this.ease=r[i]:"function"==typeof i&&(this.ease=i),this._elapsed=0,this._onUpdate=s,this._onUpdateScope=a,this.camera.emit(o.ZOOM_START,this.camera,this,e,t),h)},update:function(t,e){this.isRunning&&(this._elapsed+=e,this.progress=n(this._elapsed/this.duration,0,1),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(118),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(119);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(119);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(318);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(15);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(160);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(328),IsSize:i(120),IsValue:i(758)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(329),Floor:i(93),To:i(760)}},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(174),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,i){t.exports={GenerateTexture:i(345),Palettes:i(789)}},function(t,e,i){t.exports={ARNE16:i(346),C64:i(790),CGA:i(791),JMP:i(792),MSX:i(793)}},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(795),CubicBezier:i(347),Curve:i(81),Ellipse:i(348),Line:i(349),QuadraticBezier:i(350),Spline:i(351)}},function(t,e,i){var n=i(0),s=i(347),r=i(348),o=i(5),a=i(349),h=i(796),l=i(350),u=i(11),c=i(351),d=i(3),f=i(15),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)},getTangent: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.getTangentAt(h,e)}s++}return null},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(31),s=i(355);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(166);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(116),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(172),s=i(31);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(354);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(122),DOMContentLoaded:i(356),GetScreenOrientation:i(357),GetTarget:i(362),ParseXML:i(363),RemoveFromDOM:i(178),RequestAnimationFrame:i(343)};t.exports=n},function(t,e,i){t.exports={EventEmitter:i(818)}},function(t,e,i){var n=i(0),s=i(10),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(122),s=i(289),r=i(292),o=i(26),a=i(0),h=i(314),l=i(820),u=i(337),c=i(113),d=i(341),f=i(315),p=i(356),g=i(10),v=i(20),m=i(364),y=i(23),x=i(369),T=i(370),w=i(372),b=i(121),E=i(375),S=i(342),_=i(344),A=i(379),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=A.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)),_(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(122);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(181);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,_=r-S,A=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){for(n=0;nl||z-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=U.wrappedText).length);var z=e._bounds.lines;1===N?X=(z.longest-z.lengths[0])/2:2===N&&(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===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(953),s=i(954),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,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,U=e.fontSize/N.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,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===A&&(A=new o(F+Math.cos(N)*B,I+Math.sin(N)*B,v),E.push(A),k+=.01);k<1+U;)w=Y*k+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,A.points.push(new r(x,T,v)),k+=.01;w=Y+N,x=F+Math.cos(w)*B,T=I+Math.sin(w)*B,A.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!==A?A.points.push(new r(p[++P],p[++P],v)):(A=new o(p[++P],p[++P],v),E.push(A));break;case n.MOVE_TO:A=new o(p[++P],p[++P],v),E.push(A);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 z=p[++P],G=p[++P];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(966),s=i(967),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(969),s=i(970),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(401),Particle:i(402),ParticleEmitter:i(403),ParticleEmitterManager:i(194),Zones:i(976)}},function(t,e,i){var n=i(0),s=i(119),r=i(69),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(974),s=i(975),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(9);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(988),s=i(989),t.exports={renderWebGL:n,renderCanvas:s}},function(t,e,i){var n=i(9);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(14),r=i(6),o=i(991),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,A=1;A0)for(n(h,e),A=0;A0)for(n(h,e,e.altFillColor,e.altFillAlpha*c),A=0;A0){for(s(h,e,e.outlineFillColor,e.outlineFillAlpha*c),_=1;_o.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(1099),n.Circumference=i(399),n.CircumferencePoint=i(193),n.Clone=i(1100),n.Contains=i(96),n.ContainsPoint=i(1101),n.ContainsRect=i(1102),n.CopyFrom=i(1103),n.Equals=i(1104),n.GetBounds=i(1105),n.GetPoint=i(397),n.GetPoints=i(398),n.Offset=i(1106),n.OffsetPoint=i(1107),n.Random=i(157),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(205);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(207),s=i(206);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(135);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(209),s=i(135);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(432),s=i(209);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(207),s=i(434);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(437),s=i(435);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(439);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||s0){var m=u[0],y=[m];for(h=1;h=o&&(y.push(x),m=x)}var T=u[u.length-1];return n(m,T)i&&(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(11);t.exports=function(t,e,i,s,r){return void 0===r&&(r=new n),r.setTo(Math.min(t,i),Math.min(e,s),Math.abs(t-i),Math.abs(e-s))}},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(168);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(135);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(137),KeyboardManager:i(365),KeyboardPlugin:i(1222),Key:i(452),KeyCodes:i(124),KeyCombo:i(453),JustDown:i(1227),JustUp:i(1228),DownDuration:i(1229),UpDuration:i(1230)}},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(10),r=i(137),o=i(20),a=i(6),h=i(54),l=i(136),u=i(452),c=i(124),d=i(453),f=i(1226),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(124),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(463),s=i(65),r=i(205),o=i(206);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(1287);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(467);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(468);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){var n={};t.exports=n;var s=i(148),r=i(219),o=i(38),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={}),l(t,"isStatic")||(t.isStatic=!0),l(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={}),l(t,"isStatic")||(t.isStatic=!0),l(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(),a=this.tile.getCollisionGroup(),c=h(a,"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,this.removeAllListeners()}});t.exports=c},function(t,e,i){var n=i(1386);n.Body=i(62),n.Composite=i(148),n.World=i(1298),n.Detector=i(514),n.Grid=i(1299),n.Pairs=i(1300),n.Pair=i(472),n.Query=i(1387),n.Resolver=i(1301),n.SAT=i(515),n.Constraint=i(219),n.Common=i(38),n.Engine=i(1388),n.Events=i(240),n.Sleeping=i(239),n.Plugin=i(1297),n.Bodies=i(109),n.Composites=i(1290),n.Axes=i(512),n.Bounds=i(100),n.Svg=i(1291),n.Vector=i(99),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(38);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(148),r=(i(219),i(38));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(472),r=i(514),o=i(38);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(472),r=i(38);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(_,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 U=b.tangentImpulse;b.tangentImpulse=o.clamp(b.tangentImpulse+F,-I,I),F=b.tangentImpulse-U}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(_,s)*v.inverseInertia)}}}}},function(t,e,i){t.exports={BasePlugin:i(473),DefaultPlugins:i(175),PluginCache:i(23),PluginManager:i(369),ScenePlugin:i(1303)}},function(t,e,i){var n=i(473),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(18),s=i(177),r={Center:i(358),Events:i(92),Orientation:i(359),ScaleManager:i(370),ScaleModes:i(360),Zoom:i(361)};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(125),s=i(18),r={Events:i(22),SceneManager:i(372),ScenePlugin:i(1306),Settings:i(374),Systems:i(180)};r=s(!1,r,n),t.exports=r},function(t,e,i){var n=i(19),s=i(0),r=i(22),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(o(t,"data")):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(129),Map:i(162),ProcessQueue:i(186),RTree:i(469),Set:i(133),Size:i(371)}},function(t,e,i){var n=i(18),s=i(1309),r={CanvasTexture:i(376),Events:i(121),FilterMode:s,Frame:i(94),Parsers:i(378),Texture:i(182),TextureManager:i(375),TextureSource:i(377)};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(141),Parsers:i(1340),Formats:i(32),ImageCollection:i(484),ParseToTilemap:i(227),Tile:i(74),Tilemap:i(493),TilemapCreator:i(1349),TilemapFactory:i(1350),Tileset:i(104),LayerData:i(102),MapData:i(103),ObjectLayer:i(487),DynamicTilemapLayer:i(494),StaticTilemapLayer:i(495)}},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(222);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(18),GetAdvancedValue:i(14),GetFastValue:i(2),GetMinMaxValue:i(1374),GetValue:i(6),HasAll:i(1375),HasAny:i(406),HasValue:i(108),IsPlainObject:i(7),Merge:i(126),MergeRight:i(1376),Pick:i(485),SetValue:i(426)}},function(t,e,i){var n=i(6),s=i(19);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=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;L_&&(_+=e.length),S=Number.MAX_VALUE,_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(517);var n=i(33),s=i(18),r={Actions:i(241),Animations:i(637),BlendModes:i(52),Cache:i(638),Cameras:i(641),Core:i(727),Class:i(0),Create:i(788),Curves:i(794),Data:i(797),Display:i(799),DOM:i(816),Events:i(817),Game:i(819),GameObjects:i(912),Geom:i(429),Input:i(1199),Loader:i(1233),Math:i(170),Physics:i(1391),Plugins:i(1302),Renderer:i(1428),Scale:i(1304),ScaleModes:i(234),Scene:i(373),Scenes:i(1305),Structs:i(1307),Textures:i(1308),Tilemaps:i(1310),Time:i(1351),Tweens:i(1353),Utils:i(1370)};r.Sound=i(1380),r=s(!1,r,n),t.exports=r,e.Phaser=r}).call(this,i(516))},function(t,e,i){t.exports={Arcade:i(1259),Matter:i(1392)}},function(t,e,i){t.exports={BodyBounds:i(1381),Factory:i(1382),Image:i(1384),Matter:i(1296),MatterPhysics:i(1424),PolyDecomp:i(1383),Sprite:i(1385),TileBody:i(1295),PhysicsEditorParser:i(1292),PhysicsJSONParser:i(1293),World:i(1389)}},function(t,e,i){var n=i(513),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=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